4.25.38 \(y''(x)-2 y'(x)+y(x)=e^x \left (3 x^2+2 x+1\right )\)

ODE
\[ y''(x)-2 y'(x)+y(x)=e^x \left (3 x^2+2 x+1\right ) \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.165519 (sec), leaf count = 36

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

Maple
cpu = 0.024 (sec), leaf count = 31

\[\left [y \left (x \right ) = \textit {\_C2} \,{\mathrm e}^{x}+{\mathrm e}^{x} \textit {\_C1} x +\frac {x^{2} \left (3 x^{2}+4 x +6\right ) {\mathrm e}^{x}}{12}\right ]\] Mathematica raw input

DSolve[y[x] - 2*y'[x] + y''[x] == E^x*(1 + 2*x + 3*x^2),y[x],x]

Mathematica raw output

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

Maple raw input

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

Maple raw output

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