<s>[INST] 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?
 [/INST] $$(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}$$
</s>