4.28.31 \(x y''(x)-(2-x) y'(x)-y(x)=0\)

ODE
\[ x y''(x)-(2-x) y'(x)-y(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.0573575 (sec), leaf count = 72

\[\left \{\left \{y(x)\to -\frac {2 e^{-x/2} \sqrt {x} \left (\left (c_1 x+2 i c_2\right ) \cosh \left (\frac {x}{2}\right )-\left (2 c_1+i c_2 x\right ) \sinh \left (\frac {x}{2}\right )\right )}{\sqrt {\pi } \sqrt {-i x}}\right \}\right \}\]

Maple
cpu = 0.047 (sec), leaf count = 19

\[ \left \{ y \left ( x \right ) ={\it \_C1}\, \left ( x-2 \right ) +{\it \_C2}\,{{\rm e}^{-x}} \left ( 2+x \right ) \right \} \] Mathematica raw input

DSolve[-y[x] - (2 - x)*y'[x] + x*y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> (-2*Sqrt[x]*((x*C[1] + (2*I)*C[2])*Cosh[x/2] - (2*C[1] + I*x*C[2])*Sin
h[x/2]))/(E^(x/2)*Sqrt[Pi]*Sqrt[(-I)*x])}}

Maple raw input

dsolve(x*diff(diff(y(x),x),x)-(2-x)*diff(y(x),x)-y(x) = 0, y(x),'implicit')

Maple raw output

y(x) = _C1*(x-2)+_C2*exp(-x)*(2+x)