# Gaussian integral

A graph of f(x) = ex2 and the area between the function and the x-axis, which is equal to π.

The Gaussian integral, also known as the Euler–Poisson integral, is the integral of the Gaussian function ex2 over the entire real line. It is named after the German mathematician Carl Friedrich Gauss. The integral is:

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx={\sqrt {\pi }}.}$

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

${\displaystyle \int e^{-x^}\,dx,}$

but the definite integral

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx}$

can be evaluated. The definite integral of an arbitrary Gaussian function is

${\displaystyle \int _{-\infty }^{\infty }e^{-a(x+b)^}\,dx={\sqrt {\frac {\pi }}}.}$

The Gaussian integral is encountered very often in physics and numerous generalizations of the integral are encountered in quantum field theory.

## Computation

### By polar coordinates

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:

${\displaystyle \left(\int _{-\infty }^{\infty }e^{-x^}\,dx\right)^=\int _{-\infty }^{\infty }e^{-x^}\,dx\int _{-\infty }^{\infty }e^{-y^}\,dy=\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }e^{-(x^+y^)}\,dx\,dy.}$

Consider the function e−(x2 + y2) = er2 on the plane R2, and compute its integral two ways:

1. on the one hand, by double integration in the Cartesian coordinate system, its integral is a square:
${\displaystyle \left(\int e^{-x^}\,dx\right)^;}$
2. on the other hand, by shell integration (a case of double integration in polar coordinates), its integral is computed to be π.

Comparing these two computations yields the integral, though one should take care about the improper integrals involved.

${\displaystyle {\begin\iint _{\mathbf ^}e^{-(x^+y^)}\,d(x,y)&=\int _^\int _^{\infty }e^{-r^}r\,dr\,d\theta \\&=2\pi \int _^{\infty }re^{-r^}\,dr\\&=2\pi \int _{-\infty }^{\tfrac }e^\,ds&&s=-r^\\&=\pi \int _{-\infty }^e^\,ds\\&=\pi (e^-e^{-\infty })\\&=\pi ,\end}}$

where the factor of r is the Jacobian determinant which appears because of the transform to polar coordinates (r dr  is the standard measure on the plane, expressed in polar coordinates Wikibooks:Calculus/Polar Integration#Generalization), and the substitution involves taking s = −r2, so ds = −2r dr.

Combining these yields

${\displaystyle \left(\int _{-\infty }^{\infty }e^{-x^}\,dx\right)^=\pi ,}$

so

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx={\sqrt {\pi }}}$.

#### Complete proof

To justify the improper double integrals and equating the two expressions, we begin with an approximating function:

${\displaystyle I(a)=\int _{-a}^e^{-x^}dx.}$

If the integral

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx}$

were absolutely convergent we would have that its Cauchy principal value, that is, the limit

${\displaystyle \lim _I(a)}$

would coincide with

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx.}$

To see that this is the case, consider that

${\displaystyle \int _{-\infty }^{\infty }|e^{-x^}|\,dx<\int _{-\infty }^{-1}-xe^{-x^}\,dx+\int _{-1}^e^{-x^}\,dx+\int _^{\infty }xe^{-x^}\,dx<\infty .}$

so we can compute

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx}$

by just taking the limit

${\displaystyle \lim _I(a)}$.

Taking the square of ${\displaystyle I(a)}$ yields

${\displaystyle {\beginI(a)^&=\left(\int _{-a}^e^{-x^}\,dx\right)\left(\int _{-a}^e^{-y^}\,dy\right)\\&=\int _{-a}^\left(\int _{-a}^e^{-y^}\,dy\right)\,e^{-x^}\,dx\\&=\int _{-a}^\int _{-a}^e^{-(x^+y^)}\,dy\,dx.\end}}$

Using Fubini's theorem, the above double integral can be seen as an area integral

${\displaystyle \iint _{[-a,a]\times [-a,a]}e^{-(x^+y^)}\,d(x,y),}$

taken over a square with vertices {(−aa), (aa), (a, −a), (−a, −a)} on the xy-plane.

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 ${\displaystyle I(a)^}$, and similarly the integral taken over the square's circumcircle must be greater than ${\displaystyle I(a)^}$. The integrals over the two disks can easily be computed by switching from cartesian coordinates to polar coordinates:

