Gaussian integral

Jump to: navigation, search
A graph of <math> f(x)\ = e^{-x^2}\ </math> generated by GraphCalc and the area of the f(x) with the x-axis, which equals to <math> \sqrt{\pi} </math>.

The Gaussian integral, or probability integral, is the improper integral of the Gaussian function <math>e^{{-x}^2}</math> over the entire real line. It is named after the German mathematician and physicist Carl Friedrich Gauss, and the equation is:

<math>\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}</math>

This integral has wide applications including normalization in probability theory and continuous Fourier transform. It also appears in the definition of the error function.

Although no elementary function exists for the error function, as can be proven by the Risch algorithm, the Gaussian integral can be solved analytically through the tools of calculus. That is, there is no elementary indefinite integral for <math>\int e^{-x^2}\,dx</math>, but the definite integral <math>\int_{-\infty}^\infty e^{-x^2}\,dx</math> can be evaluated.


A standard way to compute the Gaussian integral is

  • consider the function <math>e^{-(x^2+y^2)}=e^{-r^2}</math> on the plane <math>\mathbf{R}^2</math>, and compute its integral two ways:
  • on the one hand, by double integration in the Cartesian coordinate system, its integral is a square: <math>\left(\int e^{-x^2}\,dx\right)^2</math>;
  • on the other hand, by shell integration (a case of double integration in polar coordinates), its integral is computed to be <math>\pi</math>.

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

Brief proof

Briefly, one computes that on the one hand,


\int_{\mathbf{R}^2} e^{-(x^2+y^2)}\,dx\,dy

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


On the other hand,


\int_{\mathbf{R}^2} e^{-(x^2+y^2)}\,dx\,dy &= \int_0^{2\pi} \int_0^{\infin} re^{-r^2}\,dr\,d\theta\\ &= 2\pi \int_0^\infty re^{-r^2}\,dr\\ &= 2\pi \int_{-\infty}^0 \frac{1}{2} e^s\,ds = \pi \int_{-\infty}^0 e^s\,ds = \pi (e^0 - e^{-\infty}) = \pi (1 - 0) = \pi, \end{align}</math> where the factor of <math>r</math> comes from the transform to polar coordinates (<math>r\,dr\,d\theta</math> is the standard measure on the plane, expressed in polar coordinates), and the substitution involves taking <math>s=-r^2</math>, so <math>ds=-2r\,dr</math>.

Combining these yields <math>\left ( \int_{-\infty}^\infty e^{-x^2}\,dx \right )^2=\pi</math>, so <math>\int_{-\infty}^\infty e^{-x^2}\,dx=\sqrt{\pi}</math>.

Careful proof

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

<math>I(a)=\int_{-a}^a e^{-x^2}dx.</math>

so that the integral may be found by

<math>\lim_{a\to\infty} I(a) = \int_{-\infty}^{\infty} e^{-x^2}\, dx.</math>

Taking the square of I yields

<math>I^2(a)= \left ( \int_{-a}^a e^{-x^2}\, dx \right )\cdot \left ( \int_{-a}^a e^{-y^2}\, dy \right )= \int_{-a}^a \left ( \int_{-a}^a e^{-y^2}\, dy \right )\,e^{-x^2}\, dx = \int_{-a}^a \int_{-a}^a e^{-(x^2+y^2)}\,dx\,dy.</math>

Using Fubini's theorem, the above double integral can be seen as an area integral <math>\int e^{-(x^2+y^2)}\,d(x,y)</math>, taken over a square with vertices {(−a, a), (a, a), (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 <math>I(a)^2</math>, and similarly the integral taken over the square's circumcircle must be greater than <math>I(a)^2</math>. The integrals over the two disks can easily be computed by switching from cartesian coordinates to polar coordinates: <math>x=r\,\cos \theta</math>, <math>y= r\,\sin\theta</math>, <math>d(x,y) = r\, d(r,\theta)</math>:

<math>\int_0^{2\pi}\int_0^a re^{-r^2}\,dr\,d\theta < I^2(a) < \int_0^{2\pi}\int_0^{a\sqrt{2}} re^{-r^2}\,dr\,d\theta.</math>

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


<math> \pi (1-e^{-a^2}) < I^2(a) < \pi (1 - e^{-2a^2}). </math>

By the squeeze theorem, this gives the Gaussian integral

<math>\int_{-\infty}^\infty e^{-x^2}\, dx = \sqrt{\pi}.</math>

Relation to the gamma function

Since the integrand is an even function,

<math>\int_{-\infty}^{\infty} e^{-x^2} dx = 2 \int_0^\infty e^{-x^2} dx</math>

