Answer
\begin{aligned}
\int x^{2} e^{-x} d x =-(x^2 +2x +2)e^{x}+C
\end{aligned}
Work Step by Step
Given $$\int( x^{2} e^{-x}) d x $$
So, we have
\begin{array}{|c c c|}\hline Differentiation && {Integration} \\
\hline
x^2 & + & e^{-x} \\
&\searrow&\\ \hline
2x &- & -e^{-x} \\
&\searrow&\\ \hline
2 & + & e^{-x} \\
&\searrow&\\ \hline
0 & &-e^{-x} \\
&&\\ \hline
\end{array}
Therefore
\begin{aligned}
I&=\int x^{2} e^{-x} d x\\
&= -x^2e^{-x}-2xe^{-x}-2e^{x}+C\\
&=-(x^2 +2x +2)e^{x}+C
\end{aligned}