Fiveable

โš›Molecular Physics Unit 11 Review

QR code for Molecular Physics practice questions

11.2 Partition functions and their applications

11.2 Partition functions and their applications

Written by the Fiveable Content Team โ€ข Last updated August 2025
Written by the Fiveable Content Team โ€ข Last updated August 2025
โš›Molecular Physics
Unit & Topic Study Guides

Partition functions are the central tool of statistical mechanics, connecting microscopic energy levels to macroscopic thermodynamic quantities. By summing over all possible microstates of a system, the partition function lets you predict bulk properties like energy, entropy, and free energy without needing to know which specific microstate the system occupies.

This makes partition functions indispensable for studying everything from ideal gases to quantum oscillators. Once you can write down ZZ for a system, you can extract nearly every equilibrium property through derivatives and logarithms.

Partition function for systems

Definition and properties of the partition function

The partition function ZZ encodes the statistical properties of a system in thermodynamic equilibrium. It's defined as the sum of Boltzmann factors over all microstates:

Z=โˆ‘iexpโก(โˆ’ฮฒEi)Z = \sum_i \exp(-\beta E_i)

where ฮฒ=1kBT\beta = \frac{1}{k_B T}, kBk_B is the Boltzmann constant, TT is the absolute temperature, and EiE_i is the energy of the ii-th microstate.

A few key properties to keep in mind:

  • ZZ is dimensionless. It depends on temperature and the system's energy spectrum, but not on which microstate the system currently occupies.
  • It acts as a normalization constant for the Boltzmann distribution, ensuring that probabilities over all microstates sum to one.
  • It bridges microscopic information (energy levels, degeneracies) and macroscopic thermodynamic quantities. Nearly every equilibrium property can be extracted from ZZ or its derivatives.

Partition function for discrete energy levels

When energy levels are discrete, you often find that multiple microstates share the same energy. The degeneracy gig_i counts how many microstates have energy EiE_i, and the partition function becomes:

Z=โˆ‘igiexpโก(โˆ’ฮฒEi)Z = \sum_i g_i \exp(-\beta E_i)

The degeneracy factor gives each energy level its proper statistical weight. Without it, you'd undercount the contribution of levels that correspond to many distinct microstates.

Example: Two-level system. Consider energy levels E0=0E_0 = 0 (non-degenerate, g0=1g_0 = 1) and E1=ฯตE_1 = \epsilon (doubly degenerate, g1=2g_1 = 2). The partition function is:

Z=1+2expโก(โˆ’ฮฒฯต)Z = 1 + 2\exp(-\beta \epsilon)

At low temperature (ฮฒฯตโ‰ซ1\beta \epsilon \gg 1), the exponential term is negligible and Zโ‰ˆ1Z \approx 1, meaning the system sits almost entirely in the ground state. At high temperature (ฮฒฯตโ‰ช1\beta \epsilon \ll 1), Zโ‰ˆ3Z \approx 3, and all three microstates are roughly equally populated.

Example: Distinguishable spin system. For NN distinguishable particles each with two states (spin-up and spin-down), the number of microstates with exactly kk particles excited is the binomial coefficient (Nk)\binom{N}{k}. This degeneracy factor appears naturally when you write the partition function grouped by energy level rather than by individual microstate.

Partition function and thermodynamics

Relation between partition function and thermodynamic quantities

The real power of ZZ is that you can extract thermodynamic quantities through derivatives and logarithms. Here are the three most important relationships:

  • Internal energy:

U=โˆ’โˆ‚lnโกZโˆ‚ฮฒโˆฃVU = -\frac{\partial \ln Z}{\partial \beta}\bigg|_V

This gives the average energy of the system. The derivative with respect to ฮฒ\beta effectively weights each energy level by its Boltzmann probability.

  • Helmholtz free energy:

A=โˆ’kBTlnโกZA = -k_B T \ln Z

This is the most direct connection between ZZ and thermodynamics. Since A=Uโˆ’TSA = U - TS, the partition function simultaneously encodes both energetic and entropic contributions.

  • Entropy:

