Differential equation with partial fraction How do you separate this differential equation into a partial fraction?

Solve the following differential equation:
$$\frac{dy}{dx}=\frac{2y^2-xy+x^2}{xy-x^2}$$


Let $\frac{y}{x}=v$
$$\frac{{\rm d}y}{{\rm d}x} = v + x\frac{{\rm d}v}{{\rm d}x} =\frac{2v^2-v+1}{v-1} \\
x\frac{{\rm d}v}{{\rm d}x} = \frac{v^2+1}{v-1} \\
\frac{v-1}{v^2+1}dv = \frac {{\rm d}x}{x} \\
\text{Integrating  both  sides} \\
\int \frac{v-1}{v^2+1}dv =\int \frac {{\rm d}x}{x} \\
\int \frac{v}{v^2+1}dv - \int \frac{1}{v^2+1}dv= \frac {{\rm d}x}{x} \\
\frac{1}{2} \ln(v^2+1) - \tan^{-1}v = lnx + C\\
\frac{1}{2} \ln \left(\frac{y^2+x^2}{x^4}\right) = \tan^{-1}\left( \frac{y}{x}\right) + C $$
Where $C$ is the constant of integration.
