TITLE: Motivation of the Gaussian Integral
QUESTION [16 upvotes]: I read on Wikipedia that Laplace was the first to evaluate
$$\int\nolimits_{-\infty}^\infty e^{-x^2} \, \mathrm dx$$
Does anybody know what he was doing that lead him to that integral? Even better, can someone pose a natural problem that would lead to this integral?
Edit: Many of the answers make a connection to the normal distribution, but then the question now becomes: Where does the density function of the normal distribution come from? Mike Spivey's answer is in the spirit of what I am looking for: an explanation that a calculus student might understand.

REPLY [8 votes]: In the early 18th century, Abraham de Moivre wrote a book on probability called The Doctrine of Chances.  He wrote in English because he had fled to England to escape the persecution of Protestants in France.  He considered the probability distribution of the number of heads that appear when a fair coin is tossed $n$ times.  The exact value of the probability that number is $x$ is takes a while to compute.  The mean is $\mu=n/2$ and the standard deviation is $\sigma= \sqrt{n}/2$.  Consider
$$
\varphi(x) = (\text{some normalizing constant}) \cdot e^{-x^2/2},\text{ and }\Phi(x) = \int_{-\infty}^x \varphi(u)\,du.
$$
where the constant is chosen so that $\varphi$ integrates to 1.  de Moivre found the normalizing constant numerically, and later his friend James Stirling showed that it is $1/\sqrt{2\pi}$, which I think was stated in a later edition of de Moivre's book.  
de Moivre showed that the cumulative probability distribution of the number of heads, evaluated at $x$, approaches $F(x)=\Phi((x-\mu)/\sigma)$ as $n$ grows.  This was an early version of the central limit theorem.  The probability the the number of heads is exactly $x$ is approximated by $F(x+1/2) - F(x-1/2)$.
That is a reason to consider this function.
In the 19th century, Carl Gauss showed that least-squares estimates of regression coefficients coincide with maximum-likelihood estimates precisely if the cumulative probability distribution function (c.d.f.) of the errors is $x\mapsto\Phi(x/\sigma)$ for some $\sigma>0$.  Apparently that's how the name "Gaussian" got attached to these functions.
James Clerk Maxwell showed that if $X_1,\dots,X_n$ are independent identically distributed random variables and their probability distribution is spherically symmetric in Euclidean space, then again, the c.d.f. must be that same "Gaussian" function.