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

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

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.23939 (sec), leaf count = 40

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

Maple
cpu = 0.344 (sec), leaf count = 30

\[\left [y \left (x \right ) = -{\mathrm e}^{-2 x} \textit {\_C1} -\frac {3 \cos \left (x \right )}{10}+\frac {\sin \left (x \right )}{10}+\frac {{\mathrm e}^{x}}{6}+{\mathrm e}^{-x} \textit {\_C2}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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