4.45.21 \(y''''(x)+2 y''(x)+y(x)=\cos (x)\)

ODE
\[ y''''(x)+2 y''(x)+y(x)=\cos (x) \] ODE Classification

[[_high_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.0580983 (sec), leaf count = 43

\[\left \{\left \{y(x)\to \left (c_2 x+c_1-\frac {x^2}{8}+\frac {5}{16}\right ) \cos (x)+\frac {1}{4} \left (4 c_4 x+4 c_3+x\right ) \sin (x)\right \}\right \}\]

Maple
cpu = 0.164 (sec), leaf count = 33

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

DSolve[y[x] + 2*y''[x] + y''''[x] == Cos[x],y[x],x]

Mathematica raw output

{{y[x] -> (5/16 - x^2/8 + C[1] + x*C[2])*Cos[x] + ((x + 4*C[3] + 4*x*C[4])*Sin[x
])/4}}

Maple raw input

dsolve(diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(y(x),x),x)+y(x) = cos(x), y(x),'implicit')

Maple raw output

y(x) = 1/8*(8*_C3*x-x^2+8*_C1+2)*cos(x)+sin(x)*((_C4+3/8)*x+_C2)