Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 39 · The Ideal Gas and Equipartition

The Ideal Gas Partition Function

Derive the partition function of a classical ideal gas, the thermal wavelength, the Sackur-Tetrode entropy and the role of the 1/N! factor, with runnable numbers.

The ideal gas is the first system where statistical mechanics reproduces a result you already know (PV = NkT) and, in the same calculation, predicts something thermodynamics alone cannot: the absolute value of the entropy. In this lesson you build the partition function of N non-interacting point particles in a box, read off the pressure and energy, and arrive at the Sackur-Tetrode equation.

Everything here uses the canonical ensemble from the previous chapters: a system at fixed temperature T, with β = 1/(kT) and k = 1.380649 × 10⁻²³ J/K (exact in the SI). The key object is the partition function Z, from which the Helmholtz free energy follows as F = -kT ln Z.

One particle in a box

A single particle of mass m in a cubic box of volume V has kinetic energy p²/(2m). When the box is large compared with the de Broglie wavelength, the sum over quantum states can be replaced by an integral over phase space, with one state per volume h³ (where h = 6.62607015 × 10⁻³⁴ J·s is Planck's constant):

Text
Z₁ = (1/h³) ∫ d³r ∫ d³p exp(-β p² / 2m)
   = (V/h³) (2π m kT)^(3/2)
   = V / λ³

The length

Text
λ = h / √(2π m k T)

is the thermal de Broglie wavelength. It is roughly the wavelength of a particle with typical thermal momentum. Z₁ = V/λ³ has a lovely reading: it counts how many "thermal wavelength cubes" fit in the box, which is about how many states a thermally excited particle can occupy.

The classical treatment is valid when λ³ is much smaller than the volume per particle, V/N. If nλ³ (with n = N/V) approaches 1, quantum statistics take over. You will meet that regime in the chapter on Fermi-Dirac and Bose-Einstein statistics.

N particles and the factor 1/N!

For N non-interacting particles, the energies simply add, so the distinguishable-particle partition function is Z₁^N. But identical particles cannot be told apart: swapping two of them is not a new microstate. The standard (Gibbs) correction divides by the number of permutations:

Text
Z_N = (1/N!) (V/λ³)^N

This follows rigorously from quantum mechanics in the dilute limit, where almost all states have every particle in a different single-particle state. Now use Stirling's approximation ln N! ≈ N ln N - N:

Text
F = -kT ln Z_N = -N k T [ ln( V / (N λ³) ) + 1 ]

Three thermodynamic results follow by differentiation:

Quantity Formula Result
Pressure P = -(∂F/∂V)_T P = N k T / V
Energy U = -∂(ln Z)/∂β U = (3/2) N k T
Entropy S = -(∂F/∂T)_V S = N k [ ln( V / (N λ³) ) + 5/2 ]

The last line is the Sackur-Tetrode equation. Because λ depends on h, the entropy has a definite absolute value that includes Planck's constant: quantum mechanics sets the zero of classical entropy.

Checking Sackur-Tetrode against a real gas

Argon is nearly ideal and monatomic, so it is a clean test. The tabulated standard molar entropy of argon gas at 298.15 K and 1 bar is about 154.8 J/(mol·K). The code below computes the Sackur-Tetrode value for one mole at those conditions.

Python Entropy of argon from first principles

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 result agrees with the tabulated value to within a fraction of a J/(mol·K), and nλ³ comes out around 10⁻⁵, confirming the classical approximation. This is one of the great early successes of the theory: the entropy of a gas calculated from h and the atomic mass alone.

The Gibbs paradox

Why the 1/N!? Suppose you leave it out. Then S' = N k [ ln(V/λ³) + 3/2 ], and entropy is no longer extensive: doubling the system (2N particles in 2V) should double S, but it does not. Worse, removing a partition between two boxes of the same gas would seem to create entropy 2Nk ln 2, although nothing observable has happened. That is the Gibbs paradox. The 1/N! factor repairs both problems.

Python Extensivity with and without 1/N!

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.

With the correction the mismatch is zero (up to rounding); without it the mismatch equals exactly 2Nk ln 2.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What does the thermal wavelength λ = h / √(2π m k T) represent?

    λ sets the length scale below which quantum wave behavior matters; it is not a collision distance or a molecular size.
  2. 2. For N identical classical particles, the partition function is

    Dividing by N! corrects for the indistinguishability of identical particles and restores extensivity of the entropy.
  3. 3. Which condition makes the classical ideal-gas treatment valid?

    When the volume per particle is much larger than λ³, wave functions do not overlap and quantum statistics can be ignored.
  4. 4. Why does the Sackur-Tetrode entropy contain Planck's constant?

    Classical phase space is continuous; dividing by h³ gives a count of states and so fixes the absolute entropy.

Summary

  • Z₁ = V/λ³ with λ = h/√(2π m k T); for N identical particles Z_N = Z₁^N / N!.
  • Differentiating F = -kT ln Z_N gives PV = NkT and U = (3/2) N k T.
  • The Sackur-Tetrode entropy is S = N k [ln(V/(Nλ³)) + 5/2], and it matches measured argon entropy.
  • The 1/N! factor resolves the Gibbs paradox by making entropy extensive.

Next: The Maxwell-Boltzmann Speed Distribution