Differential equation integrating factor We are asked to find the solution to this equation:
$(x^{3}-2xy)\frac{dy}{dx} + x+2y^{2}= 0$
I tried the following:
$(1)$ $$(x^{3}-2xy)dy +(x+2y^{2})dx = 0$$
Consider a function $u(x,y) = 0$
$\Rightarrow \frac{\partial u}{\partial x}dx + \frac{\partial u}{\partial y}dy = 0$
If $u$ is continuous, it would then satisfy $(1)$. Hence we require that $\frac{\partial ^{2}u}{\partial y \partial x} = \frac{\partial ^{2}u}{\partial x \partial y}$
$(x^{3}-2xy)dy +(x+2y^{2})dx = 0$
Let $F(x,y) = x+2y^{2}$, and let $G(x,y) = x^{3}-2xy$
$\Rightarrow F = \frac{\partial u}{\partial x}, G = \frac{\partial u}{\partial y}$
Then we have that $\frac{\partial F}{\partial y} = \frac{\partial ^{2}u}{\partial y \partial x}$ and $\frac{\partial G}{\partial x} = \frac{\partial ^{2}u}{\partial x \partial y}$
We require that $\frac{\partial F}{\partial y} =\frac{\partial G}{\partial x}$ for the differential equation to be exact. 
$\frac{\partial F}{\partial y} = 4y$
$\frac{\partial G}{\partial x} = 3x^{2} -2 \neq \frac{\partial F}{\partial y}$
So consider an integrating factor $\lambda (x)$:
$\frac{\partial[\lambda G]}{\partial x} = \frac{\partial[\lambda F]}{\partial y}$ 
$\Rightarrow \lambda\frac{\partial G}{\partial x} + G\frac{\partial \lambda}{\partial x} = \lambda \frac{\partial F}{\partial y}$
Edit: After reading the answers, I identified my error here (I missed out a $y$):
$\Rightarrow \lambda(3x^{2}-2\y) +(x^{3}-2xy)\frac{\partial \lambda}{\partial x} = \lambda 4y$
I don't see how to solve this equation, so I try an integrating factor $\lambda(y)$ instead:
$\lambda \frac{\partial F}{\partial y} + F\frac{\partial \lambda}{\partial y} = \lambda \frac{\partial G}{\partial x}$
$\Rightarrow 4y\lambda +(x+2y^{2})\frac{\partial \lambda}{\partial y} = \lambda(3x^{2} -2)$
Again I don't see how to solve this equation. However I know that I should be able to get an answer for $(1)$, so what am I missing? Thanks for any help. 
 A: Hint
Considering the equation $$(x^{3}-2xy)y' + x+2y^{2}= 0$$ start defining $y=z+\frac{x^2}2$ because of the first term. 
This makes the equation to be $$2 z \left(z-x z'\right)+x+\frac{x^4}{2}=0$$ Now, use $z=\sqrt u$ which makes the equation to become $$-x u'+2 u+x+\frac{x^4}{2}=0$$ which is easy to solve.
A: Write the equation in this form $(x^{3}-2xy)\mathrm dy + (x+2y^{2})\mathrm dx= 0$
Let be $F(x,y) = x+2y^{2}$ and $G(x,y)=x^3-2xy$
$\dfrac{\partial G}{\partial x}=2x^2-2y\not=4y=\dfrac{\partial F}{\partial y}$. Let be $\lambda$ the integrating factor.
Now we have $N\mathrm dy+M\mathrm dx=0$ with $N=\lambda(x^3-2xy)$ and $M=\lambda(x+2y^{2})$
$\lambda(x^{3}-2xy)\mathrm dy + \lambda(x+2y^{2})\mathrm dx= 0$ is exact, then
$N_x=\lambda_x(x^3-2xy)+\lambda(2x^2-2y)=\lambda_y(x+2y^2)+\lambda(4y)=M_y$
$\lambda_x(x^3-2xy)-\lambda_y(x+2y^2)+\lambda(3x^2-2y)-\lambda(4y)=0$
$\lambda_x(x^3-2xy)-\lambda_y(x+2y^2)+3\lambda(x^2-2y)=0$
We try as integrating factor a function of $x$ alone (as the third term times $x$ has the same factor as the first and then we can simplify a lot) $\lambda_y=0$
$\lambda_x(x^3-2xy)+\dfrac{3\lambda}{x}(x^3-2xy)=0\implies\dfrac{\mathrm d\lambda}{\mathrm dx}+\dfrac{3\lambda}{x}=0$
It's a separable ODE with solution $\lambda=c/x^3$. Our integrating factor is $1/x^3$.
Now, check $N_x$ and $M_y$
$N=(1/x^3)(x^3-2xy)=1-2y/x^2$
$M=(1/x^3)(x+2y^2)=1/x^2+2y^2/x^3$
$M_y=4y/x^3$
$N_x=4y/x^3$

Now we can solve the equation. Let be $f(x,y)=C$, then
$f_y=N=1-2y/x^2\implies f=\int(1-2y/x^2)\mathrm dy=y-y^2/x^2+g(x)$
$f_x=M=1/x^2+2y^2/x^3\implies f=\int(1/x^2+2y^2/x^3)\mathrm dx=-1/x-y^2/x^2+h(y)$
$g(x)=-1/x+c_1$ and $h(y)=y+c_2$
Finally $f(x,y)=y-y^2/x^2-1/x=C$ is the solution in implicit form.
