PrevNext

Overview

This handout examines methods for computing Gaussian integrals and presents several practice problems relevant to physics Olympiads.

1. Motivation: Probability Distributions

To motivate the importance of Gaussian integrals, consider their most important application to probability theory used in thermodynamics. Thermodynamics considers macroscopic systems involving a large number (on the order of 102310^{23}) of atomic or molecular particles — too many to individually describe the mechanics of each particle. Fortunately, thermodynamics is often interested in "average" quantities of an entire system, rather than the specifics of individual molecules. With this in mind, the specifics of individual particles can be ignored, and instead the distribution of quantities over the entire system is considered.

The distribution of a quantity can be described with a probability density function, or PDF. For a PDF f(x)f(x), the value f(a) dxf(a)\,dx equals the probability of measuring xx between aa and a+dxa + dx:

f(a) dx=probability of finding x between a and a+dx(1.1)f(a)\,dx = \text{probability of finding } x \text{ between } a \text{ and } a + dx \tag{1.1}

The total probability of finding xx within an interval a<x<ba < x < b is just the integral from aa to bb of f(x) dxf(x)\,dx:

∫abf(x) dx=probability of finding x between a and b(1.2)\int_a^b f(x)\,dx = \text{probability of finding } x \text{ between } a \text{ and } b \tag{1.2}

Some of the most common PDFs in thermodynamics and modern physics are the Gaussian function

f(x)=Ae−αx2(1.3)f(x) = Ae^{-\alpha x^2} \tag{1.3}

and a related set of functions containing the Gaussian multiplied by a polynomial

f(x)=Axne−αx2(1.4)f(x) = Ax^n e^{-\alpha x^2} \tag{1.4}

where AA and α\alpha are parameters. A Gaussian integral is the definite integral of the Gaussian function from −∞-\infty to ∞\infty:

I=∫−∞∞Ae−αx2 dx(1.5)I = \int_{-\infty}^{\infty} Ae^{-\alpha x^2}\,dx \tag{1.5}

When finding probabilities with a Gaussian PDF, the need to compute Gaussian integrals invariably comes up as a result of Equation (1.2).

2. Gaussian Integrals

To start, consider the simple case of a Gaussian integral II with A=α=1A = \alpha = 1 in Equation (1.5):

I=∫−∞∞e−x2 dx(2.1)I = \int_{-\infty}^{\infty} e^{-x^2}\,dx \tag{2.1}

Unfortunately, the general antiderivative of e−x2e^{-x^2} cannot be expressed in terms of elementary functions. However, the specific integral in Equation (2.1) can still be evaluated with a trick using polar coordinates.

Consider two Gaussian functions of two independent variables xx and yy. From basic probability theory, the probability of finding xx in (ax,ax+dx)(a_x, a_x + dx) and yy in (ay,ay+dy)(a_y, a_y + dy) is the product of the individual probabilities:

(e−x2 dx)(e−y2 dy)=probability of finding ax<x<ax+dx and ay<y<ay+dy(2.2)\left(e^{-x^2}\,dx\right)\left(e^{-y^2}\,dy\right) = \text{probability of finding } a_x < x < a_x + dx \text{ and } a_y < y < a_y + dy \tag{2.2}

This probability, rewritten as exp⁡(−(x2+y2))×dx×dy\exp(-(x^2 + y^2)) \times dx \times dy, has the interpretation as the volume of a rectangular prism placed on the xyxy-plane. The total probability over the entire plane equals the total volume VV of the surface z=exp⁡(−(x2+y2))z = \exp(-(x^2 + y^2)) over the entire xyxy-plane.

Because xx and yy are independent variables, the total probability equals the product of the individual probabilities:

(∫−∞∞e−x2 dx)(∫−∞∞e−y2 dy)=V(2.3)\left(\int_{-\infty}^{\infty} e^{-x^2}\,dx\right)\left(\int_{-\infty}^{\infty} e^{-y^2}\,dy\right) = V \tag{2.3}

The left-hand side of Equation (2.3) is just the product of two Gaussian integrals II, so

I2=V(2.4)I^2 = V \tag{2.4}

The volume under z=exp⁡(−(x2+y2))z = \exp(-(x^2 + y^2)) is rotationally symmetric about the zz-axis, so the shell method can be used. Each shell centered on the zz-axis with radius rr has height

z=e−(x2+y2)=e−r2(2.5)z = e^{-(x^2 + y^2)} = e^{-r^2} \tag{2.5}

The shell volume dVdV is the product of height, thickness drdr, and circumference 2πr2\pi r:

dV=2πre−r2 dr(2.6)dV = 2\pi r e^{-r^2}\,dr \tag{2.6}

