Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 5 down vote accepted

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$.

share|cite|improve this answer

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.

share|cite|improve this answer
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?$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.