I'm supposed to find the solution of $$(xy-1)\frac{dy}{dx}+y^2=0$$ The solution in the book manipulates it to $$\frac{dx}{dy}+\frac{x}{y}=\frac{1}{y^2}$$ and proceeds to use an integrating factor to solve it to $$xy=\ln{y}+c$$ Which makes sense, but I did it by isolating the differential of y, substituting $xy=v$, and simplifying it to $$\frac{1-v}{v}dv=\frac{dx}{x}$$ which gives, on solving, $$\ln{y}+c=\ln{x^2}+\frac{y}{x}$$ Which isn't the same.
I can't see any flaw in what I did except for dividing variables throughout the equation (which I see everywhere in methods of solving differential equations, without a clue as to why.)
Can anyone help me with where I got it wrong?
EDIT: I'll add some detail on my steps; $$xy=c\\ \frac{dy}{dx}=\frac{-y^2}{xy-1}\\ x\frac{dv}{dx}=\frac{v^2}{1-v}+v=\frac{v}{1-v}\\ \frac{dx}{x}=\frac{(1-v)dv}{v}$$
From $$\frac{1-v}{v} dv =\frac{dx}{x} $$, you should get $$\ln v -v +C =\ln x \\ \ln(xy) -xy +C =\ln x \\ \ln x +\ln y -xy +C =\ln x \\ xy =\ln y +C$$
You probably mistook $v$ for $\frac yx$.