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.16696 (sec), leaf count = 72

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

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

\[[y \left (x \right ) = \textit {\_C1} \left (x -2\right )+\textit {\_C2} \,{\mathrm e}^{-x} \left (2+x \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))

Maple raw output

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