# Ask for different ways to solve $(x+y)dy+(y+1)dx=0$

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

Rewrite the equation to $\frac{dx}{dy}+\frac{x}{y+1}=\frac{-y}{y+1}$

I can use used the integrating factor $μ(y)=e^{-\int\frac{1}{y+1}dy}$ to solve it.

The answer is $x=\frac{-y^2}{2(y+1)}+\frac{C}{y+1}$

I'm curious that are there any other methods to solve this ODE. I am asking for a different method because sometimes I am not able(or haven't enough time, this one costs me about half an hour to solve it ) to rewrite the equation into a proper form. So, if I could obtain other methods to solve this kind of ODEs, I may have more chances to solve it in a exam.

• it should be $y(x)=x\pm \sqrt{x2+2x+C}$$– Dr. Sonnhard Graubner Nov 27 '15 at 15:22 ## 2 Answers See that we can write as$$(x+y)dy+(y+1)dx=0xdy+ydx+ydy+dx=0d(xy)+ydy+dx=0$$now just integrate. • Nice catch:) +1 – Rowan Nov 27 '15 at 15:21 • Plain and straightforward as long as one can see it. +1 – Shailesh Nov 27 '15 at 16:42 Notice, the given D.E. can be easily solved by exact differential form as follows$$(y+1)dx+(x+y)dy=0$$Now, comparing the above equation with Mdx+Ndy=0, we get$$M=y+1\implies \frac{\partial M}{\partial y}=1N=x+y\implies \frac{\partial N}{\partial x}=1$$since, \frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}, hence the given equation is in the exact differential form, hence the solution is given as$$\int_{\text{keeping y constant}} (y+1)dx+\int_{\text{terms free of}\ x}(x+y)dy=C (y+1)\int dx+\int y\ dy=C\color{blue}{(y+1)x+\frac{y^2}{2}=C}$$• What if the case \frac{\partial M}{\partial y}\ne \frac{\partial N}{\partial x}, then we can't use this method anymore? For example,2ydy-2ydx+xdy=0 – Rowan Nov 27 '15 at 15:45 • Use Integration factor as follows$$\frac{\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}}{N}=f(x)$$or$$\frac{\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}}{M}=f(y)$$– Harish Chandra Rajpoot Nov 27 '15 at 15:49 • I use the first factor but it gives me (-2-\frac{x}{y})dx+2dy=0. Am I did it wrong? And does$$\frac{\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}}{N}=f(x)$$and$$\frac{\frac{\partial N}{\partial x}-\frac{\partial M}{\partial y}}{M}=f(y)$$a general factor that I can always use when$\frac{\partial M}{\partial y}\ne \frac{\partial N}{\partial x}\$ – Rowan Nov 27 '15 at 16:11
• Well explained. +1. – Shailesh Nov 27 '15 at 16:41