Integral of the Gaussian function, equal to sqrt(π)
This integral from statistics and physics is not to be confused with
, a method of numerical integration.
The Gaussian integral, also known as the Euler–Poisson integral, is the integral of the Gaussian function $f\left(x\right)={e}^{{x}^{2}}$ over the entire real line. Named after the German mathematician Carl Friedrich Gauss, the integral is
Abraham de Moivre originally discovered this type of integral in 1733, while Gauss published the precise integral in 1809.^{[1]} The integral has a wide range of applications. For example, with a slight change of variables it is used to compute the normalizing constant of the normal distribution. The same integral with finite limits is closely related to both the error function and the cumulative distribution function of the normal distribution. In physics this type of integral appears frequently, for example, in quantum mechanics, to find the probability density of the ground state of the harmonic oscillator. This integral is also used in the path integral formulation, to find the propagator of the harmonic oscillator, and in statistical mechanics, to find its partition function.
Although no elementary function exists for the error function, as can be proven by the Risch algorithm,^{[2]} the Gaussian integral can be solved analytically through the methods of multivariable calculus. That is, there is no elementary indefinite integral for
but the
can be evaluated. The definite integral of an arbitrary
is
Computation
[
edit
]
By polar coordinates
[
edit
]
A standard way to compute the Gaussian integral, the idea of which goes back to Poisson,^{[3]} is to make use of the property that:
Consider the function ${e}^{\left({x}^{2}+{y}^{2}\right)}={e}^{{r}^{2}}$on the plane ${R}^{2}$, and compute its integral two ways:
 on the one hand, by double integration in the Cartesian coordinate system, its integral is a square:
${\left(\int {e}^{{x}^{2}}dx\right)}^{2};$
 on the other hand, by shell integration (a case of double integration in polar coordinates), its integral is computed to be $\pi $
Comparing these two computations yields the integral, though one should take care about the improper integrals involved.
where the factor of
r
is the
which appears because of the
transform to polar coordinates
(
r
dr
dθ
is the standard measure on the plane, expressed in polar coordinates
Wikibooks:Calculus/Polar Integration#Generalization
), and the substitution involves taking
s = −r^{2}
, so
ds = −2r dr
.
Combining these yields
so
Complete proof
[
edit
]
To justify the improper double integrals and equating the two expressions, we begin with an approximating function:
If the integral
were
we would have that its
, that is, the limit
would coincide with
To see that this is the case, consider that
So we can compute
by just taking the limit
Taking the square of $I\left(a\right)$ yields
Using Fubini’s theorem, the above double integral can be seen as an area integral
taken over a square with vertices
{(−a, a), (a, a), (a, −a), (−a, −a)}
on the
xy
–
.
Since the exponential function is greater than 0 for all real numbers, it then follows that the integral taken over the square’s incircle must be less than $I(a{)}^{2}$, and similarly the integral taken over the square’s circumcircle must be greater than $I(a{)}^{2}$. The integrals over the two disks can easily be computed by switching from Cartesian coordinates to polar coordinates:
(See to polar coordinates from Cartesian coordinates for help with polar transformation.)
Integrating,
By the squeeze theorem, this gives the Gaussian integral
By Cartesian coordinates
[
edit
]
A different technique, which goes back to Laplace (1812),^{[3]} is the following. Let
Since the limits on s as y → ±∞ depend on the sign of x, it simplifies the calculation to use the fact that e^{−x2} is an even function, and, therefore, the integral over all real numbers is just twice the integral from zero to infinity. That is,
Thus, over the range of integration, x ≥ 0, and the variables y and s have the same limits. This yields:
Then, using
to switch the
:
Therefore, $I=\sqrt{\pi}$, as expected.
In Laplace approximation, we deal only with up to secondorder terms in Taylor expansion, so we consider ${e}^{{x}^{2}}\approx 1{x}^{2}\approx (1+{x}^{2}{)}^{1}$.
In fact, since $(1+t){e}^{t}\le 1$ for all $t$, we have the exact bounds:
Then we can do the bound at Laplace approximation limit:
That is,
By trigonometric substitution, we exactly compute those two bounds: $2\sqrt{n}\left(2n\right)!!/(2n+1)!!$ and $2\sqrt{n}\left(\pi /2\right)(2n3)!!/(2n2)!!$
By taking the square root of the Wallis formula,
we have
$\sqrt{\pi}=\underset{n\to \infty}{lim}2\sqrt{n}\frac{\left(2n\right)!!}{(2n+1)!!}$
, the desired upper bound limit. Similarly we can get the desired lower bound limit.
Conversely, if we first compute the integral with one of the other methods above, we would obtain a proof of the Wallis formula.
Relation to the gamma function
[
edit
]
The integrand is an even function,
Thus, after the change of variable $x=\sqrt{t}$, this turns into the Euler integral
where $\Gamma \left(z\right)={\int}_{0}^{\infty}{t}^{z1}{e}^{t}dt$ is the gamma function. This shows why the factorial of a halfinteger is a rational multiple of $\sqrt{\pi}$. More generally,
which can be obtained by substituting
$t=a{x}^{b}$
in the integrand of the gamma function to get
$\Gamma \left(z\right)={a}^{z}b{\int}_{0}^{\infty}{x}^{bz1}{e}^{a{x}^{b}}dx$
.
Generalizations
[
edit
]
The integral of a Gaussian function
[
edit
]
The integral of an arbitrary Gaussian function is
An alternative form is
This form is useful for calculating expectations of some continuous probability distributions related to the normal distribution, such as the lognormal distribution, for example.
ndimensional and functional generalization
[
edit
]
Suppose A is a symmetric positivedefinite (hence invertible) n × n precision matrix, which is the matrix inverse of the covariance matrix. Then,
This fact is applied in the study of the multivariate normal distribution.
Also,
where
σ
is a
of
{1, …, 2N}
and the extra factor on the righthand side is the sum over all combinatorial pairings of
{1, …, 2N}
of
N
copies of
A
^{−1}
.
Alternatively,^{[4]}
for some analytic function f, provided it satisfies some appropriate bounds on its growth and some other technical criteria. (It works for some functions and fails for others. Polynomials are fine.) The exponential over a differential operator is understood as a power series.
While functional integrals have no rigorous definition (or even a nonrigorous computational one in most cases), we can define a Gaussian functional integral in analogy to the finitedimensional case.^{[citation needed]} There is still the problem, though, that $(2\pi {)}^{\infty}$ is infinite and also, the functional determinant would also be infinite in general. This can be taken care of if we only consider ratios:

