# 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$.
$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\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}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\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$$