4.25.44 \(y''(x)+2 y'(x)+y(x)=e^{-x} \cos (x)\)

ODE
\[ y''(x)+2 y'(x)+y(x)=e^{-x} \cos (x) \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.173601 (sec), leaf count = 22

\[\left \{\left \{y(x)\to e^{-x} (-\cos (x)+c_2 x+c_1)\right \}\right \}\]

Maple
cpu = 0.117 (sec), leaf count = 26

\[[y \left (x \right ) = {\mathrm e}^{-x} \textit {\_C2} +x \,{\mathrm e}^{-x} \textit {\_C1} -{\mathrm e}^{-x} \cos \left (x \right )]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

dsolve(diff(diff(y(x),x),x)+2*diff(y(x),x)+y(x) = exp(-x)*cos(x), y(x))

Maple raw output

[y(x) = exp(-x)*_C2+x*exp(-x)*_C1-exp(-x)*cos(x)]