How to solve a differential equation $(x^2y+y^5)dx+(x^3-xy^4)dy=0$? 
Solve the following differential equation:
  $$(x^2y+y^5)dx+(x^3-xy^4)dy=0$$

I noticed that it is not exact, since:
$$
(x^2y+y^5)'_y=x^2+5y^4\ne3x^2-y^4=(x^3-xy^4)'_x
$$
Then I tried to express $y'$:
$$
y'=\frac{x^2y+y^5}{xy^4-x^3}
$$
And now I don't understand what type of differential equation it is and how to solve it.
Could someone help me?
 A: Probably, I can help a bit.
It seems to me, you can try substitution
$$
f = - \frac{1}{xy},\quad g = - \frac{y^3}{x^3}.
$$
Since
$$
df = \frac{dx}{x^2 y} + \frac{dy}{x y^2},\quad
dg = \frac{3 y^3 dx}{x^4} - \frac{3 y^2 dy}{x^3},
$$
you can write
$$
df + \frac{1}{3} dg = \frac{\left(x^2y + y^5\right)dx+ \left(x^3-x y^4\right)dy}{x^4 y^2}.
$$
Now solution should be straightforward.
A: $$(x^2y+y^5)dx+(x^3-xy^4)dy=0$$
Rearrange terms:
$$y^4(ydx-xdy)+x^2(ydx+xdy)=0$$
Divide by $x^2$:
$$-y^4d\left (\frac y x \right ) +d(xy)=0$$
Divide by $(xy)^2$ and integrate:
$$\frac {y^2}{x^2}d\left (\frac y x \right )=\dfrac {d(xy)}{x^2y^2}$$
$$\frac {y^3}{x^3}=-\dfrac {3}{xy}+C$$
Finally, multiply by $x^3y$:
$$ \boxed {{y^4}+ {3}{x^2}+Cx^3y=0}$$
A: Try the Ansatz $df=0$ with $f_x=x^ay^b(x^2y+y^5),\,f_y=x^ay^b(x^3-xy^4)$ so
$$\begin{align}0&=\frac{(f_x)_y-(f_y)_x}{x^ay^b}\\&=(b-a-2)x^2+(a+b+6)y^4\\\implies(a,\,b)&=(-4,\,-2).\end{align}$$The equations $f_x=\frac{1}{x^2y}+\frac{y^3}{x^4},\,f_y=\frac{1}{xy^2}-\frac{y^2}{x^3}$ are consistent with $f=-\frac{1}{xy}-\frac{y^3}{3x^3}$.The solution is that $f$ is constant.