The total volume is then

V=∫0∞2πre−r2 dr(2.7)V = \int_0^{\infty} 2\pi r e^{-r^2}\,dr \tag{2.7}

Because polar coordinates introduce an extra rr factor, this can be solved with uu-substitution. Making the substitution u=r2u = r^2:

V=∫0∞2πr2re−u du=∫0∞πe−u du=−πe−u∣0∞=πV = \int_0^{\infty} \frac{2\pi r}{2r} e^{-u}\,du = \int_0^{\infty} \pi e^{-u}\,du = -\pi e^{-u}\Big|_0^{\infty} = \pi

Substituting VV into Equation (2.4) solves the Gaussian integral:

I=π(2.8)I = \sqrt{\pi} \tag{2.8}

Example 1: Show that the general Gaussian integral is

I=∫−∞∞Ae−ax2 dx=Aπa(2.9)I = \int_{-\infty}^{\infty} Ae^{-ax^2}\,dx = A\sqrt{\frac{\pi}{a}} \tag{2.9}

Solution 1: Applying the polar substitution trick, the integral II boils down to finding the volume under the surface

I2=A2∫0∞2πre−ar2 dr(2.10)I^2 = A^2 \int_0^{\infty} 2\pi r e^{-ar^2}\,dr \tag{2.10}

with the two factors of AA pulled out. Using the substitution u=ar2u = ar^2:

I2=A2∫0∞2πr2are−u du=A2∫0∞πae−u du=A2(−πae−u∣0∞)=A2πaI^2 = A^2 \int_0^{\infty} \frac{2\pi r}{2ar} e^{-u}\,du = A^2 \int_0^{\infty} \frac{\pi}{a} e^{-u}\,du = A^2 \left(-\frac{\pi}{a} e^{-u}\Big|_0^{\infty}\right) = A^2 \frac{\pi}{a}

which means I=Aπ/aI = A\sqrt{\pi/a}.

Example 2: In thermodynamics, the Maxwell–Boltzmann velocity distribution describes the distribution of velocities of molecules in an ideal gas. The PDF for the xx-component of velocity vxv_x is:

f(vx)=Ae−mvx2/2kT(2.11)f(v_x) = Ae^{-mv_x^2/2kT} \tag{2.11}

where AA is some scaling constant and mm, kk, TT are given for an ideal gas. The probability of finding any value of vxv_x from −∞-\infty to ∞\infty is 11, so

1=∫−∞∞f(vx) dvx(2.12)1 = \int_{-\infty}^{\infty} f(v_x)\,dv_x \tag{2.12}

Using Equation (2.12), find the expression for the scaling constant AA.

Solution 2: f(vx)f(v_x) is a Gaussian function with a=m/2kTa = m/2kT. Applying the polar coordinate trick:

1=Aπm/2kT1 = A\sqrt{\frac{\pi}{m/2kT}}
A=m2πkT(2.14)A = \sqrt{\frac{m}{2\pi kT}} \tag{2.14}

3. Motivation: Expectation Values

Suppose you know the PDF f(x)f(x) for some quantity xx. One thing you might be interested in is the average or expectation value for xx, denoted ⟨x⟩\langle x \rangle, in some interval (a,b)(a, b). For a non-uniform f(x)f(x), the average is a weighted sum of xx multiplied by the probability of finding xx at that value:

⟨x⟩=∑xixi⋅f(xi) dx(3.1)\langle x \rangle = \sum_{x_i} x_i \cdot f(x_i)\,dx \tag{3.1}

For a continuous distribution, Equation (3.1) is rewritten with an integral:

⟨x⟩=∫abxf(x) dx(3.2)\langle x \rangle = \int_a^b x f(x)\,dx \tag{3.2}

Therefore, to find the expectation value of any polynomial of xx in a Gaussian distribution over (−∞,∞)(-\infty, \infty), integrals of the form

⟨xn⟩=A∫−∞∞xne−ax2 dx(3.3)\langle x^n \rangle = A \int_{-\infty}^{\infty} x^n e^{-ax^2}\,dx \tag{3.3}

must be evaluated. Note that the expectation value of any polynomial of xx in a Gaussian distribution is just a sum of separate xnx^n Gaussian integrals, since integration is a linear operation.

4. Related Gaussian Integrals

Consider the simple case where n=1n = 1 and A=a=1A = a = 1. The related Gaussian integral I1I_1 is:

I1=∫0∞xe−x2 dx(4.1)I_1 = \int_0^{\infty} x e^{-x^2}\,dx \tag{4.1}

