Evaluate \(\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x^{2} \mathrm{e}^{-x^{2}/2} \mathrm{d}x\)

How to evaluate
\frac{1}{\sqrt{2 \pi}} \int\limits_{-\infty}^{\infty} x^{2} \mathrm{e}^{-x^{2}/2} \mathrm{d}x
was a question posed at Mathematics Stack Exchange. Here is my solution.

We begin with a slightly different integral and then use the trick of differentiating under the integral. Let
I(a) &= \int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}} \mathrm{d}x \\
&= \frac{1}{\sqrt{a}} \int\limits_{0}^{\infty} \mathrm{e}^{-y^{2}} \mathrm{d}y \\
&= \frac{\sqrt{\pi}}{2} \frac{1}{\sqrt{a}} \mathrm{erf}(y) \Big|_{0}^{\infty} \\
&= \frac{\sqrt{\pi}}{2} \frac{1}{\sqrt{a}}
We used the substitution \(y^{2} = ax^{2}\).

I &= \frac{1}{\sqrt{2 \pi}} \int\limits_{-\infty}^{\infty} x^{2} \mathrm{e}^{-x^{2}/2} \mathrm{d}x
= \frac{2}{\sqrt{2 \pi}} \int\limits_{0}^{\infty} x^{2} \mathrm{e}^{-x^{2}/2} \mathrm{d}x \\
&= -\frac{2}{\sqrt{2 \pi}} \lim_{a \to 1/2} \frac{\partial I(a)}{\partial a}
= \frac{2}{\sqrt{2 \pi}} \lim_{a \to 1/2} \int\limits_{0}^{\infty} x^{2} \mathrm{e}^{-ax^{2}} \mathrm{d}x
= \frac{2}{\sqrt{2 \pi}} \int\limits_{0}^{\infty} x^{2} \mathrm{e}^{-x^{2}/2} \mathrm{d}x \\
&= -\frac{2}{\sqrt{2 \pi}} \frac{\sqrt{\pi}}{2} \lim_{a \to 1/2} \frac{\partial}{\partial a} a^{-1/2}
= -\frac{1}{\sqrt{2}} \left(-\frac{1}{2}\right) \lim_{a \to 1/2} a^{-3/2} \\
&= 1

Leave a Reply

Your email address will not be published. Required fields are marked *