Classical Ideal Gas and Maxwell Distribution
The classical ideal gas is the simplest nontrivial laboratory for statistical mechanics. It has no interactions except confinement by the walls, so the partition function factorizes into a position part and a momentum part. From that factorization come the ideal-gas law, the Maxwell-Boltzmann velocity distribution, equipartition, and the density-of-states formulas used repeatedly in more complicated systems.
Schwabl treats the ideal gas in both microcanonical and canonical language. The agreement between them is a concrete example of ensemble equivalence: the microcanonical shell count and the canonical Gaussian momentum integrals produce the same macroscopic thermodynamics when is large.
Definitions
For identical classical particles of mass in volume ,
The canonical partition function is
The thermal de Broglie wavelength is
The ideal-gas partition function is
For a single particle, the velocity probability density is
The speed distribution, including the spherical velocity-space measure, is
Key results
The free energy follows from . Using Stirling's approximation,
one obtains
Pressure and entropy are then
and
The internal energy is
and the heat capacity at constant volume is
Equipartition explains this result: every quadratic term in the Hamiltonian contributes to the mean energy. Each particle has three quadratic momentum components, hence per particle.
The Maxwell distribution has several characteristic speeds:
In a gravitational field, canonical weighting gives the barometric formula
This is the same Boltzmann factor applied to potential energy rather than kinetic energy.
The density of states viewpoint gives the same physics from a different angle. For fixed , the number of momentum states with total kinetic energy below is proportional to the volume of a -dimensional sphere of radius :
Taking a logarithm and differentiating gives
so . This microcanonical derivation makes clear that the ideal-gas temperature is a measure of kinetic energy per quadratic degree of freedom, not a separate microscopic force.
The Maxwell distribution is also a useful warning about measures. The vector velocity density is largest at , but the speed distribution is zero at because there is very little velocity-space volume near exactly zero speed. The most probable speed comes from maximizing , not from maximizing the Gaussian factor alone.
Classical validity requires more than weak interactions. The gas must also be nondegenerate:
When this fails, the correction is not enough; Bose or Fermi occupation restrictions change the thermodynamics. Conversely, a very dilute gas with complicated molecules can still be nonideal in heat capacity because internal rotational and vibrational modes contribute to .
The barometric formula illustrates local equilibrium. Each height slice is assumed to have a Maxwellian velocity distribution at the same temperature, while density changes with potential energy. This separation between fast velocity equilibration and slow spatial variation reappears in the Boltzmann equation through the local Maxwell distribution.
The ideal gas also sets a baseline for interacting systems. Virial coefficients, transport coefficients, and phase-transition models are often stated as deviations from ideal behavior. When an equation of state is written as times a correction factor, the correction has meaning only because the ideal gas has already fixed the natural scale of pressure. Similarly, heat capacities of molecular gases are interpreted by asking which degrees of freedom have been added to the translational ideal-gas value.
Finally, the ideal gas is one of the best examples of ensemble equivalence. Microcanonical counting, canonical Gaussian integration, and grand-canonical Poisson statistics all produce the same thermodynamic equation of state in the macroscopic limit. Their fluctuations differ because their constraints differ, but the leading thermodynamic functions agree.
It is also a model of what interactions do not affect. In an ideal gas, the internal energy is independent of volume because there is no potential energy. Therefore a free expansion at fixed internal energy leaves the temperature unchanged for a classical monatomic ideal gas. Real gases do not obey this exactly because intermolecular attractions and repulsions make internal energy depend on density. The contrast is a useful diagnostic when studying Joule expansion and virial corrections.
The Maxwell distribution should be interpreted component by component and speed by speed. Each Cartesian component is Gaussian with variance , while the speed has a skewed distribution because many velocity vectors share the same magnitude.
Visual
| Result | Formula | Comment |
|---|---|---|
| Partition function | classical, noninteracting, identical | |
| Equation of state | pressure from | |
| Internal energy | kinetic energy only | |
| Heat capacity | temperature independent | |
| Most probable speed | maximum of | |
| RMS speed | from |
P(v)
^
| .
| . .
| . .
| . .
| . .
+----------------------> v
v_mp <v> v_rms
Worked example 1: Deriving the one-particle momentum integral
Problem: Evaluate the one-particle canonical momentum integral
Method:
- Factor the integral into Cartesian components:
- Use the Gaussian integral
Here , so
- Cube the result:
- Divide by and multiply by :
Checked answer: this is the single-particle factor whose th power gives the ideal-gas partition function.
Worked example 2: Characteristic speeds of nitrogen at room temperature
Problem: Estimate , , and for nitrogen molecules at . Take .
Method:
- Compute :
- Most probable speed:
- Mean speed:
- RMS speed:
Checked answer: the ordering is required by the right-skewed speed distribution.
Code
import numpy as np
kB = 1.380649e-23
T = 300.0
m = 4.65e-26
v = np.linspace(0.0, 1500.0, 5000)
P = 4 * np.pi * v**2 * (m / (2 * np.pi * kB * T))**1.5 * np.exp(-m * v**2 / (2 * kB * T))
dv = v[1] - v[0]
print("normalization", np.trapz(P, v))
print("mean speed", np.trapz(v * P, v))
print("rms speed", np.sqrt(np.trapz(v**2 * P, v)))
print("most probable grid speed", v[np.argmax(P)])
Common pitfalls
- Forgetting the factor when moving from velocity density to speed density.
- Treating the Maxwell distribution as valid for dense or strongly interacting gases without corrections.
- Dropping in and producing nonextensive entropy.
- Applying classical equipartition to frozen rotational, vibrational, or electronic modes at low temperature.
- Confusing with a literal molecular size. It is a quantum length scale controlling the validity of the classical approximation.