TITLE: How to solve given differential equation $(x^3y^3+x^2y^2+xy+1)ydx+(x^3y^3-x^2y^2-xy+1)xdy=0$?
QUESTION [5 upvotes]: The equation to solve is:
$$(x^3y^3+x^2y^2+xy+1)ydx+(x^3y^3-x^2y^2-xy+1)xdy=0$$
I tried putting $xy=t$ but that just gave me this:
$$\frac{t^3-t^2-t+1}{t^3+t^2+t+1}dt=\frac{dx}{x}$$
I suppose there must be some clever factoring involved somewhere but I can't see it so can someone guide me on how to advance or perhaps suggest an alternate method?

REPLY [2 votes]: The given equation is of the form $f_1(xy)ydx+f_2(xy)xdy=0.$
Here, $M=(x^3y^3+x^2y^2+xy+1)y$ & $N=(x^3y^3-x^2y^2-xy+1)x$
$$\therefore I.F.=\frac1{Mx-Ny}\\
=\frac1{2x^2y^2(xy+1)}$$
$\text{Multiplying the I.F. with the equation, we get}$
\begin{align}\\
&{\begin{aligned}\\
\frac{(x^3y^3+x^2y^2+xy+1)y}{2x^2y^2(xy+1)}dx &+\frac{(x^3y^3-x^2y^2-xy+1)x}{2x^2y^2(xy+1)}dy=0
\end{aligned}}\\
&{\begin{aligned}\\
\implies\frac{(x^2y^2+1)(xy+1)}{x^2y(xy+1)}dx &+\frac{(x^2y^2-1)(xy-1)}{xy^2(xy+1)}dy=0
\end{aligned}}\\
&{\begin{aligned}\\
\implies\frac{x^2y^2+1}{x^2y}dx &+\frac{(x^2y^2-1)(xy-1)}{xy^2(xy+1)}dy=0
\end{aligned}}\\
&{\begin{aligned}\\
\implies ydx+\frac{dx}{x^2y}+&\frac{(x^2y^2-1)(xy-1)}{xy^2(xy+1)}dy=0
\end{aligned}}\\
\end{align}
$\therefore\text{the solution is}$
\begin{align}
&{\begin{aligned}\\
\int_{(\text{y const})}Mdx+ &\int(\text{terms of N not containing x}) dy=c
\end{aligned}}\\
&{\implies \int ydx+\int\frac{dx}{x^2y}=c}\\
&{\implies xy-\frac{1}{xy}=c}\\
\end{align}