4.26.2 \(y''(x)-3 y'(x)+2 y(x)=x^2+2 e^{-x}\)

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

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.018117 (sec), leaf count = 43

\[\left \{\left \{y(x)\to c_1 e^x+c_2 e^{2 x}+\frac {1}{4} \left (2 x^2+6 x+7\right )+\frac {e^{-x}}{3}\right \}\right \}\]

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

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

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

Mathematica raw output

{{y[x] -> 1/(3*E^x) + (7 + 6*x + 2*x^2)/4 + E^x*C[1] + E^(2*x)*C[2]}}

Maple raw input

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

Maple raw output

y(x) = 1/2*x^2+3/2*x+7/4+1/3*exp(-x)+exp(2*x)*_C1+_C2*exp(x)