How to solve a differential equation after integration.

78 Views Asked by At

The question is: Find the general solution of the differential equation $$\frac{dy}{dx}=2y+y^{3}$$

I have integrated by partial fractions to get to the following result: $$\frac{1}{2}ln(y)-\frac{1}{4}ln(y^{2}+2)=x+C_{1}$$

I now need to solve it for y. I have put this question into an online calculator so I know the answer is: $$y=-\frac{{{i\sqrt{2}} e^{{\frac{1}{2}}(C_{1}+4x)}}}{\sqrt{((e^{C_1+4x})-1)}}$$ and $$y=\frac{{{i\sqrt{2}} e^{{\frac{1}{2}}(C_{1}+4x)}}}{\sqrt{((e^{C_1+4x})-1)}}$$

I don't understand how to solve $$\frac{1}{2}ln(y)-\frac{1}{4}ln(y^{2}+2)=x+C_{1}$$ to get those answers... I tried using the quadratic formula and could only get it partially so I am either doing something accidentally wrong, or the quadratic formula is the wrong approach. If anyone could show me the steps of how to solve this it would be wonderful, this is driving me crazy.

2

There are 2 best solutions below

17
On BEST ANSWER

Multiply with $4$, exponentiate, combine the sign with the constant to get $$ \frac{y^2}{2+y^2}=Ce^{4x},~~~ C=\pm e^{4C_1}=\frac{y_0^2}{2+y_0^2} $$ where the initial condition $y(0)=y_0$ was inserted. This you now can solve for $y^2$ and then discuss the square root. $$ y^2=\frac{2Ce^{4x}}{1-Ce^{4x}}=\frac{2y_0^2e^{4x}}{2+y_0^2(1-e^{4x})}\\~\\ y(x)=\pm\sqrt{\frac{2C}{e^{-4x}-C}}~~\text{ or }~~y(x)=\frac{y_0e^{2x}}{\sqrt{1+\frac12y_0^2(1-e^{4x})}}. $$ In the second form the sign is already fixed to the sign of the solution. As $y=0$ is a solution, no other solution can have a change signs.


Alternatively, you can solve this as Bernoulli equation, $$ (y^{-2})'=-2y^{-3}y'=-4y^{-2}-2\implies 2y(x)^{-2}+1=(2y_0^{-2}+1)e^{-4x} $$

2
On

Writing the LHS as $ln(y^\frac{1}{2})-ln(y^2+2)^{\frac{1}{4}}=ln\bigg(\frac{y^\frac{1}{2}}{(y^2+2)^\frac{1}{4}}\bigg)$ then taking exponential we have

$\frac{y^\frac{1}{2}}{(y^2+2)^\frac{1}{4}}= e^{x+C_1}$ Removing the powers we have

$\frac{y^2}{y^2+2}=e^{4x+C_1}$ (Note I conveniently rewrote $4C_1$ as simply $C_1$ here.

I believe you can take it from here.