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.171294 (sec), leaf count = 20

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

Maple
cpu = 0.119 (sec), leaf count = 20

\[[y \left (x \right ) = \textit {\_C2} \,{\mathrm e}^{x}+{\mathrm e}^{x} \textit {\_C1} x -{\mathrm e}^{x} \sin \left (x \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))

Maple raw output

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