To solve
$$I=\int^\infty_{-\infty} x^2 e^{-x^2} dx,$$
consider
$$I_s=\int^\infty_{-\infty} e^{-sx^2} dx=\sqrt\frac{\pi}{s}.$$
Since
\begin{align*} \frac{d}{ds}I_s &=\int^\infty_{-\infty} \frac{\partial}{\partial s}e^{-sx^2} dx \\ \\ &=\int^\infty_{-\infty} -x^2 e^{-sx^2}, \end{align*}
\begin{align*} I=\left. -\frac{d}{ds}I_s \right|_{s=1} \end{align*}
Hence,
\begin{align*} I &=\left. -\frac{d}{ds}I_s \right|_{s=1} \\ \\\ &= \left. -\frac{d}{ds}\sqrt\frac{\pi}{s} \right|_{s=1} =\left. \frac{\sqrt{\pi}}{2}s^{-3/2} \right|_{s=1}=\frac{\sqrt{\pi}}{2}.\end{align*}
p.s.
물론 $x$와 $xe^{-x^2}$으로 부분적분해도 풀린다. -_-;;