S=kB[lnโกZ+ฮฒโˆ‚lnโกZโˆ‚ฮฒโˆฃV]S = k_B \left[\ln Z + \beta \frac{\partial \ln Z}{\partial \beta}\bigg|_V\right]

You can also derive this from S=โˆ’(โˆ‚Aโˆ‚T)VS = -\left(\frac{\partial A}{\partial T}\right)_V, which is often easier in practice.

Deriving other thermodynamic quantities from the partition function

Once you have ZZ, additional quantities follow by taking further derivatives:

  • Pressure: P=kBTโˆ‚lnโกZโˆ‚VโˆฃTP = k_B T \frac{\partial \ln Z}{\partial V}\bigg|_T
  • Heat capacity at constant volume: CV=โˆ‚Uโˆ‚TโˆฃV=kBฮฒ2โˆ‚2lnโกZโˆ‚ฮฒ2C_V = \frac{\partial U}{\partial T}\bigg|_V = k_B \beta^2 \frac{\partial^2 \ln Z}{\partial \beta^2}
  • Chemical potential: ฮผ=โˆ’kBTโˆ‚lnโกZโˆ‚NโˆฃT,V\mu = -k_B T \frac{\partial \ln Z}{\partial N}\bigg|_{T,V}

The pattern here is worth noticing: lnโกZ\ln Z is the generating function, and different partial derivatives pull out different physical quantities. If you can compute lnโกZ\ln Z analytically, you have access to the full thermodynamics of the system.

Definition and properties of the partition function, Statistical Mechanics [The Physics Travel Guide]

Partition function calculations

Ideal gas partition function

For NN identical, non-interacting particles in a volume VV, the partition function factorizes:

Z=Z1NN!Z = \frac{Z_1^N}{N!}

where Z1Z_1 is the single-particle partition function. The two factors deserve separate attention:

  • Single-particle partition function: Integrating the Boltzmann factor over all momenta and positions for a free particle in a box gives Z1=Vฮ›3Z_1 = \frac{V}{\Lambda^3}, where ฮ›\Lambda is the thermal de Broglie wavelength:

ฮ›=h2ฯ€mkBT\Lambda = \frac{h}{\sqrt{2\pi m k_B T}}

Here hh is Planck's constant and mm is the particle mass. At higher temperatures, ฮ›\Lambda shrinks, meaning each particle has access to more quantum states and Z1Z_1 grows.

  • The N!N! factor corrects for the indistinguishability of identical particles. Swapping two identical particles doesn't create a new microstate, so without dividing by N!N! you'd overcount configurations. This is the Gibbs factor, and omitting it leads to the Gibbs paradox (a non-extensive entropy).

The factorization into single-particle contributions only works because the particles don't interact. For real gases with intermolecular forces, the partition function no longer separates so cleanly.

Harmonic oscillator partition function

The quantum harmonic oscillator has evenly spaced energy levels:

En=(n+12)โ„ฯ‰,n=0,1,2,โ€ฆE_n = \left(n + \frac{1}{2}\right)\hbar\omega, \quad n = 0, 1, 2, \ldots

To compute ZZ, you sum the Boltzmann factors over all nn:

  1. Write out the sum: Z=โˆ‘n=0โˆžexpโก[โˆ’ฮฒ(n+12)โ„ฯ‰]Z = \sum_{n=0}^{\infty} \exp\left[-\beta\left(n + \frac{1}{2}\right)\hbar\omega\right]

  2. Factor out the zero-point energy term: Z=expโก(โˆ’ฮฒโ„ฯ‰2)โˆ‘n=0โˆžexpโก(โˆ’nฮฒโ„ฯ‰)Z = \exp\left(-\frac{\beta\hbar\omega}{2}\right) \sum_{n=0}^{\infty} \exp(-n\beta\hbar\omega)

  3. Recognize the remaining sum as a geometric series with ratio r=expโก(โˆ’ฮฒโ„ฯ‰)r = \exp(-\beta\hbar\omega): the sum equals 11โˆ’expโก(โˆ’ฮฒโ„ฯ‰)\frac{1}{1 - \exp(-\beta\hbar\omega)}

  4. Combine to get the closed-form result:

