4.24.43 \(y''(x)+y(x)=e^x \sin (2 x)\)

ODE
\[ y''(x)+y(x)=e^x \sin (2 x) \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.111858 (sec), leaf count = 37

\[\left \{\left \{y(x)\to c_2 \sin (x)+\cos (x) \left (c_1-\frac {1}{5} e^x \sin (x)\right )-\frac {1}{5} e^x \cos (2 x)\right \}\right \}\]

Maple
cpu = 0.074 (sec), leaf count = 28

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

y(x) = sin(x)*_C2+cos(x)*_C1-1/10*exp(x)*(sin(2*x)+2*cos(2*x))