4.29.27 \(x^2 y''(x)-\left (2-x^2\right ) y(x)=x^4\)

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

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.062428 (sec), leaf count = 53

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

Maple
cpu = 0.051 (sec), leaf count = 30

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

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

Mathematica raw output

{{y[x] -> (x^3 - Sqrt[2/Pi]*(x*C[1] + C[2])*Cos[x] + Sqrt[2/Pi]*(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) = x^4, y(x),'implicit')

Maple raw output

y(x) = ((_C2*x+_C1)*cos(x)+(_C1*x-_C2)*sin(x)+x^3)/x