# Math Help - separable differential equation

1. ## separable differential equation

I can't seem to get the solution in my text book, the problem is:

$xy' + y = y^{2}$

I began by reorganizing to:

$\frac{1}{y(y-1)}dy = \frac{1}{x}dx$

expanding the y term and integrating:

$\int{\frac{1}{y}dy} - \int{\frac{1}{y-1}dy} = \int{\frac{1}{x}dx}$

giving the following:

$ln|y| - ln|y-1| = ln|x| + K$

where K is the combined constant of integration from both sides
now when I take the exponential, I think I have to raise e to the entire
right side and that I can't do it term by term which simplifies to a division
using log properties and then canceling out the e and ln

$|\frac{y}{y-1}| = |x|e^{K}$

now I was thinking I could drop all the absolute values if I throw a +\-
in front of the remaining exponential, so we'll say $C=\pm e^{K}$

$\frac{y}{y-1} = Cx$

solving for y yields:

$y = \frac{-Cx}{1-Cx}$

however my textbook gives:

$y = \frac{1}{1-Cx}$

Please let me know if you can see my mistake, thanks

2. Originally Posted by stevedave
I can't seem to get the solution in my text book, the problem is:

$xy' + y = y^{2}$

I began by reorganizing to:

$\frac{1}{y(y-1)}dy = \frac{1}{x}dx$

expanding the y term and integrating:

$\int{\frac{1}{y}dy} - \int{\frac{1}{y-1}dy} = \int{\frac{1}{x}dx}$

Wrong sign! Left side should be $\color{red}\int{\frac{1}{y-1}dy} - \int{\frac{1}{y}dy}$
..

3. Originally Posted by stevedave
I can't seem to get the solution in my text book, the problem is:

$xy' + y = y^{2}$

I began by reorganizing to:

$\frac{1}{y(y-1)}dy = \frac{1}{x}dx$

expanding the y term and integrating:

$\int{\frac{1}{y}dy} - \int{\frac{1}{y-1}dy} = \int{\frac{1}{x}dx}$
$\frac{1}{y}- \frac{1}{y-1}= \frac{y-1}{y(y-1)}- \frac{y}{y(y-1)}= -\frac{1}{y(y-1)}$. You have the sign wrong. You should have
$\int{\frac{1}{y-1}dy} - \int{\frac{1}{y}dy} = \int{\frac{1}{x}dx}$
giving the following:

$ln|y| - ln|y-1| = ln|x| + K$

where K is the combined constant of integration from both sides
now when I take the exponential, I think I have to raise e to the entire
right side and that I can't do it term by term which simplifies to a division
using log properties and then canceling out the e and ln

$|\frac{y}{y-1}| = |x|e^{K}$

now I was thinking I could drop all the absolute values if I throw a +\-
in front of the remaining exponential, so we'll say $C=\pm e^{K}$

$\frac{y}{y-1} = Cx$
The sign error I pointed out above means this should be $\frac{y-1}{y}= Cx$ so y-1= Cxy, Cxy- y= (Cx-1)y= -1. That gives what your textbook says.

solving for y yields:

$y = \frac{-Cx}{1-Cx}$

however my textbook gives:

$y = \frac{1}{1-Cx}$

Please let me know if you can see my mistake, thanks

4. bah, I always do stuff like that . I'll rework it and see what happens. Thanks

5. correction ...

$\frac{1}{y(y-1)} = -\frac{1}{y} + \frac{1}{y-1}$