Z=12sinhโก(ฮฒโ„ฯ‰2)Z = \frac{1}{2\sinh\left(\frac{\beta\hbar\omega}{2}\right)}

where sinhโก(x)=exโˆ’eโˆ’x2\sinh(x) = \frac{e^x - e^{-x}}{2}.

For a system of NN independent oscillators (all with the same frequency), the total partition function is simply Z=[12sinhโก(ฮฒโ„ฯ‰/2)]NZ = \left[\frac{1}{2\sinh(\beta\hbar\omega/2)}\right]^N. This factorization applies because the oscillators don't interact with each other.

This model is directly relevant to molecular physics: the vibrational modes of a diatomic molecule are well-approximated as quantum harmonic oscillators, each with a characteristic frequency determined by the bond stiffness and reduced mass.

Equilibrium properties from partition function

Calculating average quantities

Once you have ZZ, equilibrium averages follow systematically.

The average energy is:

โŸจEโŸฉ=โˆ’โˆ‚lnโกZโˆ‚ฮฒ=โˆ‘iEiexpโก(โˆ’ฮฒEi)Z\langle E \rangle = -\frac{\partial \ln Z}{\partial \beta} = \frac{\sum_i E_i \exp(-\beta E_i)}{Z}

The second expression makes the physical meaning clear: it's a weighted average of energies, with each microstate weighted by its Boltzmann probability.

The heat capacity can be obtained from energy fluctuations:

CV=โŸจE2โŸฉโˆ’โŸจEโŸฉ2kBT2C_V = \frac{\langle E^2 \rangle - \langle E \rangle^2}{k_B T^2}

where โŸจE2โŸฉ=โˆ‘iEi2expโก(โˆ’ฮฒEi)Z\langle E^2 \rangle = \frac{\sum_i E_i^2 \exp(-\beta E_i)}{Z}. This is an instance of the fluctuation-dissipation theorem: the size of spontaneous energy fluctuations in equilibrium is directly tied to the system's heat capacity, which measures how the system responds to a temperature change. Larger fluctuations mean a larger heat capacity.

Equilibrium occupation probabilities and phase transitions

The Boltzmann distribution gives the probability of finding the system in microstate ii:

Pi=expโก(โˆ’ฮฒEi)ZP_i = \frac{\exp(-\beta E_i)}{Z}

The partition function appears in the denominator as the normalization factor, ensuring โˆ‘iPi=1\sum_i P_i = 1.

Example: Two-level system with E0=0E_0 = 0 and E1=ฯตE_1 = \epsilon (both non-degenerate). The occupation probabilities are:

P0=11+expโก(โˆ’ฮฒฯต),P1=expโก(โˆ’ฮฒฯต)1+expโก(โˆ’ฮฒฯต)P_0 = \frac{1}{1 + \exp(-\beta\epsilon)}, \quad P_1 = \frac{\exp(-\beta\epsilon)}{1 + \exp(-\beta\epsilon)}

At Tโ†’0T \to 0, P0โ†’1P_0 \to 1 (system freezes into the ground state). As Tโ†’โˆžT \to \infty, both probabilities approach 1/21/2 (equal population).

Phase transitions can also be studied through the partition function. The key idea is that non-analytic behavior in ZZ (or more precisely, in lnโกZ\ln Z per particle in the thermodynamic limit) signals a phase transition. For example, the Ising model for ferromagnetism sums over all spin configurations on a lattice with nearest-neighbor interactions. Below a critical temperature TcT_c, the system spontaneously magnetizes (ferromagnetic phase); above TcT_c, thermal fluctuations destroy long-range order (paramagnetic phase). The partition function encodes this transition through a singularity in the free energy at TcT_c.