${\displaystyle {\beginx&=r\cos \theta \\y&=r\sin \theta \end}}$
${\displaystyle \mathbf (r,\theta )={\begin{\dfrac {\partial x}{\partial r}}&{\dfrac {\partial x}{\partial \theta }}\\[1em]{\dfrac {\partial y}{\partial r}}&{\dfrac {\partial y}{\partial \theta }}\end}={\begin\cos \theta &-r\sin \theta \\\sin \theta &r\cos \theta \end}}$
${\displaystyle d(x,y)=|J(r,\theta )|d(r,\theta )=r\,d(r,\theta ).}$
${\displaystyle \int _^\int _^re^{-r^}\,dr\,d\theta

(See to polar coordinates from Cartesian coordinates for help with polar transformation.)

Integrating,

${\displaystyle \pi (1-e^{-a^})

By the squeeze theorem, this gives the Gaussian integral

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx={\sqrt {\pi }}.}$

### By Cartesian coordinates

A different technique, which goes back to Laplace (1812),[3] is the following. Let

${\displaystyle {\beginy&=xs\\dy&=x\,ds.\end}}$

Since the limits on s as y → ±∞ depend on the sign of x, it simplifies the calculation to use the fact that ex2 is an even function, and, therefore, the integral over all real numbers is just twice the integral from zero to infinity. That is,

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}\,dx=2\int _^{\infty }e^{-x^}\,dx.}$

Thus, over the range of integration, x ≥ 0, and the variables y and s have the same limits. This yields:

${\displaystyle {\beginI^&=4\int _^{\infty }\int _^{\infty }e^{-(x^+y^)}dy\,dx\\&=4\int _^{\infty }\left(\int _^{\infty }e^{-(x^+y^)}\,dy\right)\,dx\\&=4\int _^{\infty }\left(\int _^{\infty }e^{-x^(1+s^)}x\,ds\right)\,dx\\&=4\int _^{\infty }\left(\int _^{\infty }e^{-x^(1+s^)}x\,dx\right)\,ds\\&=4\int _^{\infty }\left[{\frac {-2(1+s^)}}e^{-x^(1+s^)}\right]_^\,ds\\&=4\left({\frac }\int _^{\infty }{\frac }}\right)\\&=2{\Big [}\arctan s{\Big ]}_^{\infty }\\&=\pi .\end}}$

Therefore, ${\displaystyle I={\sqrt {\pi }}}$, as expected.

## Relation to the gamma function

The integrand is an even function,

${\displaystyle \int _{-\infty }^{\infty }e^{-x^}dx=2\int _^{\infty }e^{-x^}dx}$

Thus, after the change of variable ${\displaystyle x={\sqrt }}$, this turns into the Euler integral

${\displaystyle 2\int _^{\infty }e^{-x^}dx=2\int _^{\infty }{\frac }\ e^{-t}\ t^{-{\frac }}dt=\Gamma \left({\frac }\right)={\sqrt {\pi }}}$

where Γ is the gamma function. This shows why the factorial of a half-integer is a rational multiple of ${\displaystyle {\sqrt {\pi }}}$. More generally,

${\displaystyle \int _^{\infty }e^{-ax^}dx={\frac {\Gamma \left({\frac }\right)}}}}}$

## Generalizations

### The integral of a Gaussian function

The integral of an arbitrary Gaussian function is

${\displaystyle \int _{-\infty }^{\infty }e^{-a(x+b)^}\,dx={\sqrt {\frac {\pi }}}.}$

An alternative form is

${\displaystyle \int _{-\infty }^{\infty }e^{-ax^+bx+c}\,dx={\sqrt {\frac {\pi }}}\,e^{{\frac }}+c}.}$

This form is useful for calculating expectations of some continuous probability distributions related to the normal distribution, such as the log-normal distribution, for example.

### n-dimensional and functional generalization

Suppose A is a symmetric positive-definite (hence invertible) n × n precision matrix, which is the matrix inverse of the covariance matrix. Then,

${\displaystyle \int _{-\infty }^{\infty }\exp {\left(-{\frac }\sum \limits _^A_x_x_\right)}\,d^x=\int _{-\infty }^{\infty }\exp {\left(-{\frac }x^Ax\right)}\,d^x={\sqrt {\frac {(2\pi )^}{\det A}}}={\sqrt {\frac {\det(A/2\pi )}}}={\sqrt {\det(2\pi A^{-1})}}}$

where the integral is understood to be over Rn. This fact is applied in the study of the multivariate normal distribution.

Also,

${\displaystyle \int x_}\cdots x_}\,\exp {\left(-{\frac }\sum \limits _^A_x_x_\right)}\,d^x={\sqrt {\frac {(2\pi )^}{\det A}}}\,{\frac N!}}\,\sum _{\sigma \in S_}(A^{-1})_k_{\sigma (2)}}\cdots (A^{-1})_k_{\sigma (2N)}}}$

where σ is a permutation of and the extra factor on the right-hand side is the sum over all combinatorial pairings of of N copies of A−1.

