# Algebra of Differential Equation

1. Nov 16, 2009

### kathrynag

I need to solve dy/dx=(y-1)^2
dy/(y-1)^2=dx
dy/u^2=x+c
-u^-1=x+c
-1/y-1=x+c
-1=(x+c)(y-1)
y-1=-1/(x+c)
y=(x+c-1)/(x+c)
y(0)=1
1=c-1/c
1=1-1/c
I don't know where my algebra is messing up?

2. Nov 16, 2009

### Staff: Mentor

Are you sure about your initial condition y(0) = 1? My work is the same as yours. If you look at the graph of y = 1 - 1/(x + c), there is a vertical asymptote at x = -c, and a horizontal asymptote for the line y = 1. No matter what c is, y will never equal 1.

3. Nov 17, 2009

### kathrynag

Yes, the initial condition is y(0)=1. I have looked in the back of the book and the answer is in fact y=1.

4. Nov 17, 2009

### Staff: Mentor

Yep, that works. To take this into account, we need to look at this step:
dy/(y - 1)^2 = dx
The left side is defined only if y is not 1. If y = 1, the differential equation is y' = 0, so y = K. With your initial condition, this gives y(x) = 1.

For any other initial condition, y(x) is as you had it.

5. Nov 18, 2009

### kathrynag

Ok, I guess that makes sense, but I was hoping I could solve it algebraically.

6. Nov 18, 2009

### Staff: Mentor

Isn't y' = 0 ==> y = K algebraic enough for you? I wouldn't describe this as an "algebraic" solution, though. This is a very simple differential equation, and its solution is equally simple.