Solve a non-exact ODE by a different method The following equation
$$(x^3+2xy)dx-x^2dy=0$$
is not exact, since
$$\frac{\partial M}{\partial y}=2x\ne\frac{\partial N}{\partial x}=-2x$$
I wanted to try the following then,
$$-x^2dy=-(x^3+2xy)dx$$
$$\frac{dy}{dx}=\frac{x^3+2xy}{x^2}$$
$$dy=\frac{x^3+2xy}{x^2}dx$$
$$\int dy=\int xdx+ \int \frac{2y}{x}dx$$
But the last integral, according to what I suspect does not make any sense for finding a solution to the original problem. That would mean that the answer by this approach is:
$$y=\frac{x^2}{2}+2y\ln x$$
However, this is not correct.
Any ideas how to solve this?
Thanks

$$(x^3+2xy)dx-x^2dy=0$$
$$x^3dx+ydx^2-x^2dy=0$$
$$\dfrac {dx}{x}+\dfrac  {ydx^2-x^2dy}{x^4}=0$$
$$\dfrac {dx}{x}-d  \left (\dfrac  {y}{x^2}\right)=0$$
Integrate.
