Question:$(3x+\frac{6}{y})+(\frac{x^2}{y}+\frac{3y}{x})\frac{dy}{dx}=0$

Solution:

From question, we know that:

$M=3x+\frac{6}{y}$

$N=(\frac{x^2}{y}+\frac{3y}{x})$

so we get: $My=6$, $Nx=\frac{2x}{y}-\frac{3y}{x^2}$

Observe that $My != Nx$, want to find $\mu$ to make it exact.

Since $R1=\frac{My-Nx}{M}$not a function of y only, and neither does $R2=\frac{My-Nx}{N}$ a function of x only,

use $R=\frac{Nx-My}{xM-Ny}$

$R=\frac{\frac{2x}{y}-\frac{3y}{x^2}+\frac{6}{y^2}}{3x^2+6\frac{x}{y}-x^2-\frac{3y^2}{x}}$

$R=\frac{2x^3y-3y^3+6x^2}{2x^3y+6x^2-3y^3}\frac{xy}{x^2y^2}$

$R=\frac{1}{xy}$

then $\mu=exp{(\int R(t) dt)}$ where t=xy

i.e $\mu(xy)=xy$

multiply $\mu$ to both sides and we get:

$(3x^2y+6x)+(x^3+3y^2)\frac{dy}{dx}=0$

Then the new $M=3x^2y+6x$, $N=x^3+3y^2$

$My=3x^2$, $Nx=3x^2$ so $My=Nx$, exact

Therefore there exists a function $\varphi(x,y)$ such that $\varphi x = M$, $\varphi y=N$

$\varphi x=3x^2y+6x$, integrate and we get $\varphi(x,y)=x^3y+3x^2+h(y)$

so take the derivative over y and we get $\varphi y =x^3+h'(y)$

since $N=x^3+3y^2$, so $h'(y)=3y^2$

so $h(y)=y^3$ from integration

therefore the general solution is $\varphi(x,y)= x^3y+3x^2+y^3$

Hence the solution of given equations are given implicitly by $x^3y+3x^2+y^3=C$