4.45.22 y(x)2y(x)+y(x)=cos(x)

ODE
y(x)2y(x)+y(x)=cos(x) ODE Classification

[[_high_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

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

{{y(x)ex(c2x+c3e2x+c4e2xx+c1)+cos(x)4}}

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

{y(x)=cos(x)4+_C1ex+_C2ex+_C3xex+_C4xex} 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)