# Prove that $\int_{-\infty}^{\infty} x^2 e^{-\alpha x^2} dx = \frac{1}{2} \sqrt{\frac{\pi}{\alpha^3}}$

Prove that $\displaystyle\int_{-\infty}^{\infty} x^2 e^{-\alpha x^2} dx = \frac{1}{2} \sqrt{\frac{\pi}{\alpha^3}}$.

You're allowed to use the formula $\displaystyle\int_{-\infty}^{\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}$.

• Something is wrong here: if $\alpha > 0$ the left-hand side is a divergent integral and if $\alpha < 0$ the right-hand side isn't real. – Umberto P. Jun 15 '15 at 13:37
• @Umberto P.: Thanks. I forgot the minus sign. Edited. – Omega Force Jun 15 '15 at 13:45

This requires Integration by parts. Note that

$$\int u(x)v'(x) dx = u(x)v(x) - \int u'(x)v(x) dx$$

If we let $$v'(x) = -2axe^{-ax^2}$$ And we let

$$u(x) = -\frac{1}{2a}x$$

Then it is easy to see that

$$u(x)v'(x) = x^2e^{-ax^2}$$

Note that by the chain rule

$$v(x) = e^{-ax^2}$$

Thus

$$\int_{-\infty}^{\infty} x^2e^{-ax^2} = -\frac{x}{2a}e^{-ax^2} | _{-\infty}^{\infty} - \frac{1}{2a} \int_{-\infty}^{\infty} e^{ax^2} dx$$

This is equal to

$$0+\frac{1}{2a} \sqrt{\frac{\pi}{a}} = \frac{1}{2} \sqrt{\frac{\pi}{a^3}}$$

Differentiate the allowed formula once with respect to $\alpha$.

Taking the derivative of the given identiy with respect to $\alpha$: $$\int_{-\infty}^{\infty} e^{-\alpha x^2} dx = \sqrt{\frac{\pi}{\alpha}}$$ $$\implies {\partial\over\partial\alpha}\int_{-\infty}^{\infty} e^{-\alpha x^2} dx = {\partial\over\partial\alpha}\sqrt{\frac{\pi}{\alpha}}$$ $$\implies \int_{-\infty}^{\infty} {\partial\over\partial\alpha}e^{-\alpha x^2} dx = -{1\over2}\sqrt{\frac{\pi}{\alpha^3}}$$

$$\implies \int_{-\infty}^{\infty} -x^2e^{-\alpha x^2} dx = -{1\over2}\sqrt{\frac{\pi}{\alpha^3}}$$

$$\implies \int_{-\infty}^{\infty} x^2e^{-\alpha x^2} dx = {1\over2}\sqrt{\frac{\pi}{\alpha^3}}$$

• The step $$\frac{\partial}{\partial \alpha} \int_{-\infty}^\infty = \int_{-\infty}^\infty\frac{\partial}{\partial \alpha}$$ isn't trivial. – Umberto P. Jun 15 '15 at 13:55
• well no, of course not, but it works! Feel free to edit the steps in if you like... – danimal Jun 15 '15 at 13:56