# How to solve this ODE (integration factor?)

Im trying to solve the following ODE:

$(x+y+1) dx + (2x +2y -1) dy = 0$

In the theory of my book these presented with the form

$P(x,y) dx + Q(x,y) dy = 0$

So for my example we have

$P(x,y) = x +y +1 , \, \, \, Q(x,y) = 2x + 2y -1$

Thus we notice that

$\dfrac{\partial}{\partial y}P(x,y) = 1 \neq \dfrac{\partial}{\partial x}Q(x,y) = 2$

So the ODE is not exact. Then I would try to use an integrate factor if the following expresion depends only on $x$

$\dfrac{1}{P(t,x)} \left( \dfrac{\partial}{\partial y} P(x,y) - \dfrac{\partial}{\partial x} Q(x,y)\right) = - \dfrac{1}{x+y+1}$

but as you can see, that is not the case. Have I done something wrong? How can I solve this ODE?

• Your differential equation can be rewritten as $y'(x)=\dfrac{-x-y(x)-1}{2x+2y(x)-1}$. This is a special kind of differential equation, I think it has a name, alas I don't remember it. The solutions to these differential equations are known. The substitution suggested by David H below is standard, I believe. – Git Gud Jun 13 '14 at 22:51
• @GitGud What is special about that, or what is the general form for that kind of differential equiations? – José D. Jun 13 '14 at 22:52
• I meant equations of the form $y'(x)=\dfrac{ax+by(x)+C}{Ax+By(x)+D}$. – Git Gud Jun 13 '14 at 22:53
• Oh, now I recall those. Thanks @GitGud =D – José D. Jun 13 '14 at 22:54

Hint: substitute $w(x)=y(x)+x$.

• Thanks for the suggestion, is there any way to do it with integration factor, though? – José D. Jun 13 '14 at 22:46
• Yes, an integrating factor exists. The problem is that this integrating factor will be a function of two variables instead of one, and to figure out what it is you have to solve a PDE instead of an ODE. In other words, to solve your ODE by integrating factors you must first solve a much, much more complicated problem. – David H Jun 13 '14 at 23:05
• I have read my theory again and now it does make sense. Thanks! – José D. Jun 14 '14 at 0:06


$$\mbox{With}\quad x \equiv u + v\quad\mbox{and}\quad y \equiv u - v\quad \mbox{you'll get}\quad {3u \over 1 - u}\,\dd u + \dd v = 0$$