Originally Posted by

**Craka** The question is to find the solution for

$\displaystyle xy'+y=Y^2$ for when y(1)=-1

here is my working

$\displaystyle

\begin{array}{l}

xy' + y = y^2 \\

y(1) = - 1 \\

x\frac{{dy}}{{dx}} = y^2 - y \\

\int {\frac{{dy}}{{y^2 - y}} = \int {\frac{{dx}}{x}} } \\

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

\end{array}

$

then by partial fractions the left hand side is

$\displaystyle

\begin{array}{l}

LHS = \int {\frac{1}{{y^2 - y}}dy} \\

\frac{1}{{y^2 - y}} = \frac{A}{y} + \frac{B}{{(y - 1)}} \\

1 = (A + B)y - A \\

A = - 1 \\

A + B = 0 \\

B = 1 \\

\int {\frac{1}{{y^2 - y}}dy} = \int {\frac{{ - 1}}{y}dy + \int {\frac{1}{{y - 1}}dy} } \\

= - \ln y + \ln |y - 1| \\

\end{array}

$

and right hand side is

$\displaystyle

\begin{array}{l}

RHS = \int {\frac{1}{x}dx} \\

= \ln x + c \\

\end{array}

$

so

$\displaystyle

- \ln y + \ln |y - 1| = \ln x + c

$

raising by power of e

Mr F says: Below is where your error lies (assuming previous working is correct - I have not checked thoroughly).

$\displaystyle

\begin{array}{l}

- y + y - 1 = x + e^c \\

- 1 = x + e^c \\

\end{array}

$

But this does not appear to me to be right, as the y term has fallen off all together, and I don't have the answer for this problem to check, plus am confused where the y(1)=-1 comes in.