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