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

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

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.0128263 (sec), leaf count = 20

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

Maple
cpu = 0.013 (sec), leaf count = 16

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

y(x) = exp(x)*(_C1*x+_C2-sin(x))