Answer
$t^{2}\sin t+2t\cos t-2\sin t+C$
Work Step by Step
We use the formula $\int udv=uv-\int vdu$
with $u=t^{2}$, $dv=\cos t dt$
$\implies du=2t\,dt$, $v=\sin t$
Then $\int t^{2}\cos t\,dt=t^{2}\sin t-\int 2t\sin tdt$
Now, we should evaluate $\int 2t\sin tdt$
With $u=2t$, $dv=\sin t\,dt$
so that $du=2dt$, $v=-\cos t$
$\int 2t\sin tdt=(2t\times -\cos t)-2\int-\cos t\,dt$
$=-2t\cos t+2\sin t$
Therefore,
$\int t^{2}\cos t\,dt=t^{2}\sin t+2t\cos t-2\sin t+C$