ODE
\[ y''(x)-2 y'(x)+y(x)=(x-6) x^2 \] ODE Classification
[[_2nd_order, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.00545256 (sec), leaf count = 26
\[\left \{\left \{y(x)\to x \left (c_2 e^x-6\right )+c_1 e^x+x^3-12\right \}\right \}\]
Maple ✓
cpu = 0.011 (sec), leaf count = 20
\[ \left \{ y \left ( x \right ) = \left ( {\it \_C1}\,x+{\it \_C2} \right ) {{\rm e}^{x}}+{x}^{3}-6\,x-12 \right \} \] Mathematica raw input
DSolve[y[x] - 2*y'[x] + y''[x] == (-6 + x)*x^2,y[x],x]
Mathematica raw output
{{y[x] -> -12 + x^3 + E^x*C[1] + x*(-6 + E^x*C[2])}}
Maple raw input
dsolve(diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = x^2*(x-6), y(x),'implicit')
Maple raw output
y(x) = (_C1*x+_C2)*exp(x)+x^3-6*x-12