Homework Help: Separation of variables help

1. Feb 5, 2012

bdh2991

1. The problem statement, all variables and given/known data

use separation of variables to solve the differential equation x^2dy/dx=y-xy

with the initial condition of y(-1)=-1

2. Relevant equations

3. The attempt at a solution

after i separated and integrated i got the answer y=e^(-1/x-lnx+c)

the answer in the book is y=e^-(1+1/x)/x

i can't figure out how they got to that even after i plugged in -1 for x and y

some help would be greatly appreciated

2. Feb 5, 2012

jamesrc

You've done the calculus correctly, now you need to do a little algebra.

Hint: what's e^(-ln x)?

3. Feb 5, 2012

SammyS

Staff Emeritus
$\displaystyle e^{-1/x-\ln(x)+C}=e^{-1/x}e^{-\ln|x|}e^C$
$\displaystyle =e^{-1/x}(1/x)e^C$​
Does that help?

4. Feb 5, 2012

bdh2991

well i think it would be x^-1 so then that would give me the x in the denominator then plugging in the initial values i should get c=1?

5. Feb 5, 2012

SammyS

Staff Emeritus
e0 = 1

6. Feb 5, 2012

bdh2991

ok thanks for the help i didn't remember that you could rewrite the e functions that way...