# 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

## 2 Answers

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

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}{\left\vert #1\right\rangle} \newcommand{\ol}{\overline{#1}} \newcommand{\pars}{\left(\, #1 \,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}{\underline{#1}} \newcommand{\verts}{\left\vert\, #1 \,\right\vert} \newcommand{\wt}{\widetilde{#1}}$ $\ds{\large\tt Hint}$:

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