4.29.26 \(x^2 y''(x)-\left (2-x^2\right ) y(x)=0\)

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.169788 (sec), leaf count = 42

\[\left \{\left \{y(x)\to -\frac {\sqrt {\frac {2}{\pi }} ((c_1 x+c_2) \cos (x)+(c_2 x-c_1) \sin (x))}{x}\right \}\right \}\]

Maple
cpu = 0.281 (sec), leaf count = 31

\[\left [y \left (x \right ) = \frac {\textit {\_C1} \left (x \cos \left (x \right )-\sin \left (x \right )\right )}{x}+\frac {\textit {\_C2} \left (\cos \left (x \right )+x \sin \left (x \right )\right )}{x}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -((Sqrt[2/Pi]*((x*C[1] + C[2])*Cos[x] + (-C[1] + x*C[2])*Sin[x]))/x)}}

Maple raw input

dsolve(x^2*diff(diff(y(x),x),x)-(-x^2+2)*y(x) = 0, y(x))

Maple raw output

[y(x) = _C1/x*(x*cos(x)-sin(x))+_C2/x*(cos(x)+x*sin(x))]