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

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

Maple
cpu = 0.023 (sec), leaf count = 29

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

Maple raw output

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