Differential equation with integrating factor 
Hey I am supposed to solve the following differential equation:
$(1-x^{2}y)dx+x^{2}(y-x)dy=0$

I found integrating factor:
$\varphi (x)=-\frac{2}{x}$
So I multiply my original equation and I got:
$\left ( \frac{1}{x^{2}} -y\right )dx+\left ( y-x \right )dy=0$
But then I try to integrate it and I got stuck. The answer should be:
$y^{2}-2xy-\frac{2}{x}=C$
Can somebody help me?
Thanks

$(1-x^2y)~dx+x^2(y-x)~dy=0$
$x^2(y-x)~dy=(x^2y-1)~dx$
$(y-x)\dfrac{dy}{dx}=y-\dfrac{1}{x^2}$
Let $u=y-x$ ,
Then $y=u+x$
$\dfrac{dy}{dx}=\dfrac{du}{dx}+1$
$\therefore u\left(\dfrac{du}{dx}+1\right)=u+x-\dfrac{1}{x^2}$
$u\dfrac{du}{dx}+u=u+x-\dfrac{1}{x^2}$
$u\dfrac{du}{dx}=x-\dfrac{1}{x^2}$
$u~du=\left(x-\dfrac{1}{x^2}\right)$
$\int u~du=\int\left(x-\dfrac{1}{x^2}\right)~dx$
$\dfrac{u^2}{2}=\dfrac{x^2}{2}+\dfrac{1}{x}+c$
$u^2=x^2+\dfrac{2}{x}+C$
$(y-x)^2=x^2+\dfrac{2}{x}+C$
$y^2-2xy+x^2=x^2+\dfrac{2}{x}+C$
$y^2-2xy=\dfrac{2}{x}+C$