which, after a change of variable, turns into the Euler integral

<math>\int_0^\infty e^{-t} \ t^{-1/2} dt \, = \, \Gamma\left(\frac{1}{2}\right)</math>

where Γ is the gamma function. This shows why the factorial of a half-integer is a rational multiple of <math>\sqrt \pi</math>. More generally,

<math>\int_0^\infty e^{-ax^b} dx = a^{-1/b} \, \Gamma\left(1+\frac{1}{b}\right).</math>


The integral of a Gaussian function

The integral of any Gaussian function is reducible in terms of the Gaussian integral

<math>\int_{-\infty}^{\infty} ae^{-(x+b)^2/c^2}\,dx.</math>

The constant a can be factored out of the integral. Replacing x with y - b yields

<math>a\int_{-\infty}^\infty e^{-y^2/c^2}\,dy.</math>

Substituting y with cz gives

<math>a |c| \int_{-\infty}^\infty e^{-z^2}\,dz</math>
<math>=a |c| \sqrt{\pi}.</math>

n-dimensional and functional generalization

Suppose A is a symmetric positive-definite invertible covariant tensor of rank two. Then,


\int \exp\left( - \frac 1 2 A_{ij} x^i x^j \right) d^nx = \sqrt{\frac{(2\pi)^n}{\det A}} </math>

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



\int x^{k_1}\cdots x^{k_{2N}} \, \exp\left( - \frac 1 2 A_{ij} x^i x^j \right) d^nx = \sqrt{\frac{(2\pi)^n}{\det A}} \, \frac{1}{2^N N!} \, \sum_{\sigma \in S_{2N}}(A^{-1})^{k_{\sigma(1)}k_{\sigma(2)}} \cdots (A^{-1})^{k_{\sigma(2N-1)}k_{\sigma(2N)}} </math>

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



\int f(\vec x) \, \exp\left( - \frac 1 2 A_{ij} x^i x^j \right) d^nx = \sqrt{(2\pi)^n\over \det{A}} \, \left. \exp\left({1\over 2}(A^{-1})^{ij}{\partial \over \partial x^i}{\partial \over \partial x^j}\right)f(\vec{x})\right|_{\vec{x}=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. There is still the problem, though, that <math>(2\pi)^\infty</math> is infinite and also, the functional determinant would also be infinite in general. This can be taken care of if we only consider ratios:

<math>\frac{\int f(x_1)\cdots f(x_{2N}) e^{-\iint \frac{A(x_{2N+1},x_{2N+2}) f(x_{2N+1}) f(x_{2N+2})}{2} d^dx_{2N+1} d^dx_{2N+2}} \mathcal{D}f}{\int e^{-\iint \frac{A(x_{2N+1},x_{2N+2}) f(x_{2N+1}) f(x_{2N+2})}{2} d^dx_{2N+1} d^dx_{2N+2}} \mathcal{D}f},</math>
<math>=\frac{1}{2^N N!}\sum_{\sigma \in S_{2N}}A^{-1}(x_{\sigma(1)},x_{\sigma(2)})\cdots A^{-1}(x_{\sigma(2N-1)},x_{\sigma(2N)}).</math>

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

n-dimensional with linear term

Once again A is a symmetric matrix, then

<math>\int e^{-A_{ij} x^i x^j+B_i x_i} d^nx=\sqrt{ \frac{\pi^n}{\det{A}} }e^{\frac{1}{4}B^TA^{-1}B}.</math>

Integrals of similar form


&\int_0^\infty x^{2n} e^{-x^2/a^2}\,dx

 &&= \sqrt{\pi} \frac{(2n)!}{n!} \left(\frac{a}{2}\right)^{2n+1} \\

&\int_0^\infty x^{2n+1}e^{-x^2/a^2}\,dx

 &&= \frac{n!}{2} a^{2n+2}


Beyond Gaussian Integrals

Exponentials of other even polynomials can easily be solved using series. For example the solution to the integral of the exponential of a quartic polynomial is:

<math> \int_{-\infty}^{\infty}{\exp({a x^4+b x^3+c x^2+d x+f})dx} = e^f\sum_{n,m,p=0}^{\infty}{ \frac{ b^{4n}}{(4n)!}\frac{c^{2m}}{(2m)!}\frac{d^{4p}}{(4p)!} \frac{ \Gamma(3n+m+p+\frac14) }{a^{3n+m+p+\frac14} } } </math>

These integrals turn up in subjects such as quantum field theory.


cs:Gaussův integrál de:Fehlerintegralit:Integrale di Gauss