4.24.38 \(y''(x)+y(x)=4 x \sin (x)\)

ODE
\[ y''(x)+y(x)=4 x \sin (x) \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.0212413 (sec), leaf count = 27

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

Maple
cpu = 0.022 (sec), leaf count = 21

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

DSolve[y[x] + y''[x] == 4*x*Sin[x],y[x],x]

Mathematica raw output

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

Maple raw input

dsolve(diff(diff(y(x),x),x)+y(x) = 4*x*sin(x), y(x),'implicit')

Maple raw output

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