Factorization of operators of second ODE $x^2 y'' +(2-x^3)y' - (2x+x^2)y=0$
How can I write this ODE in a factored form? 
I know who to factor second ODE with constant coefficient or Euler equation, but who can I factor this type? 
 A: Contrary to the situation with constant coefficients, a factorization of the ODE in the form $$(a_1(x)D+a_0(x))(b_1(x)D+b_0(x))y(x)=0$$ does usually not exist. And even if it exists the coefficient functions $a_k,b_k$ need not be nice.
But since this is a mathematical riddle where a nice factorization was hidden in the complicated looking formula, we can play detective and look for clues in the terms of the equation. Let's first look at the highest degree terms $$x^2y''-x^3y'-x^2y$$ and we already struck gold, as that can be combined to $x^2(y'-xy)'$. Thus set $u=y'-xy$ and replace $y$ with $u$ as much as possible,
$$
0=x^2u'+2y'-2xy=x^2u'+2u
$$
and we are already done. In combination we get the factorization
$$
(x^2D+2)(D-x)y=0.
$$
A: This is very emprical.
I tried $y=e^{kx}\,z$ and observed that nothing factors nicely. SO, I continued trying $y=e^{kx^2}\,z$ which gives
$$e^{k x^2} \left(x^2 z''(x)+\left((4 k-1) x^3+2\right) z'(x)+(2 k-1) x \left(2 k
   x^3+x+2\right) z(x)\right)=0$$ Looking at the last term, $k=\frac 12$ makes the equation
$$e^{\frac{x^2}{2}} \left(\left(x^3+2\right) z'(x)+x^2 z''(x)\right)=0\implies \left(x^3+2\right) z'(x)+x^2 z''(x)=0 $$ Now, try $z'=p$ to reduce the order.