Note that the lower limit is 00. Since xexp⁡(−x2)x\exp(-x^2) is an odd function, the integral from (−∞,∞)(-\infty, \infty) is trivially zero and not particularly interesting.

Example 3: Show that I1=1/2I_1 = 1/2 in Equation (4.1).

Solution 3: I1I_1 is easily evaluated using uu-substitution:

I1=∫0∞xe−x2 dx=∫0∞e−x212 dx2=−12e−x2∣0∞=12I_1 = \int_0^{\infty} x e^{-x^2}\,dx = \int_0^{\infty} e^{-x^2} \frac{1}{2}\,dx^2 = -\frac{1}{2} e^{-x^2}\Big|_0^{\infty} = \frac{1}{2}

The usual uu-substitution has been written as x dx=12 dx2x\,dx = \frac{1}{2}\,dx^2, which is just u=x2u = x^2 in convenient notation.

Now consider the integral I2I_2:

I2=∫−∞∞x2e−x2 dx(4.3)I_2 = \int_{-\infty}^{\infty} x^2 e^{-x^2}\,dx \tag{4.3}

Direct uu-substitution will not work here — the standard approach is to separate the product of xx and e−x2e^{-x^2} using integration by parts:

I2=−xe−x22∣−∞∞+∫−∞∞e−x22 dx(4.5)I_2 = -\frac{x e^{-x^2}}{2}\Bigg|_{-\infty}^{\infty} + \int_{-\infty}^{\infty} \frac{e^{-x^2}}{2}\,dx \tag{4.5}

The second term is half of the simple Gaussian integral, giving π/2\sqrt{\pi}/2. Using L'Hôpital's rule, the first term is zero. Therefore:

I2=π2(4.6)I_2 = \frac{\sqrt{\pi}}{2} \tag{4.6}

The process of uu-substitution with integration by parts can be repeated to find expectation values of successively higher powers of xnx^n in a Gaussian distribution.

Example 4: Evaluate the integral

I4=∫−∞∞x4e−x2 dx(4.7)I_4 = \int_{-\infty}^{\infty} x^4 e^{-x^2}\,dx \tag{4.7}

Then evaluate the general integral I2nI_{2n} such that n∈Zn \in \mathbb{Z}:

I2n=∫−∞∞xne−x2 dx(4.8)I_{2n} = \int_{-\infty}^{\infty} x^n e^{-x^2}\,dx \tag{4.8}

Solution 4: To evaluate I4I_4, first perform an x2x^2 substitution:

I4=∫−∞∞x3e−x212 dx2(4.9)I_4 = \int_{-\infty}^{\infty} x^3 e^{-x^2} \frac{1}{2}\,dx^2 \tag{4.9}

Then integration by parts gives:

I4=−x3e−x22∣−∞∞+∫−∞∞3x2e−x22 dx(4.10)I_4 = -\frac{x^3 e^{-x^2}}{2}\Bigg|_{-\infty}^{\infty} + \int_{-\infty}^{\infty} \frac{3x^2 e^{-x^2}}{2}\,dx \tag{4.10}

By L'Hôpital's rule, the boundary term goes to zero. The second term is 32⋅I2\frac{3}{2} \cdot I_2, so:

I4=3π4(4.11)I_4 = \frac{3\sqrt{\pi}}{4} \tag{4.11}

This procedure can be generalized. All boundary terms from integration by parts vanish by L'Hôpital's rule:

boundary term∝xme−x2∣−∞∞=0(4.12)\text{boundary term} \propto x^m e^{-x^2}\Big|_{-\infty}^{\infty} = 0 \tag{4.12}

Each substitution reduces the power of x2mx^{2m} by two, always remaining even until the integral reduces to the standard Gaussian. Each substitution contributes a factor of 12\frac{1}{2}, giving a total factor of

substitution factor=12n(4.13)\text{substitution factor} = \frac{1}{2^n} \tag{4.13}

An odd factor 2m−12m - 1 (one below the power x2mx^{2m}) is multiplied each time integration by parts is performed, giving a factor expressible for any general I2nI_{2n} as

integration by parts factor=(2n−1)!2n−1(n−1)!(4.14)\text{integration by parts factor} = \frac{(2n-1)!}{2^{n-1}(n-1)!} \tag{4.14}

Combining Equations (4.13) and (4.14) with the value of the standard Gaussian integral gives:

I2n=(2n−1)!22n−1(n−1)!π(4.15)I_{2n} = \frac{(2n-1)!}{2^{2n-1}(n-1)!}\sqrt{\pi} \tag{4.15}
StatusSourceProblem NameDifficultyTags
AIMEVery Hard
Show TagsCombinatorics, Recursion

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.

PrevNext