Consider the ODE
$$y'' + y'/x - y / x^2 = 0.$$
If I were the apply the method of reduction of order to this ODE, knowing that $y(x) = x$ is a solution of this hom. ODE.
$$y_g (x) = u x \\ y' = u' x + u \\ y'' = u'' x + u' + u' \\ \Rightarrow u'' x + 3 u' = 0.$$
Setting $w = u'$, $$w' + 3w = 0 \Rightarrow w = e^{-3x} + c_1 \\ \Rightarrow u = e^{-3x} + c_1 x + c_2,$$ so $$y_g (x) = x e^{-3x} + c_1x^2 + c_2 x.$$
However, it is clear that $x^2$ is not a solution of this hom. ODE. Moreover, we have a term $x e^{-3x}$, which does not contain any arbitrary constant, and cannot be generated by the solutions of this hom. ODE.
My question is that, what this method does not work in this case ?
I mean if the method works in the inhomogeneous case, it should also work in the homogeneous case, since the latter is a special case of the former, so what went wrong ?
Hint $$ \begin{align} y_g (x) &= u x \\ y' &= u' x + u \\ y'' &= u'' x + u' + u' \\ \Rightarrow u'' x + 3 u' &= 0. \end{align} $$
It should be : $$w'x+3w=0$$ $$w=\frac K{x^3}$$ $$u=K\int \frac {dx}{x^3}=\frac {K_1}{x^2}+K_2$$ $$....$$