# Differential Equation Problem

• Feb 12th 2009, 01:08 PM
MelanieC
Differential Equation Problem
Find the solution of the differential equation that satisfies the given initial condition. xy' + y = y^2 , y(1) = -2

I've been attempting to solve it by separable equations, by making the equation xy'=y(y-1), but my answer has not been working correctly.
• Feb 12th 2009, 02:01 PM
Jhevon
Quote:

Originally Posted by MelanieC
Find the solution of the differential equation that satisfies the given initial condition. xy' + y = y^2 , y(1) = -2

I've been attempting to solve it by separable equations, by making the equation xy'=y(y-1), but my answer has not been working correctly.

...you're not done. you should get it to $\frac 1{y(y - 1)}~dy = \frac 1x~dx$

now integrate both sides and continue
• Feb 12th 2009, 04:22 PM
MelanieC
I've done thiat already, and by using partial fractions, I come up with:
ln(y-1/y) =lnx +c
y-1/y= x + C2
1 - 1/y = x + C2
-1/y = x + C3
y = 1/(-x + C3)

Using my initial condition, I get
-2 = 1/ (-1 + C3)
Therefore, C3 = 1/2

So my solution should be

y= 1/(-x + 1/2)

However, when I tried to check my answer by substituting it back into the original given differential equation, my answer did not work out. Can anyone help me?
• Feb 12th 2009, 04:34 PM
HallsofIvy
Quote:

Originally Posted by MelanieC
I've done thiat already, and by using partial fractions, I come up with:
ln(y-1/y) =lnx +c
y-1/y= x + C2

No. Taking the exponential of both sides gives (y-1)/y= C2 x where C2= $e^c$

Quote:

1 - 1/y = x + C2
-1/y = x + C3
y = 1/(-x + C3)

Using my initial condition, I get
-2 = 1/ (-1 + C3)
Therefore, C3 = 1/2

So my solution should be

y= 1/(-x + 1/2)

However, when I tried to check my answer by substituting it back into the original given differential equation, my answer did not work out. Can anyone help me?
• Feb 12th 2009, 04:36 PM
MelanieC
I know that C2 = e^c, but since e^c is a constant, i just renamed it to be C2, to make it easier to work with
• Feb 12th 2009, 05:12 PM
skeeter
Quote:

Originally Posted by MelanieC
I've done thiat already, and by using partial fractions, I come up with:
ln(y-1/y) =lnx +c
y-1/y= x + C2 ... this step is incorrect.

$\frac{y-1}{y} = e^{\ln{x}+C} = C_2 \cdot x$ , not $x + C_2$