ODE
\[ y''(x)+y(x)=e^{2 x} \cos (x) \] ODE Classification
[[_2nd_order, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.0393135 (sec), leaf count = 36
\[\left \{\left \{y(x)\to \frac {1}{8} \left (\left (8 c_2+e^{2 x}\right ) \sin (x)+\left (8 c_1+e^{2 x}\right ) \cos (x)\right )\right \}\right \}\]
Maple ✓
cpu = 0.026 (sec), leaf count = 24
\[ \left \{ y \left ( x \right ) =\sin \left ( x \right ) {\it \_C2}+\cos \left ( x \right ) {\it \_C1}+{\frac {{{\rm e}^{2\,x}} \left ( \cos \left ( x \right ) +\sin \left ( x \right ) \right ) }{8}} \right \} \] Mathematica raw input
DSolve[y[x] + y''[x] == E^(2*x)*Cos[x],y[x],x]
Mathematica raw output
{{y[x] -> ((E^(2*x) + 8*C[1])*Cos[x] + (E^(2*x) + 8*C[2])*Sin[x])/8}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+y(x) = exp(2*x)*cos(x), y(x),'implicit')
Maple raw output
y(x) = sin(x)*_C2+cos(x)*_C1+1/8*exp(2*x)*(cos(x)+sin(x))