Solve $xdx-ydy=y^2(x^2-y^2)dy$ Question:
$$xdx-ydy=y^2(x^2-y^2)dy$$
I'm having trouble matching the solution in the book, which is $\frac{1}{2}\ln(x^2-y^2)=\frac{1}{3}y^3+C$.
I'm getting an integral that requires the incomplete gamma function.
My attempt:
Rewrite the equation:
$x + (-(x^2 - y^2) y^2 - y)\frac{dy}{dx} = 0$
This is not an exact equation, but I found the integrating factor: $μ(y) = e^{-(2 y^3)/3}$
Multiply both sides of $x + \frac{dy}{dx} (-(x^2 - y^2) y^2 - y) = 0$ by $μ(y):$
$xe^{-\frac{2}{3}y^3} + (e^{-\frac{2}{3} y^3} (y^3 - x^2 y - 1) y) \frac{dy}{dx} = 0$
Let $R(x,y) =xe^{-\frac{2}{3}y^3} $ and $S(x,y) = (e^{-\frac{2}{3} y^3} (y^3 - x^2 y - 1) y)$. So I want to seek $f(x,y)$ such that $\frac{\partial f(x,y)}{x} = R(x,y)$ and $\frac{\partial f(x,y)}{y} = S(x,y)$
Integrating w.r.t $x$:
$f(x,y) = \int xe^{-\frac{2}{3}y^3}\,dx = \frac{1}{2}x^2 e^{-\frac{2}{3}y^3} + g(y)$
$\frac{dg(y)}{dy} = e^{-\frac{2}{3}y} y (y^3 - 1)$
Integrating w.r.t $y$:
$g(y) = \int e^{-\frac{2}{3}y} y (y^3 - 1) dy = ?$
I'm stuck here.

Your way is correct.
https://www.wolframalpha.com/input?i=Integral+e%5E%7B-2%2F3y%5E3%7D%28y%5E4-y%29dy
I saw this trick:
$$\frac{d(x^2-y^2)}{x^2-y^2}=2y^2dy$$
$$\ln(x^2-y^2)=\frac{2}{3}y^3+2c$$
