Find the integrating factor for the equation: $(3x+\frac{6}{y})\mathrm{d}x+(\frac{x^2}{y}+\frac{3y}{x})\mathrm{d}y=0$.
Write $P_1(x,y)=2x+\frac{6}{y}$, $Q_1(x,y)=\frac{x^2}{y}$, $P_2(x,y)=x$, and $Q_2(x,y)=\frac{3y}{x}$, then $P_1(x,y)\mathrm{d}x+Q_1(x,y)\mathrm{d}y+P_2(x,y)\mathrm{d}x+Q_2(x,y)\mathrm{d}y=0$.
For $P_1(x,y)\mathrm{d}x+Q_1(x,y)\mathrm{d}y$, notice that $\frac{1}{P_1(x,y)}(\frac{\partial Q_1(x,y)}{\partial x}-\frac{\partial P_1(x,y)}{\partial y})=\frac{1}{y}$, and the integrating factor for this part is $\mu_1(y)=\mathrm{e}^{\int\frac{1}{y}\mathrm{d}y}=y$. Hence, by computing $\int_{x_0}^x\mu_1(y)P_1(x,y)\mathrm{d}x+\int_{y_0}^y\mu_1(y)Q_1(x_0,y)\mathrm{d}y$, one obtains $\Phi_1(x,y)=x^2y+6x$.
Similary, for $P_2(x,y)\mathrm{d}x+Q_2(x,y)\mathrm{d}y$, notice that $\frac{1}{Q_2(x,y)}(\frac{\partial P_2(x,y)}{\partial y}-\frac{\partial Q_2(x,y)}{\partial x})=\frac{1}{x}$, and the integrating factor for this part is $\mu_2(x)=\mathrm{e}^{\int\frac{1}{x}\mathrm{d}x}=x$. Hence, by computing $\int_{x_0}^x\mu_2(y)P_2(x,y)\mathrm{d}x+\int_{y_0}^y\mu_2(y)Q_2(x_0,y)\mathrm{d}y$, one obtains $\Phi_2(x,y)=\frac{x^3}{3}+\frac{3y^2}{2}$.
In order to find the integrating factor for the whole equation, one needs to find two smooth functions $g_1(t)$ and $g_2(t)$ such that $\mu_1g_1(\Phi_1(x,y))=\mu_2g_2(\Phi_2(x,y))$, i.e., $yg_1(x^2y+6x)=xg_2(\frac{x^3}{3}+\frac{3y^2}{2})$.
However, it seems impossible, does not it?
The integrating factor is $xy$.
$$ (3x^2y+6x)\,dx+ (x^3+3y^2)\,dy=0$$
Because upon clearing the fractions we find the resulting equation is exact.
\begin{eqnarray} F(x,y)&=&x^3y+3x^2+c_1(y)\\ &=&x^3y+y^3+c_2(x) \end{eqnarray}
Therefore
$$ x^3y+3x^2+y^3=c$$
P.S. As a teacher I have always found these "trick" questions to be somewhat unfair. After learning a complicated method for performing some operation, the textbook slips in a question which has a simple answer if you DON'T use the complex method just learned.