How do you compute the following integral $\int\limits_{-\infty}^{+\infty} x^2 e^{-x^2/2} dx$?

220 Views Asked by At

I have a problem in the proof for variance of normally distributed random variable and my notes just report this:

\begin{align} & \frac{\sigma^2}{\sqrt{2\pi}}\int\limits_{-\infty}^\infty x^2e^{-\frac{x^2}{2}} \, dx = \frac{\sigma^2}{\sqrt{2\pi}}\int\limits_{-\infty}^\infty x e^{-\frac{x^2}{2}} (x \, dx) \\[10pt] = {} & \frac{\sigma^2}{\sqrt{2\pi}}\int\limits_{-\infty}^\infty -x \, d(e^{-\frac{x^2}{2}}) = \frac{\sigma^2}{\sqrt{2\pi}} \int\limits_{-\infty}^\infty -e^{\frac{x^2}{2}}\, dx = \sigma^2 \end{align}

I need to specifiy that we weren't taught how to compute Lebesgue-Stieltjes integrals and indeed we just faced its properties and basic definition. In this case I can't really understand how you build that chain of equalities, and what's the reason for them being equalities. I don't want to just write in my fair copy something I can't understand or justify...

EDIT: I forgot to say that I can tell why $\frac{1}{\sqrt{2\pi}}\int\limits_{-\infty}^{+\infty} e^{-\frac{x^2}{2}}dx = 1$ so I know how to get the last equality.

3

There are 3 best solutions below

1
On BEST ANSWER

You don't need Lebesgue Steiltje's integrals for this. If $f(x)=e^{-\frac {x^{2}} 2}$ then $f'(x)= -xe^{-\frac {x^{2}} 2}$ by chain rule. Hence the given integral is nothing but $-\int_{-\infty}^{\infty} xf'(x)\, dx$. Now integrate by parts and you will get the answer easily.

0
On

\begin{align} & \int_{-\infty}^{+\infty} x^2 e^{-x^2/2} \, dx = 2\int_0^{+\infty} x^2 e^{-x^2/2} \,dx \\[10pt] = {} & \int_0^{+\infty} (2x) e^{-x^2/2} (x\,dx) = \int_0^{+\infty} (2\sqrt {2u\,}\,) e^{-u} \, du \\[10pt] = {} & 2\sqrt 2 \, \Gamma\left(\frac 3 2 \right) = \sqrt 2\,\Gamma\left( \frac 1 2 \right) \\[10pt] = {} & \sqrt{2\pi\,}. \end{align}

3
On

Along with all the great answers - I like the differentiation under the integral method $$ \int_{-\infty}^\infty \mathrm{e}^{-ax^2} dx = \sqrt{\frac{\pi}{a}} $$ then if we take the derivative of both sides by $a$ we have $$ \lim_{a\to 1/2}\frac{d}{da}\int_{-\infty}^\infty \mathrm{e}^{-ax^2} dx = \lim_{a\to 1/2}\int_{-\infty}^\infty \frac{d}{da}\mathrm{e}^{-ax^2} dx = \lim_{a\to 1/2}\int_{-\infty}^\infty -x^2\mathrm{e}^{-ax^2}dx = \lim_{a\to 1/2}\frac{d}{da}\sqrt{\frac{\pi}{a}} $$ or $$ \int_{-\infty}^\infty -x^2\mathrm{e}^{-x^2}dx = \lim_{a\to 1/2}\frac{d}{da}\sqrt{\pi}a^{-1/2} = \lim_{a\to 1/2}\frac{d}{da}\frac{-1}{2}\sqrt{\pi}a^{-3/2} $$ or $$ \int_{-\infty}^\infty -x^2\mathrm{e}^{-\frac{x^2}{2}}dx = -\frac{1}{2}\lim_{a\to 1/2}\sqrt{\frac{\pi}{a}} \frac{1}{a} = -\frac{1}{2}\sqrt{2\pi}\cdot 2 = -\sqrt{2\pi} $$ and finally $$ \int_{-\infty}^\infty x^2\mathrm{e}^{-\frac{x^2}{2}}dx = \sqrt{2\pi} $$