How find this ODE $y'(x)+y^2+\frac{y}{x}=\frac{4}{x^2}$ Find the ODE 
$$y'+y^2+\dfrac{y}{x}=\dfrac{4}{x^2}$$
My try: I found this solution is http://www.wolframalpha.com/input/?i=y’%2By%5E2%2By%2Fx%3D4%2Fx%5E2
so
$$x^2y'+x^2y^2+xy=4$$
tehn I can't.Thank you
 A: Knowing the solution, you could go back and eventually find the way through it.
Otherwise rewrite the equation as :
\begin{eqnarray*}
xy' + xy^2 + y &=& \frac4x\\
\frac{d(xy)}{dx} &=& \frac4x - xy^2\\
\frac{d(xy)}{dx} &=& \frac1x(4 - (xy)^2)
\end{eqnarray*}
Let $u(x) = xy(x)$, then :
$$\frac{du}{dx} = \frac1x(4-u^2)$$
This is a separable ODE, can you handle it from here?
A: You have to solve Riccati's equation $$y'+y^2+\frac{y}{x} = \frac{4}{x^2}$$
Let $y  =  \frac{v'}{v}$, which gives
$$x^2v''+xv'-4v=0$$
Assume a solution to this Euler-Cauchy equation will be proportional to $x^{\lambda}$ for some constant $\lambda$.
Substituting $v(x)  =  x^{\lambda}$ into the differential equation and simplifying we find the characteristic equation:
$$\lambda^2 -4  =  0$$
with solution $\lambda=\pm 2$.
So the general solution is 
$$
v(x)=c_1 x^{\lambda_1}+c_2 x^{\lambda_2}=\frac{c_1}{x^2}+c_2x^2
$$
and substituting back for $y$
$$y(x) = \frac{2 c_2 x^4-2 c_1}{c_2 x^5+c_1 x}= \frac{2x^4-2 c}{x^5+c x}$$
with $c=c_1/c_2$ (the constants are arbitrary).
Simplify and obtain:
$$y(x) = \frac{2}{x}-\frac{4 x^3}{x^4+c}.$$
