How to solve the homogeneous differential equation? EDITED WITH FINAL ANSWER:
Solve the following differential equation:
$$y' = \frac{2xy}{x^2-y^2}$$
Someone please help me to finish this problem.
My solution so far:
$$\frac{dy}{dx} = \frac{\frac{1}{x^2}(2xy)}{\frac{1}{x^2}(x^2-y^2)}$$
$$\frac{dy}{dx}= 2\frac{y}{x} * \frac{1}{1-{\frac{y^2}{x^2}}}$$
Let $v = \frac{y}{x}$, $y=vx$ then $\frac{dy}{dx} = v+x\frac{dv}{dx}$
$$\frac{dy}{dx} = \frac{2v}{1-v^2}$$
Setting the two equations equal to one another:
$$v+x\frac{dv}{dx} = \frac{2v}{1-v^2}$$
$$x\frac{dv}{dx} = \frac{2v}{1-v^2} - \frac{v-v^3}{1-v^2}$$
$$x\frac{dv}{dx} = \frac{v+v^3}{1-v^2}$$
$$xdv = \frac{v+v^3}{1-v^2}dx$$
$$\frac{1-v^2}{v+v^3}dv = \frac{1}{x}dx$$
$$\int\frac{1-v^2}{v+v^3}dv = \int\frac{1}{x}dx$$
$$\ln \left|v\right|-\ln \left|v^2+1\right| = ln|x| + c$$
Substituting $\frac{y}{x}$ back for $v$:
$$\ln \left|\frac{y}{x}\right|-\ln \left|\frac{y^2}{x^2}+1\right| = ln|x| + c$$
$$\ln \left|{y}\right|-\ln|x|-\ln \left|\frac{y^2}{x^2}+1\right| = ln|x| + c$$
Taking $e$ to everything we obtain:
$$y - x - (\frac{y^2}{x^2}+1) = x + e^c$$
$$y - (\frac{y^2}{x^2}+1) = 2x + e^c$$
$$y - \frac{y^2}{x^2} - 1= 2x + e^c$$
$$y - \frac{y^2}{x^2} = 2x + e^c + 1$$
$$\frac{x^2y-y^2}{x^2} = 2x + e^c + 1$$
$$x^2y-y^2 = 2x^3 + x^2e^c + x^2$$
$$0 = y^2 - x^2y + 2x^3 + x^2e^c + x^2$$
Using the quadratic formula we obtain
$$y = \frac{x^2±\sqrt{x^4-8x^3-4x^2e^c-4x^2}}{2}$$
$$y = \frac{x^2±\sqrt{x^2(x^2-8x-4e^c-4)}}{2}$$
$$y = \frac{x^2±x\sqrt{x^2-8x-4e^c-4}}{2}$$

From $\ln |v| - \ln |v^2 + 1| = \ln x + c$ we get $\ln \left|\frac{v}{v^2 + 1}\right| = \ln x + c \Rightarrow \frac{v}{1+v^2}= Ax$. So $$v = Ax + Axv^2 \Rightarrow\frac{y}{x} = Ax + A\frac{y^2}{x} \Rightarrow y = Ax^2 + Ay^2$$
And now solve for $y$ since $Ay^2 - y + Ax^2= 0 $ is a quadratic in $y$. 
