# Find the integrating factor and solve

Find an integrating factor and solve $$(2x^2y + x)\,dy + (xy^2 + y)\,dx = 0$$

I checked if it was exact, which it wasn't.

Then I found

$$M/Y$$ to be $$xy + 1$$

$$N/Y$$ to be $$2xy + 1,$$ but when I tried to put it in the form of

$$n N/X - mM/Y$$ I got $$-2xy,$$ which didn't really tell me much about the value of $$n$$ and $$m.$$

So I tried over by multiplying the original equation by $$x^ny^m$$ and didn't get two linear equations at the end but two equations, which still had $$xy$$ terms and am stuck now. Any help would be appreciated.

Let's do your $$x^ny^m$$ and see where we get: $$\underbrace{\left(2x^{n+2}y^{m+1}+x^{n+1}y^m\right)}_{\partial_x}\,dy+\underbrace{\left(x^{n+1}y^{m+2}+x^ny^{m+1}\right)}_{\partial_y}\,dx=0$$ \begin{align*} 2(n+2)x^{n+1}y^{m+1}+(n+1)x^ny^m&\overset{\text{set}}{=}(m+2)x^{n+1}y^{m+1}+(m+1)x^ny^m \\ 2(n+2)xy+n+1&=(m+2)xy+m+1 \\ 2(n+2)xy+n&=(m+2)xy+m. \end{align*} So the terms not multiplying $$xy$$ will have to be equal, forcing $$n=m$$. Can we get the coefficients of $$xy$$ to line up? We'd need \begin{align*} 2(n+2)&=n+2\\ 2n+4&=n+2\\ n&=-2=m. \end{align*} It works! Evidently, the integrating factor is $$\mu(x,y)=\frac{1}{x^2y^2}.$$ If you multiply through by this, you'll find the equation is now exact.
• I got the same equation as you of $2(n+2)xy + n = (m+2)xy + m$. I didn't realize you would then set the non multiplying terms and solve. I was expecting I would get something not including xy. Thanks! – bman Dec 19 '18 at 19:26