[Math] Solve $y(1+xy)dx + x(1+xy+x^2y^2)dy = 0$

derivativeslinear algebraordinary differential equations

I came across this question in of my textbook, I tried solving it but i got stuck here.
Please help me complete solving it.

My approach:
For given eq I've tried to check if it's a exact differential equation but it was not. I got $\frac{\partial{M}}{\partial{y}} \ne \frac{\partial{N}}{\partial{x}}$

Then I try to reduce the given eq to exact differential equation by finding Integrating Factor (I.F).

I.F = $\frac{1}{Mx – Ny}$

Then I multiplied I.F with given equation to convert it into exact differential equation. After, I tried to check the condition $\frac{\partial{M}}{\partial{y}} = \frac{\partial{N}}{\partial{x}}$ but I got $\frac{\partial{M}}{\partial{y}} \ne \frac{\partial{N}}{\partial{x}}$.

What am I doing wrong here?

enter image description here

Best Answer

$$y(1+xy)dx + x(1+xy+x^2y^2)dy = 0\tag1$$ Comparing $(1)$ with $~Mdx+Ndy=0~$, we have $$M=y(1+xy)\qquad\text{and}\qquad N=x(1+xy+x^2y^2)$$ showing that $(1)$ is of the form $$f_1(xy)~y~dx+f_2(xy)~x~dy=0~.$$ Again $~Mx-Ny=xy(1+xy)-xy(1+xy+x^2y^2)=-x^3y^3\ne 0~$.

Hence the integrating factor (I.F.) is $~\dfrac{1}{Mx-Ny}=-\dfrac{1}{x^3y^3}~$.

Multiplying both side of $(1)$ by I.F. we have $$\dfrac{1}{x^3y^2}(1+xy)dx + \dfrac{1}{x^2y^3}(1+xy+x^2y^2)dy = 0$$ $$\left[\dfrac{1}{x^3y^2}+\dfrac{1}{x^2y}\right]dx + \left[\dfrac{1}{x^2y^3}+\dfrac{1}{xy^2}+\dfrac{1}{y}\right]dy = 0$$ $$d\left(-\dfrac{1}{2x^{2}y^{2}}-\dfrac1{xy}+\ln y\right) = 0$$ Integrating we have $$-\dfrac{1}{2x^{2}y^{2}}-\dfrac1{xy}+\ln y=c$$where $~c~$ is integrating constant.