Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 39 · The Ideal Gas and Equipartition

The Maxwell-Boltzmann Speed Distribution

Derive the Maxwell-Boltzmann distribution of molecular speeds, compute the most probable, mean and rms speeds, and check them with numerical integration and sampling.

Gas molecules in a room move at hundreds of meters per second, but not all at the same speed. Collisions constantly redistribute energy, and in equilibrium the result is a precise, universal distribution of speeds. This lesson derives it from the Boltzmann factor and shows how to compute averages and verify them numerically.

From the Boltzmann factor to a velocity distribution

In a classical ideal gas the probability of a molecule having velocity v = (vx, vy, vz) is proportional to the Boltzmann factor of its kinetic energy:

Text
f(v) d³v  ∝  exp( -m v² / (2 k T) ) d³v

This factorizes into three independent Gaussians, one per component. Each component has zero mean and variance kT/m. Normalizing (the Gaussian integral ∫ e^(-a x²) dx = √(π/a)) gives

Text
f(v) = (m / (2π k T))^(3/2) exp( -m v² / (2 k T) )

Most of the time you care about the speed v = |v|, not the direction. The volume element in velocity space is 4π v² dv (a spherical shell), so the speed distribution is

Text
F(v) = 4π (m / (2π k T))^(3/2) v² exp( -m v² / (2 k T) )

The factor v² grows with speed (there are more ways to have a large speed) while the exponential cuts it off. Their competition produces a peak.

Three characteristic speeds

The calculus is straightforward and gives three widely used speeds:

Speed Meaning Formula
v_p most probable (peak of F) √(2kT/m)
⟨v⟩ mean speed √(8kT/(πm))
v_rms root-mean-square √(3kT/m)

They are always in the order v_p < ⟨v⟩ < v_rms, with ratios 1 : 1.128 : 1.225. The rms speed is the one tied directly to energy: ⟨½ m v²⟩ = (3/2) k T, which is the equipartition result from the previous lesson.

Use m = M/N_A, where M is the molar mass, to convert: v_rms = √(3RT/M) with R = 8.314462618 J/(mol·K). For nitrogen (M ≈ 28.0 g/mol) at 300 K this is about 517 m/s.

Verify by integration

Rather than trusting algebra, we can integrate F(v) numerically. This checks normalization and all three speeds for nitrogen at 300 K.

Python Characteristic speeds of N2 by numerical integration

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Verify by sampling and plot

Because each velocity component is Gaussian with standard deviation σ = √(kT/m), we can simulate a gas by drawing three Gaussian numbers per molecule. Computing their speeds and comparing a histogram with F(v) is a strong test of the derivation. The plot also shows how temperature changes the shape.

Python Sampling a gas and comparing with F(v)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The histogram follows the 300 K curve. Notice that hotter gas has a lower, broader curve: the peak moves right as √T but the area stays 1.

Tails and escape

The exponential tail matters for chemistry (reaction rates depend on the few fast molecules) and astrophysics (light gases escape from planets even when the average speed is far below escape speed). Fractions above a cutoff speed v₀ come from integrating F from v₀ to infinity. The next lesson uses a similar Gaussian idea for general energy terms.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Why does the speed distribution contain a factor v²?

    The factor 4π v² dv is the volume element of a shell in velocity space; the exponential comes from the Boltzmann factor.
  2. 2. Which ordering of the characteristic speeds is correct?

    The distribution has a long tail to high speeds, which pulls the mean above the peak and the rms above the mean.
  3. 3. If the temperature is quadrupled, the rms speed of a gas

    v_rms = √(3kT/m) scales as √T, so 4T gives twice the speed.
  4. 4. What is the variance of one velocity component of a molecule of mass m at temperature T?

    Each component is Gaussian with σ² = kT/m, because the weight is exp(-m vx² / 2kT).

Summary

  • Velocity components are independent Gaussians with variance kT/m.
  • The speed distribution is F(v) = 4π (m/2πkT)^(3/2) v² exp(-mv²/2kT).
  • v_p = √(2kT/m), ⟨v⟩ = √(8kT/πm), v_rms = √(3kT/m), with v_p < ⟨v⟩ < v_rms.
  • Numerical integration and random sampling both confirm the formulas.

Next: The Equipartition Theorem