# Computing the integral of $e^{-x^2}$ over the entire line [duplicate]

Possible Duplicate:
Proving $\\int_{0}^{+\\infty} e^{-x^2} dx = \\frac{\\sqrt \\pi}{2}$

At lunch with a math friend years ago, he showed me an integral whose solution was, he said, so beautiful that it compelled him to become a professional mathematician. I scribbled the integral down on a napkin, but for the life of me I cannot remember the trick he found so compelling.

And these things are hard to Google...

$$\int_{-\infty}^{\infty} e^{-x^2} dx$$

## marked as duplicate by Ross Millikan, t.b., Arturo Magidin, Zev Chonoles, yunoneApr 26 '11 at 3:47

The integral is equal to $\sqrt{\pi}$. The proof that I know (which is quite beautiful, though it may not be the same one your math friend is referring to) uses the extremely clever trick of squaring the integral we want to find, and switching to polar coordinates. See here for the details.
There is a quote, attributed to Lord Kelvin, about the fact that $\int_{-\infty}^\infty e^{-x^2}=\sqrt{\pi}$: