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?
Solve the differential equation $y'-xy^2 = 2xy$
3.8k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
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.
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.