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

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

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

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

Maple raw output

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