Math Help - First order differential equation

1. First order differential equation

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

What I have done:

$\frac{dy}{dx}=2xy+xy^2$

At this point I thought it would be best to factor out the x term.

$\frac{dy}{dx}=x(2y+y^2)$

$\frac{dy}{2y+y^2}=xdx$

Is my work so far correct? Looking at the left side I don't know what the next step is.

2. Hello Em Yeu Anh
Originally Posted by Em Yeu Anh
Solve the differential equation $y' - xy^2 = 2xy$

What I have done:

$\frac{dy}{dx}=2xy+xy^2$

At this point I thought it would be best to factor out the x term.

$\frac{dy}{dx}=x(2y+y^2)$

$\frac{dy}{2y+y^2}=xdx$

Is my work so far correct? Looking at the left side I don't know what the next step is.
Looks good to me, so far!

Now write $2y+y^2 =y(2+y)$ and then use Partial Fractions. You can then easily integrate the resulting expression.

Hello Em Yeu AnhLooks good to me, so far!

Now write $2y+y^2 =y(2+y)$ and then use Partial Fractions. You can then easily integrate the resulting expression.

Thanks for the help.
Okay I've gotten it down to these steps:

$\frac{ln|y|}{2}-\frac{ln|2+y|}{2}=\frac{x^2}{2}+C$

Assuming I've made no errors in simplifying,

$\frac{y}{2+y} = Ae^{x^2}$ where A=+ $e^C$

And here I don't know how to isolate for y...Is it allright to split up $\frac{y}{2+y}$ into $\frac{y}{2}+1$ and go from there?

4. Originally Posted by Em Yeu Anh
Thanks for the help.
Okay I've gotten it down to these steps:

$\frac{ln|y|}{2}-\frac{ln|2+y|}{2}=\frac{x^2}{2}+C$

Assuming I've made no errors in simplifying,

$\frac{y}{2+y} = Ae^{x^2}$ where A=+ $e^C$

And here I don't know how to isolate for y...Is it allright to split up $\frac{y}{2+y}$ into $\frac{y}{2}+1$ and go from there?
As you probably know, $\frac{x}{a+b} \neq \frac{x}{a} + \frac{x}{b}$. What you can do, though, is this:

$\frac{y}{2+y} = Ae^{x^2} \Leftrightarrow \frac{1}{Ae^{x^2}} = \frac{2+y}{y} = 1 + \frac{2}{y}$

And now simplify..

5. Hello Em Yeu Anh
Originally Posted by Em Yeu Anh
Thanks for the help.
Okay I've gotten it down to these steps:

$\frac{ln|y|}{2}-\frac{ln|2+y|}{2}=\frac{x^2}{2}+C$

Assuming I've made no errors in simplifying,

$\frac{y}{2+y} = Ae^{x^2}$ where A=+ $e^C$

And here I don't know how to isolate for y...Is it allright to split up $\frac{y}{2+y}$ into $\frac{y}{2}+1$ and go from there?
$\frac{y}{2+y} = Ae^{x^2}$

$\Rightarrow y= (2+y)Ae^{x^2}$
$=2Ae^{x^2}+yAe^{x^2}$
$\Rightarrow y(1-Ae^{x^2})=2Ae^{x^2}$

$\Rightarrow y=\frac{2Ae^{x^2}}{(1-Ae^{x^2})}$

which you could write as:

$y=\frac{2e^{x^2}}{(A'-e^{x^2})}$, replacing $\frac1A$ by $A'$.

6. My 2 cents:

An eqn like y ' + p(x) y = q(x) y^n

is an example of a Bernoulli equataion which can easily be solved

by letting v = y ^ (1-n)

or y ' -2xy = x y^2

is an example of a Bernoulli equataion n = 1

Let v= y ^(-1)

dv/dx = -y^(-2)dy/dx

-y^2 dv/dx - 2xy = x y^2

dv/dx + 2x v = -x

Which can now be solved with the intergating factor e^(x^2)

d(ve^(x^2)) = -xe^(x^2)dx

v = -1/2 + ce^(-x^2)

y= 1/v = 1/ [-1/2 + ce^(-x^2)]