Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Appendix C. Gaussian Integrals

The Main Results

The most common Gaussian integral encountered in practice is

∫−∞+∞dx e−ax2=πa,\int_{-\infty}^{+\infty} dx\, e^{-ax^2} = {\sqrt{\pi} \over \sqrt{a}},

where aa is real and a>0a>0. The integral does not exist (it diverges) if a≤0a\le0.

Another common form is when the exponent is purely imaginary. In this case we have

∫−∞+∞dx eicx2=eisπ/4 π∣c∣,\int_{-\infty}^{+\infty} dx\, e^{icx^2} = e^{is\pi/4} \, {\sqrt{\pi} \over \sqrt{|c|}},

where cc is real and c≠0c\ne0, and where s=sgn⁡c=±1s=\sgn c=\pm1. The integral does not exist (it diverges) if c=0c=0. Notice that (2) is a special case of (1) if aa is allowed to be complex, if we set a=−ica=-ic, and if a=−ic\sqrt{a} = \sqrt{-ic} is interpreted according to

−ic={e−iπ/4∣c∣,c>0,eiπ/4∣c∣,c<0.\begin{aligned} \sqrt{-ic} = \begin{cases} e^{-i\pi/4} \sqrt{|c|}, & c>0, \\ e^{i\pi/4} \sqrt{|c|}, & c<0. \\\end{cases} \end{aligned}

If we allow aa in (1) to be an arbitrary complex number, then the integral converges exponentially if Re⁡a>0\Re a>0. If Re⁡a<0\Re a <0 then the integrand diverges exponentially and the integral is not defined. The case Re⁡a=0\Re a=0 is the marginal case. If Re⁡a=0\Re a=0 and Im⁡a≠0\Im a \ne 0, then the integrand oscillates with a sequence of positive and negative lobes with decreasing area as xx increases, so the integral converges. Finally, if Re⁡a=0\Re a=0 and Im⁡a=0\Im a=0 (that is, a=0a=0), then the integral does not converge. In summary, the integral converges everywhere to the right of the imaginary axis in the complex aa-plane, and on the imaginary axis except at a=0a=0.

If aa is a complex number such that the integral (1) converges, then the answer is still given by (1), as long as a\sqrt{a} is interpreted in the following sense. We write

a=∣a∣eiϕ,a = |a| e^{i\phi},

where −π/2≤ϕ≤π/2-\pi/2 \le \phi \le \pi/2, and we define

a=eiϕ/2 ∣a∣.\sqrt{a} = e^{i\phi/2} \, \sqrt{|a|}.

This means that of the two square roots of aa, we take the one with the positive real part.

Another common form is one with a linear term in the exponent,

∫−∞∞dx e−ax2+bx=πa eb2/4a.\int_{-\infty}^{\infty} dx\, e^{-ax^2+bx} = {\sqrt{\pi}\over \sqrt{a}} \,e^{b^2/4a}.

The existence of this integral depends on the value of aa in the same way as the simpler integral (1), because for large xx the quadratic term in the exponent dominates. That is, aa can be any complex number to the right of the imaginary axis, or on the imaginary axis, except for a=0a=0. The convergence of the integral is independent of bb, which can be any complex number. The quantity a\sqrt{a} on the right hand side of (6) is interpreted as in (5).

The Proof

This is the standard proof, see, for example, E. B. Wilson, Advanced Calculus.

First take the case where aa is real and a>0a>0. By a change of variable a x=x′\sqrt{a}\, x=x' the answer can be expressed in terms of

I=∫−∞∞dx e−x2=∫−∞∞dy e−y2,I=\int_{-\infty}^{\infty} dx\, e^{-x^2} = \int_{-\infty}^{\infty} dy\, e^{-y^2},

where we have dropped the prime on xx in the first integral. Squaring this we have

I2=∫dx dy e−(x2+y2)=∫0∞ρ dρ∫02πdθ e−ρ2,I^2 = \int dx\,dy\, e^{-(x^2+y^2)} = \int_0^\infty \rho\,d\rho \int_0^{2\pi} d\theta\, e^{-\rho^2},

where we have switched to polar coordinates in the second integral. This integral is easily done, yielding I2=πI^2=\pi. Taking the square root and transforming back to the original variable of integration reproduces (1). The method is a special trick that is worth knowing because the result is so important.

To prove (1) in the case that aa is complex (but in the allowed region described in \secrgaussint-1) we do a change of variable,

t=a x,t=\sqrt{a}\, x,

where a\sqrt{a} is defined in (5). The contour of integration in the original integral runs along the real axis in the complex xx-plane, so after the change of variable the contour is arg⁡t=ϕ/2\arg t=\phi/2, arg⁡t=ϕ/2+π\arg t=\phi/2+\pi in the complex tt-plane. However this contour can be deformed to run along the real tt-axis, whereupon the integral is reduced to the form of (1) with a=1a=1. This is really an example of the method of steepest descent, an approximation method for integrals which however in this case is exact.

To prove the integral (6) we complete the square and shift origin to reproduce the form (1).

Multidimensional Gaussian Integrals

A common form of a multidimensional Gaussian integral is

∫dnx exp⁡(−xT⋅A⋅x+bT⋅x)=πn/2det⁡A exp⁡(bT⋅A−1⋅b4),\int d^nx \, \exp(-x^T\cdot A \cdot x + b^T\cdot x) = {\pi^{n/2} \over \sqrt{\det A}} \, \exp\Bigl( {b^T \cdot A^{-1} \cdot b \over 4}\Bigr),

where xx is a a real nn-vector and the range of integration is all of Rn\Reals^n, where AA is a real, n×nn\times n symmetric, positive definite matrix, where bb is an nn-vector, where TT means transpose, where xx and bb are seen as column vectors and xTx^T and bTb^T as row vectors, and where the dot indicates contractions or matrix multiplication. The vector bb is allowed to be complex.

The case where the matrix AA in (10) is purely imaginary is also common. In this case we have

∫dnx exp⁡(ixT⋅C⋅x+bT⋅x)=eiνπ/4πn/2∣det⁡C∣ exp⁡(ibT⋅C−1⋅b4).\int d^nx \, \exp(i x^T\cdot C \cdot x + b^T\cdot x) =e^{i\nu\pi/4} {\pi^{n/2} \over \sqrt{|\det C|}} \, \exp\Bigl(i {b^T \cdot C^{-1} \cdot b \over 4}\Bigr).

Here CC is a real, n×nn\times n symmetric matrix with det⁡C≠0\det C\ne0; ν\nu is an integer,

ν=ν+−ν−,\nu = \nu_+ - \nu_-,

where ν±\nu_\pm is the number of positive or negative eigenvalues of CC; and otherwise the notation is as in (10).

The case where AA in (10) is a complex symmetric matrix is more complicated but encountered less frequently, so we shall not consider it.

(10) is proved by performing an orthogonal transformation,

x=R⋅y,x = R \cdot y,

where yy is another real nn-vector and RR is an orthogonal matrix such that

RTAR=Λ,R^T A R = \Lambda,

where Λ\Lambda is diagonal. Then dnx=dnyd^nx = d^ny, and the new integral breaks up into the product of one-dimensional integrals of the form (1). (11) is proved similarly, except the resulting one-dimensional integrals have the form (2).

Moment Integrals

We present some one-dimensional integrals giving moments of Gaussian. The integral for the first moment is

∫dx xe−ax2+bx=b2a πa eb2/4a,\int dx \, x e^{-ax^2+bx} = {b\over 2a}\, {\sqrt{\pi}\over \sqrt{a}} \,e^{b^2/4a},

while the second moment is

∫dx x2e−ax2+bx=(12a+b24a2)πa eb2/4a.\int dx \, x^2 e^{-ax^2+bx} = \Bigl({1\over 2a} + {b^2\over 4a^2}\Bigr) {\sqrt{\pi}\over \sqrt{a}} \,e^{b^2/4a}.

These may be obtained by differentiating (6) with respect to aa or bb.