$\begin{array}{c}\frac{\int f\left({x}_{1}\right)\cdots f\left({x}_{2N}\right)\mathrm{exp}\left[\iint \frac{1}{2}A({x}_{2N+1},{x}_{2N+2})f\left({x}_{2N+1}\right)f\left({x}_{2N+2}\right){d}^{d}{x}_{2N+1}{d}^{d}{x}_{2N+2}\right]Df}{\int \mathrm{exp}\left[\iint \frac{1}{2}A({x}_{2N+1},{x}_{2N+2})f\left({x}_{2N+1}\right)f\left({x}_{2N+2}\right){d}^{d}{x}_{2N+1}{d}^{d}{x}_{2N+2}\right]Df}\\ =& \frac{1}{{2}^{N}N!}\sum _{\sigma \in {S}_{2N}}{A}^{1}({x}_{\sigma \left(1\right)},{x}_{\sigma \left(2\right)})\cdots {A}^{1}({x}_{\sigma (2N1)},{x}_{\sigma \left(2N\right)}).\end{array}$
In the DeWitt notation, the equation looks identical to the finitedimensional case.
ndimensional with linear term
[
edit
]
If A is again a symmetric positivedefinite matrix, then (assuming all are column vectors)
Integrals of similar form
[
edit
]
where
$n$
is a positive integer and
$!!$
denotes the
.
An easy way to derive these is by differentiating under the integral sign.
One could also integrate by parts and find a recurrence relation to solve this.
Higherorder polynomials
[
edit
]
Applying a linear change of basis shows that the integral of the exponential of a homogeneous polynomial in n variables may depend only on SL(n)invariants of the polynomial. One such invariant is the discriminant,
zeros of which mark the singularities of the integral. However, the integral may also depend on other invariants.^{[5]}
Exponentials of other even polynomials can numerically be solved using series. These may be interpreted as formal calculations when there is no convergence. For example, the solution to the integral of the exponential of a quartic polynomial is^{[citation needed]}
The n + p = 0 mod 2 requirement is because the integral from −∞ to 0 contributes a factor of (−1)^{n+p}/2 to each term, while the integral from 0 to +∞ contributes a factor of 1/2 to each term. These integrals turn up in subjects such as quantum field theory.