Compute $\int_{-\infty}^{\infty} x^2e^{-x^2} \,dx$ $$\int_{-\infty}^{\infty} x^2e^{-x^2} \,dx$$
$g(x) = x^2e^{-x^2}$
Well, After computing it's fourier transform, which is $g(w) =\frac{2-w^2}{8\sqrt\pi}\cdot e^{\frac{-w^2}{4}}$.
In the solution they used some formula and said that:
$\int_{-\infty}^{\infty} x^2e^{-x^2} \,dx = 2\pi g(0) = \frac{\sqrt\pi}{2}$.
Well I don't understand what formula they used, and why did they make it $w = 0$. I thought about the $g(x) = \int_{-\infty}^{\infty} g(w)e^{iwx} dw$ and $w=0$. which didn't quite work..
Edit: I think I solved it. used the definiton $\frac{1}{2\pi}\int_{-\infty}^{\infty} g(x)e^{iwx} dx = g(w)$

Just for fun, here's a method that completely sidesteps integration by parts.
\begin{align}
\int_{-\infty}^\infty x^2e^{-x^2}dx&=-\int_{-\infty}^\infty\frac{\partial}{\partial\mu}e^{-\mu x^2}dx\bigg\vert_{\mu=1}\\
&=-\frac{d}{d\mu}\int_{-\infty}^\infty e^{-\mu x^2}dx\bigg\vert_{\mu=1}\\
&=-\sqrt{\pi}\frac{d}{d\mu}\left(\frac{1}{\sqrt{\mu}}\right)\bigg\vert_{\mu=1}\\
&=\frac{\sqrt{\pi}}{2\mu^{3/2}}\bigg\vert_{\mu=1}\\
&=\frac{\sqrt{\pi}}{2}
\end{align}
As with Jack's method, you only need to know the Gaussian integral.