Alternatively,[4]

${\displaystyle \int f({\vec })\exp {\left(-{\frac }\sum \limits _^A_x_x_\right)}d^x={\sqrt {(2\pi )^ \over \det A}}\,\left.\exp {\left(\sum \limits _^(A^{-1})_{\partial \over \partial x_}{\partial \over \partial x_}\right)}f({\vec })\right|_{{\vec }=0}}$

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 finite-dimensional case.[citation needed] There is still the problem, though, that ${\displaystyle (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:

${\displaystyle {\frac {\int f(x_)\cdots f(x_)\exp \left[{-\iint {\frac }A(x_,x_)f(x_)f(x_)d^x_d^x_}\right]{\mathcal }f}{\int \exp \left[{-\iint {\frac }A(x_,x_)f(x_)f(x_)d^x_d^x_}\right]{\mathcal }f}}={\frac N!}}\sum _{\sigma \in S_}A^{-1}(x_{\sigma (1)},x_{\sigma (2)})\cdots A^{-1}(x_{\sigma (2N-1)},x_{\sigma (2N)}).}$

In the DeWitt notation, the equation looks identical to the finite-dimensional case.

### n-dimensional with linear term

If A is again a symmetric positive-definite matrix, then (assuming all are column vectors)

${\displaystyle \int e^{-{\frac }\sum \limits _^A_x_x_+\sum \limits _^B_x_}d^x=\int e^{-{\frac }{\vec }^\mathbf {\vec }+{\vec }^{\vec }}d^x={\sqrt {\frac {(2\pi )^}{\det }}}e^{{\frac }{\vec }^\mathbf ^{-1}{\vec }}.}$

### Integrals of similar form

${\displaystyle \int _^{\infty }x^e^{-{\frac }}}}\,dx={\sqrt {\pi }}{\frac (2n-1)!!}}}}$
${\displaystyle \int _^{\infty }x^e^{-{\frac }}}}\,dx={\frac }a^}$
${\displaystyle \int _^{\infty }x^e^{-ax^}\,dx={\frac {(2n-1)!!}2^}}{\sqrt {\frac {\pi }}}}$
${\displaystyle \int _^{\infty }x^e^{-ax^}\,dx={\frac }}}$
${\displaystyle \int _^{\infty }x^e^{-ax^}\,dx={\frac {\Gamma ({\frac })}}}}}$

where n is a positive integer and !! denotes the double factorial.

An easy way to derive these is by parameter differentiation.

${\displaystyle {\begin\int _{-\infty }^{\infty }x^e^{-\alpha x^}\,dx&=\left(-1\right)^\int _{-\infty }^{\infty }{\frac {\partial ^}{\partial \alpha ^}}e^{-\alpha x^}\,dx~=\left(-1\right)^{\frac {\partial ^}{\partial \alpha ^}}\int _{-\infty }^{\infty }e^{-\alpha x^}\,dx\\&={\sqrt {\pi }}\left(-1\right)^{\frac {\partial ^}{\partial \alpha ^}}\alpha ^{-{\frac }}~={\sqrt {\frac {\pi }{\alpha }}}{\frac {(2n-1)!!}{\left(2\alpha \right)^}}\end}}$

One could also integrate by parts and find a recurrence relation to solve this.

### Higher-order polynomials

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]

${\displaystyle \int _{-\infty }^{\infty }e^+bx^+cx^+dx+f}\,dx={\frac }e^\sum _{\beginn,m,p=0\\n+p=0\mod 2\end}^{\infty }{\frac }}{\frac }}{\frac }}{\frac {\Gamma \left({\frac }\right)}{(-a)^{\frac }}}.}$

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.

## References

### Citations

1. ^ Stahl, Saul (April 2006). "The History of the Normal Distribution" (PDF). MAA.org. Retrieved May 25, 2018.
2. ^ Cherry, G. W. (1985). "Integration in Finite Terms with Special Functions: the Error Function". Journal of Symbolic Computation. 1 (3): 283–302. doi:10.1016/S0747-7171(85)80037-7.
3. ^ a b "The Probability Integral" (PDF).
4. ^ "Reference for Multidimensional Gaussian Integral". Stack Exchange. March 30, 2012.
5. ^ Morozov, A.; Shakirove, Sh. (2009). "Introduction to integral discriminants". Journal of High Energy Physics. 12: 002. arXiv:0903.2595. doi:10.1088/1126-6708/2009/12/002.

### Sources

• Griffiths, David. Introduction to Quantum Mechanics (2nd ed.).
• Abramowitz, M.; Stegun, I. A. Handbook of Mathematical Functions. New York: Dover Publications.