Solve the Differential equation $\left(y e^{\sin x}\cos x-y^3+2xy\right)dx+\left(2e^{\sin x}-4y^2(x+1)+2x^2\right)dy=0$ Solve the equation
$$\left(y e^{\sin x}\cos x-y^3+2xy\right)dx+\left(2e^{\sin x}-4y^2(x+1)+2x^2\right)dy=0$$
My try:
Letting $e^{\sin x}=t$ we have $e^{\sin x}\cos xdx=dt$
so have modified the equation as:
$$ydt+2tdy-y^3dx-3y^2xdy+2xydx+x^2dy-y^2xdy+x^2dy-4y^2dy=0$$ $\implies$
$$ydt+tdy+tdy-d\left(y^3x\right)+d\left(x^2y\right)+(x^2-xy^2)dy=4y^2dy$$ $\implies$
$$d(ty)+tdy-d\left(y^3x\right)+d\left(x^2y\right)+(x^2-xy^2)dy=4y^2dy$$ 
any way to proceed here?

If you multiply the expression on the left-hand side by $y$, you get the exact differential,
$$ y \times \left(\left(y e^{\sin x}\cos x-y^3+2xy\right)dx+\left(2e^{\sin x}-4y^2(x+1)+2x^2\right)dy \right) =d\left( y^2 e^{\sin x} - y^4 (x + 1) + x^2 y^2\right).$$
So the solution is
$$ y^2 e^{\sin x} - y^4 (x + 1) + x^2 y^2 = {\rm constant}.$$
