The general solution of first order ODE How will i get the general solution for this
$$y' = {-y^2 \over x} + {2 y \over x}$$
I have tried and come to this far by separating and equating
$$\int {1\over-y^2+2y} dy = \int{1\over x} dx$$
which then reduces to 
$$ {-1\over2}\ln (2-y) + {\ln(y)\over2} = \ln(x)+c$$
I have tried solving this in mathematica and this is what it gives me
$$y={2x^2\over \exp(2c) + x^2}$$
I dont know how to get to the answer
 A: This is pretty simple from here.
So you have:
$$ {-1\over2}\ln (2-y) + {\ln(y)\over2} = \ln(x)+c$$
Now we add the fractions on the LHS:
$$\frac{\ln(y) - \ln(2-y)}{2} = \ln(x) + c$$
Now, using log rules:
$$\frac{\ln \left(\frac{y}{2-y} \right)}{2} = \ln(x) + c$$
Now we solve:
$$\ln\left(\frac{y}{2-y} \right) = 2\ln x + 2c$$
Raise both sides to the power of $e$:
$$\left(\frac{y}{2-y} \right) = e^{2\ln x + 2c}$$
Now, simple algebra from  here:
$$y = (2-y)e^{2\ln x + 2c}$$
$$y = 2e^{2\ln x + 2c} - ye^{2\ln x + 2c}$$
$$y(1 + e^{2\ln x + 2c}) = 2e^{2\ln x + 2c}$$
$$y = \frac{2e^{2\ln x + 2c}}{1 + e^{2\ln x + 2c}}$$
We can simply further from here.
Since:
$$e^{2\ln x} = x^2$$
We can say that:
$$y = \frac{2e^{2\ln x + 2c}}{1 + e^{2\ln x + 2c}}$$
$$y = \frac{2*x^2*e^{2c}}{1 + x^2*e^{2c}}$$
If we divide both numerator and denominator by $e^{2c}$,
$$\frac{2x^2}{\frac{1}{e^{2c}} + x^2}$$
So your final answer is :
$$\frac{2x^2}{\text{exp}(-2c) + x^2}$$
NOTE
I think wolfram made an error, it should be $-2c$, not $2c$.
EDIT
I realize that the value of constant $c$ is arbitrary, so $2c$ or $-2c$ can work in this case.
