How to solve $y''(x) - \frac{2}{x^2} y(x) = 0$ by separation of variables? 
How to solve $y''(x) - \frac{2}{x^2} y(x) = 0$ by separation of
  variables ?

First of all, is it possible ? Secondly, if so, how ?
Note that, this ODE can be solved by other methods also, or you can even guess the solutions, (for example $x^2$ and $x^{-1}$ satisfies ODE), but I'm particularly interested in how it can be solve by the method of separation of variables.
 A: Take $y=x^2u$ and substitute:
$$y^{'}=2xu+x^2u^{'}\to y^{"}=2u+4xu^{'}+x^2u^{"}$$
therefore we have:
$$4xu^{'}+x^2u^{"}=0\to 4u^{'}+xu^{"}=0\to {{u^{"}}\over{u^{'}}}=-{4\over x}\to lnu^{'}=-4lnx+C_1\to u^{'}={{C_1}\over {x^4}}\to u={{C_1}\over {x^3}}+C_2$$
and the final answer is
$$y={{C_1}\over {x}}+{{C_2}{x^2}}$$
A: Separation of variables is a technique for first-order ODE. It will not work for second order ODE. Most ODE of the form $y''+f(x)y=0$ are not solvable symbolically (apart from giving fancy names to solutions of normal forms of these equations). For the most famous example look under Airy equation.

However,
$$
x^2y''-2y=0
$$
is an Euler-Cauchy ODE. As such you can find basis solution using the form $y=x^m$ which inserted leads to
$$
m(m-1)-2=0\iff (m+1)(m-2)=0
$$
so that all solutions are of the form
$$
y=C_1x^{-1}+C_2x^2.
$$
A: Because there are $2$ answers that show $2$ different ways i will post another very commonly used way

rewrite the equation: $x^2y''-2y=0$
set $t=\ln(x),\phi(t)=\phi(\ln(x))=y(x)$
from there we get $$\dfrac{d\phi}{dx}=\frac1x\frac{d\phi}{dt}\\\dfrac{d^2\phi}{dx^2}=\frac1{x^2}\left(\frac{d^2\phi}{dt^2}-\frac{d\phi}{dt}\right)$$
let's return to the original equation and put $\phi,\phi''$ instead of $y,y''$:$$x^2y''-2y=x^2\frac1{x^2}\left(\phi''-\phi'\right)-2\phi=\phi''-\phi'-2\phi=0$$this is a simple second-order ODE, we solve this and get $\phi(t)=c_1e^{-t}+c_2e^{2t}$ we remember that $t=\ln(x)$ to get $$\boxed{y(x)=c_1x^{-1}+c_2x^2}$$
