Solve the differential equation $y'-xy^2 = 2xy$

3.8k Views Asked by At

I get it to the form $\left | \dfrac{y}{y+2} \right |=e^{x^2}e^{2C}$ but I'm not sure how to get rid of the absolute value and then solve for y. I've heard the absolute value can be ignored in differential equations. Is this true?

3

There are 3 best solutions below

2
On BEST ANSWER

the differential equation $$\frac{dy}{dx} = xy(y+2) $$ has two constant solutions $y = 0$ and $y = -2.$ the right hand side is continuous everywhere and satisfies Lipschitz condition everywhere so that it satisfies the uniqueness criteria. what this means for the solutions of this differential equation is that the solutions are trapped in the three regions $y < -2, -2 < y < 0$ and $0 < y.$ that is, if it starts in one, then it stays there.

now you can happily separate the variables and get an explicit solution for $y.$

$\bf edit:$

by separation of variable you have arrived at $$|\frac{y}{y+2}| = \frac{1}{D}e^{x^2}$$ you can rewrite this as $$\frac{y+2}{y} = Ce^{-x^2}, y = \dfrac{2}{Ce^{-x^2} - 1}$$ this will take care of staying in each particular region.

0
On

We have $$y' - x{y^2} = 2xy \Rightarrow y' - 2xy = x{y^2} \Rightarrow y'.{y^{ - 2}} - 2x{y^{ - 1}} = x,\,\,\left( {y \ne 0} \right).$$ Put $z=y^{-1}$. Then $$\begin{gathered} z' + 2xz = - x \Rightarrow \frac{d}{{dx}}\left( {z{e^{{x^2}}}} \right) = - x{e^{{x^2}}} \\ \Rightarrow z = {e^{ - {x^2}}}\int {\left( { - x{e^{{x^2}}}} \right)dx} = - \frac{1}{2}{e^{ - {x^2}}}\int {{e^{{x^2}}}d\left( {{x^2}} \right)} \hfill \\ = - \frac{1}{2}{e^{ - {x^2}}}\left( {{e^{{x^2}}} + C} \right) = - \frac{1} {2} - \frac{C}{2}{e^{ - {x^2}}}. \hfill \\ \end{gathered} .$$ Finally, $$y = {z^{ - 1}} = \frac{1}{z} = \frac{1}{{ - \frac{1}{2} - \frac{C}{2}{e^{ - {x^2}}}}} = - \frac{2}{{1 + C{e^{ - {x^2}}}}}.$$ Note: $y=0$ is also a solution of the equation.

0
On

If $|A|=B$, then $A$ must be either $B$ or $-B$, so your equation is equivalent to $$ \frac{y}{y+2}=\pm e^{2C} e^{x^2} . $$ Now let $D=\pm e^{2C}$ and solve for $y$. (Since $C$ is an arbitrary constant, $D$ will be an arbitrary nonzero constant.)