# Solving $y' = y-x-1+\frac{1}{x-y+2}, y(0)=0$

I have to solve the differential equation $$y'(x) = y(x)-x-1+\frac{1}{x-y(x)+2}$$ with initial condition $$y(0)=0$$ as a part of my homework.

The problem is that I cannot understand which type it is in order to solve it.

Can you give me directions to understand?

-

You can transform the differential equation to an autonomous differential equation by applying the substitution $w(x)=y(x)-x-2$. Then $w'(x) = y'(x) -1$ and the differential equation becomes $$w' = w - \frac{1}{w}, \qquad\quad w(0)=-2.$$ This system should be straight forward to solve for $w$ using separation of variables. Once you have found $w$, $y$ follows from $y=w+x+2$.

-

Use a change of variables: $u=y-x-2$. Then $u'=y'-1$ (differentiate with respect to $x$). We then find that (after subtracting $1$ from both sides):

$$y'-1=y-x-2+\frac{1}{-(y-x-2)} \quad \Longrightarrow \quad u'=u-\frac{1}{u}=\frac{u^2-1}{u}$$

Now separate variables.

-
I think it is $u' = \frac{u^{2}-1}{u}$ – pressy_paris Nov 2 '11 at 17:57
@pressy_paris thanks! – Bill Cook Nov 2 '11 at 22:36

have you tried a change of dependent variable from $y$ to $u$ related by $u = y - x - 2?$

-