Result of $\int \limits_{-\infty}^{+\infty}x^2\times\exp\left(\dfrac{-x^2}{2}\right)\mathrm{d}x$ [duplicate]

I would like to read a very thorough and explained calculation process for a couple of integrals. For the life of me I just can't figure out the result on my own, and no resource on the web were able to help me.

First, a small question: Is a primitive of $\exp\left(\frac{-x^2}{2}\right)$, $-x\times\exp\left(\frac{-x^2}{2}\right)$ ? If so, what's the derivative ?

Now the real question. I would like to find the result of: $$\int \limits_{-\infty}^{+\infty}\exp\left(\dfrac{-x^2}{2}\right)\mathrm{d}x$$

And then, the result of: $$\int \limits_{-\infty}^{+\infty}x^2\times\exp\left(\dfrac{-x^2}{2}\right)\mathrm{d}x$$

Supposedly both are equal to $\sqrt{2\pi}$, but there's no way I can get there on my own.

marked as duplicate by Lord_Farin, Alex M., Tim Raczkowski, user147263, Yagna PatelAug 28 '15 at 22:21

• For the first integral, see: math.stackexchange.com/questions/9286/… – user940 Aug 28 '15 at 16:34
• It would be really nice if you could use the searching function first. this questions pop up nearly once a week and this annoys me a lot... – tired Aug 28 '15 at 16:35
• Even the second integral ? I'm not used to StackExchange and LaTeX, searching for LaTeX code didn't occur to me :) My bad! – James Aug 28 '15 at 16:36
• You found the gaussian-integral tag; searching by it would've shown how to do the first problem. – Ian Aug 28 '15 at 16:37
• I edited the title so it speaks about the second integral. Thanks! I'll be studying answers now. – James Aug 28 '15 at 16:41

$e^{-x^2/2}$ has no elementary antiderivative. To compute its definite integral over the line, we perform the trick:

$$\left ( \int_{-\infty}^\infty e^{-x^2/2} dx \right )^2 = \int_{-\infty}^\infty \int_{-\infty}^\infty e^{-x^2/2-y^2/2} \, dx \, dy.$$

Then we convert to polar coordinates, obtaining

$$\int_0^{2 \pi} \int_0^\infty e^{-r^2/2} r \, dr \, d \theta.$$

The inner integral can be done by a simple substitution; the key is that to substitute $u=r^2/2$ you need a factor of $r$, but the polar coordinate transformation "gives us" this factor of $r$. Then the outer integral is trivial (there is no dependence on $\theta$). Finally you finish by taking the square root of the result.

With the $x^2$, you integrate by parts with $u=x$ with $dv$ absorbing everything else, and then the problem reduces to the preceding integral.

And yes, this is a rather famous problem that would've been fairly easy to find on MSE and on Google. I went ahead and wrote up this answer largely so I could easily find it in my own history when this problem comes up again.

• Ok, I need to learn to integrate by parts, I need to learn the double integral trick whatever it's called, and I need to learn how to convert integrals to polar coordinates. I also need to learn the purpose of all three tools, rather than just knowing how to use them. Sounds like I'm in for days, without guidance =) Your reply and the comments will provide a starting point that I was lacking though, thanks! – James Aug 28 '15 at 16:51
• @James Integration by parts is important. Polar coordinate integration is important. This "product of independent integrals is the double integral of the product" trick is really not that important; this is by far the most important application I have ever seen of it. – Ian Aug 28 '15 at 16:53
• That does help setting priorities, thanks again :) I've been wondering for a while before writing this question, where was the $\pi$ from the result coming from. – James Aug 28 '15 at 17:00

Hint: Let $~I(a)=\displaystyle\int_{-\infty}^\infty e^{-ax^2}~dx,~$ and then evaluate $I'\bigg(\dfrac12\bigg)$.