4.45.22 \(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.0979871 (sec), leaf count = 42

\[\left \{\left \{y(x)\to e^{-x} \left (c_2 x+c_3 e^{2 x}+c_4 e^{2 x} x+c_1\right )+\frac {\cos (x)}{4}\right \}\right \}\]

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

\[ \left \{ y \left ( x \right ) ={\frac {\cos \left ( x \right ) }{4}}+{\it \_C1}\,{{\rm e}^{x}}+{\it \_C2}\,{{\rm e}^{-x}}+{\it \_C3}\,x{{\rm e}^{x}}+{\it \_C4}\,x{{\rm e}^{-x}} \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> (C[1] + x*C[2] + E^(2*x)*C[3] + E^(2*x)*x*C[4])/E^x + Cos[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/4*cos(x)+_C1*exp(x)+_C2*exp(-x)+_C3*x*exp(x)+_C4*x*exp(-x)