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.159916 (sec), leaf count = 26
\[\left \{\left \{y(x)\to x^3+x \left (-6+c_2 e^x\right )+c_1 e^x-12\right \}\right \}\]
Maple ✓
cpu = 0.016 (sec), leaf count = 21
\[[y \left (x \right ) = \textit {\_C2} \,{\mathrm e}^{x}+{\mathrm e}^{x} \textit {\_C1} x +x^{3}-6 x -12]\] 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))
Maple raw output
[y(x) = _C2*exp(x)+exp(x)*_C1*x+x^3-6*x-12]