PHYSICAL CHEMISTRY 2 • STATISTICAL THERMODYNAMICS

Partition Function & Thermodynamics — Relate partition function to energy and heat capacity (conceptual)

How the partition function bridges microscopic quantum states and macroscopic thermodynamic quantities like energy and heat capacity.

Historical Context & Motivation

Throughout the nineteenth century, thermodynamics achieved remarkable success describing heat engines, chemical equilibria, and phase transitions using macroscopic state variables such as temperature, pressure, and volume. Yet a persistent question lingered: could these bulk properties be derived from the behavior of individual atoms and molecules? The challenge was formidable — a mole of gas contains roughly 6 × 10²³ particles, each obeying its own dynamical equations. The partition function, introduced by Ludwig Boltzmann and later formalized by Josiah Willard Gibbs, provided the mathematical key that unlocked this connection, encoding the statistical weight of every accessible quantum state into a single analytic function from which all thermodynamic observables follow.

1877
Boltzmann's Statistical Entropy
Ludwig Boltzmann introduces the relation S = k ln W, linking entropy to the number of microstates W, and lays the conceptual groundwork for summing over states — the essence of the partition function.
1902
Gibbs' Ensemble Theory
J. Willard Gibbs publishes Elementary Principles in Statistical Mechanics, introducing the canonical ensemble and the systematic use of what we now call the canonical partition function Q.
1907
Einstein's Quantum Heat Capacity
Albert Einstein applies the partition function to quantized harmonic oscillators, explaining why the heat capacity of solids drops below the classical Dulong–Petit value at low temperatures — the first triumph of quantum statistical mechanics.
1912
Debye's Improved Model
Peter Debye extends Einstein's approach by treating phonon modes with a distribution of frequencies, yielding the Debye T³ law for heat capacity and demonstrating the power of the partition function framework for continuous spectra.
1938
Textbook Formalization
With the development of quantum mechanics fully in place, textbooks by Fowler, Guggenheim, and later Hill systematize the derivation of energy, entropy, free energy, and heat capacity from the partition function as the cornerstone of statistical thermodynamics.

The central question this lesson addresses is deceptively simple: given a system whose microscopic energy levels are known (from quantum mechanics), how do we compute its average internal energy ⟨E⟩ and its heat capacity C? The answer runs through a single mathematical object — the partition function — and the conceptual chain connecting them is elegant, powerful, and surprisingly compact.

Core Principles & Definitions

Before deriving thermodynamic quantities, we must establish the foundational ideas that make the partition function so central. The canonical partition function Q is defined for a system in thermal equilibrium with a heat bath at temperature T. It is a sum (or integral, for continuous spectra) of Boltzmann factors exp(−εᵢ / kBT) over all microstates i, where εᵢ is the energy of state i, kB is Boltzmann's constant, and T is the absolute temperature. This deceptively simple sum encodes the entire statistical weight landscape of the system: states with lower energy contribute more heavily at low temperature, while at high temperature the contributions become more uniform.

1

Partition Function Q

Q = Σᵢ exp(−εᵢ / kBT). The 'sum over states' counts how many microstates are thermally accessible. A larger Q means more states contribute — the system explores more of its energy landscape.
2

Boltzmann Factor

exp(−εᵢ / kBT) gives the relative probability of finding the system in state i. States with energy much greater than kBT are exponentially suppressed.
3

Average Energy ⟨E⟩

The ensemble-averaged internal energy is obtained by taking a specific temperature derivative of Q. Conceptually, it is the probability-weighted average of all state energies: ⟨E⟩ = Σᵢ pᵢ εᵢ.
4

Heat Capacity Cᵥ

Cᵥ = (∂⟨E⟩/∂T)V measures how rapidly the internal energy changes with temperature. It is the second derivative of ln Q with respect to β = 1/(kBT), reflecting the spread (variance) in energy.
5

β = 1/(k_BT) — The Inverse Temperature

Using β simplifies many expressions. The average energy becomes ⟨E⟩ = −∂(ln Q)/∂β, and the heat capacity relates to ⟨(ΔE)²⟩ — the energy fluctuations around the mean.
KEY TAKEAWAY
Think of the partition function as a census of thermally accessible states. Imagine a multi-story building where each floor represents a quantum energy level. At low temperature, most of the occupants (probability weight) crowd onto the ground floor; at high temperature, occupants spread across many floors. The partition function counts the effective number of occupied floors. The average energy is the average floor number weighted by occupancy, and the heat capacity tells you how quickly occupants redistribute as you raise the temperature — essentially, how sensitive the average floor is to warming the building.

Visual Explanation — Energy Levels, Populations, and Q

At low temperature (left), nearly all probability weight sits on the ground state ε₀, and Q ≈ 1. At high temperature (right), populations spread across many levels, and Q grows substantially. The average energy ⟨E⟩ equals the probability-weighted sum of energy levels; the heat capacity reflects how quickly this distribution shifts as T changes.

The diagram above crystallizes the core idea. Each horizontal bar represents the fractional population pᵢ of the i-th energy level. At low temperature, the exponential suppression of the Boltzmann factor ensures that only the lowest state has appreciable weight, so Q is close to unity — effectively only one state is thermally accessible. As temperature rises, higher-energy states acquire significant probability, Q increases, the average energy climbs, and crucially, the rate of that climb — the heat capacity — passes through characteristic behavior that depends on the level spacing relative to kBT. When populations are already uniformly distributed (the high-T limit), further increases in temperature cause no redistribution, so the heat capacity plateaus at the classical (equipartition) value.

Mathematical Framework

We now develop the formal relationships. Let us define the inverse temperature parameter β = 1/(kBT), which is the natural variable in the canonical ensemble. All thermodynamic observables follow from successive derivatives of ln Q with respect to β.

CANONICAL PARTITION FUNCTION
Q = Σᵢ exp(−β εᵢ) where β = 1/(k_B T)
The sum runs over all microstates i (not just distinct energy levels). If level j has degeneracy gⱼ, we may equivalently write Q = Σⱼ gⱼ exp(−β εⱼ), summing over energy levels.
AVERAGE ENERGY FROM Q
⟨E⟩ = −(∂ ln Q / ∂β)_V = k_B T² (∂ ln Q / ∂T)_V
The first form uses β as the variable; the second uses T. Both are equivalent. This result arises because ⟨E⟩ = Σᵢ pᵢ εᵢ with pᵢ = exp(−β εᵢ)/Q, and differentiating ln Q with respect to β pulls down −εᵢ weighted by pᵢ.
HEAT CAPACITY FROM Q
Cᵥ = (∂⟨E⟩/∂T)_V = k_B β² (∂²ln Q / ∂β²)_V = k_B β² ⟨(ΔE)²⟩
Here ⟨(ΔE)²⟩ = ⟨E²⟩ − ⟨E⟩² is the variance (fluctuation) in energy. The heat capacity is proportional to the energy fluctuations: a system with large fluctuations absorbs more heat for a given temperature increment.
🔗 Connection to Fluctuations
The result Cᵥ = kBβ²⟨(ΔE)²⟩ is profound: it says that a purely mechanical quantity (energy fluctuations in the ensemble) determines a thermodynamic response function (heat capacity). This is an instance of the fluctuation–dissipation theorem, one of the deepest results in statistical mechanics. Since variances are non-negative, Cᵥ ≥ 0 always — a thermodynamic stability condition derived from statistics.
HELMHOLTZ FREE ENERGY
A = −k_B T ln Q
For completeness, the Helmholtz free energy connects directly to Q. Entropy then follows as S = −(∂A/∂T)V = kB ln Q + kBT (∂ ln Q / ∂T)V. Every classical thermodynamic potential can be obtained from Q.

Detailed Breakdown — The Two-Level System

The simplest non-trivial illustration of the partition-function-to-thermodynamics pipeline is the two-level system: a system with exactly two states having energies ε₀ = 0 and ε₁ = ε. This model applies to nuclear spin-½ particles in a magnetic field, to molecular conformational isomers separated by an energy gap, and to any system where higher levels can be ignored. Despite its simplicity, the two-level system captures the essential qualitative behavior of energy and heat capacity and produces the celebrated Schottky anomaly — a maximum in CV at intermediate temperatures.

TWO-LEVEL PARTITION FUNCTION
Q = 1 + exp(−β ε) → ⟨E⟩ = ε / (1 + exp(βε)) → Cᵥ = k_B (βε)² exp(βε) / [1 + exp(βε)]²
At low T (βε → ∞): Q → 1, ⟨E⟩ → 0, and Cᵥ → 0. At high T (βε → 0): Q → 2, ⟨E⟩ → ε/2, and Cᵥ → 0 again. The heat capacity peaks near kBT ≈ 0.42 ε.
The cyan curve shows the average energy ⟨E⟩/ε rising from 0 toward the high-temperature limit of ε/2 as both states become equally populated. The pink curve is the heat capacity Cᵥ/kB, which peaks (the Schottky anomaly) near kBT ≈ 0.42ε, then decays to zero as both states saturate.

The Schottky anomaly is a purely quantum-statistical effect with no classical counterpart. At low T, the upper state is frozen out, so adding heat barely changes the energy distribution — CV is small. At high T, both states are already equally occupied and no further redistribution can occur — CV vanishes again. The heat capacity is maximal precisely when the temperature is comparable to the level spacing ε/kB, because that is when population is most actively transferring between the two levels. This same qualitative behavior appears in molecular rotation, vibration, and electronic excitation — the only difference is the density and spacing of levels.

Worked Example — Quantum Harmonic Oscillator

Let us apply the full derivation chain to a molecular vibration modeled as a quantum harmonic oscillator with frequency ν. The energy levels are εₙ = (n + ½)hν for n = 0, 1, 2, … We will derive Q, ⟨E⟩, and CV, using the vibrational temperature Θvib = hν/kB to simplify notation.

Vibrational Partition Function, Energy, and Heat Capacity
1
Step 1 — Write the partition functionSetting the zero of energy at the ground state (ε₀ = 0, ε₁ = hν, ε₂ = 2hν, …), the partition function becomes a geometric series: Qvib = Σₙ exp(−nβhν) = 1/(1 − exp(−βhν)) = 1/(1 − exp(−Θvib/T)).
Qvib = 1 / (1 − e−Θ_vib/T)
2
Step 2 — Compute ln QTaking the natural log: ln Qvib = −ln(1 − exp(−Θvib/T)).
ln Q = −ln(1 − e−Θ_vib/T)
3
Step 3 — Derive ⟨E⟩ using −∂(ln Q)/∂βDifferentiating with respect to β (or equivalently using the T-form): ⟨E⟩ = kBΘvib / (exp(Θvib/T) − 1). This is the famous Planck distribution function for a single mode. At T ≫ Θvib, the exponential can be expanded as 1 + Θvib/T + …, giving ⟨E⟩ → kBT (equipartition).
⟨E⟩ = kBΘvib / (eΘ_vib/T − 1)
4
Step 4 — Derive Cᵥ = ∂⟨E⟩/∂TDifferentiating ⟨E⟩ with respect to T: CV = kBvib/T)² × exp(Θvib/T) / [exp(Θvib/T) − 1]². This is the Einstein heat capacity function.
Cᵥ = kBvib/T)² eΘ_vib/T / (eΘ_vib/T − 1)²
5
Step 5 — Check limiting behaviorAt T → 0: Θvib/T → ∞, so exp(Θvib/T) dominates and CV → 0 exponentially (consistent with the third law). At T → ∞: (Θvib/T) → 0, and the function → kB (equipartition: ½kBT for kinetic + ½kBT for potential → total contribution kB per oscillator).
T → 0: Cᵥ → 0 ; T → ∞: Cᵥ → kB

Strengths, Limitations, and Scope

The partition function formalism is extraordinarily powerful, but it is essential to understand where it excels, where its assumptions may break down, and how it compares to alternative approaches.

Strengths and limitations of the canonical partition function approach
FeatureStrengthLimitation / Caveat
GeneralityWorks for any system with well-defined energy levels — translations, rotations, vibrations, electronic states, spins.Requires knowledge of the full energy spectrum εᵢ, which may be difficult or impossible for strongly interacting many-body systems.
SeparabilityFor independent modes, Q factorizes: Q = Q_trans × Q_rot × Q_vib × Q_elec, enabling modular analysis.Coupling between modes (e.g., rotation–vibration interaction) breaks exact factorization and requires corrections.
Thermal equilibriumAll derivations assume the system is in thermal equilibrium with a reservoir — valid for vast classes of experiments.Non-equilibrium systems (shock waves, ultrafast spectroscopy, biological motors) require extensions beyond the canonical ensemble.
Classical limitAt high T, the partition function reproduces equipartition and classical thermodynamics seamlessly.Classical results fail at low T for any mode with quantized spacing > k_BT, where the partition function correctly predicts freezing out.
Identical particlesThe molecular partition function q relates to the system Q via Q = qᴺ/N! for distinguishable-to-indistinguishable correction.At very low T or high density, Bose–Einstein or Fermi–Dirac statistics must replace the Boltzmann approximation — the simple Q formalism breaks down.
KEY TAKEAWAY
The partition function is like a transfer function in engineering: just as a transfer function transforms a time-domain input into a frequency-domain output, Q transforms the microscopic energy spectrum into macroscopic thermodynamic observables via differentiation. Its power lies in this universality — any system whose energy levels are known feeds into the same mathematical pipeline. Its limitation is also clear: the pipeline requires the energy spectrum as input, and for strongly correlated systems, obtaining that spectrum is the hard part.

Connection to Advanced Theory

The canonical partition function Q is the starting point for a rich hierarchy of more general statistical-mechanical frameworks. Understanding how Q connects to these advanced formulations provides perspective on where this lesson fits within the broader theory of statistical thermodynamics.

Comparison of statistical mechanical ensembles
Canonical (this lesson)Grand CanonicalMicrocanonical
Fixed: N, V, TFixed: μ, V, T (particle number fluctuates)Fixed: N, V, E (isolated system)
Q = Σ exp(−βεᵢ)Ξ = Σ_{N} exp(βμN) Q(N)Ω(E) = number of states at energy E
A = −k_BT ln QpV = k_BT ln ΞS = k_B ln Ω
Best for: closed systems at fixed TBest for: open systems, adsorption, quantum gasesBest for: fundamental derivations, astrophysics

The grand canonical partition function Ξ generalizes Q by summing over all possible particle numbers N, weighted by exp(βμN), where μ is the chemical potential. This is essential for systems that exchange particles with a reservoir — adsorption on surfaces, chemical reactions in solution, and quantum gases at low temperature. The microcanonical ensemble operates at fixed energy and underpins the canonical ensemble derivation via the method of steepest descents. In the thermodynamic limit (N → ∞), all three ensembles yield identical predictions for intensive thermodynamic properties — a result known as ensemble equivalence.

🔭 Looking Ahead
In subsequent topics, you will encounter the partition function in action for molecular translations (particle-in-a-box Qtrans), rotations (rigid rotor Qrot), and electronic excitations. Each contributes its own factor to the total Q, and each has a characteristic temperature above which it contributes kB/2 per quadratic degree of freedom to the heat capacity. The unifying thread is always the same: compute Q, take derivatives, extract thermodynamics.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why the heat capacity of a two-level system goes to zero at both T → 0 and T → ∞, even though the average energy behaves very differently in these two limits. What is the physical meaning of the Schottky peak?
PROBLEM 2BASIC CALCULATION
A two-level system has a gap ε = 200 cm⁻¹. At T = 300 K, compute the partition function Q and the average energy ⟨E⟩. Use kB = 0.6950 cm⁻¹/K.
PROBLEM 3INTERMEDIATE
For a quantum harmonic oscillator with Θvib = 3120 K (similar to HCl stretching), compute the vibrational contribution to Cᵥ at T = 300 K and at T = 3000 K. Express each as a fraction of kB.
PROBLEM 4APPLIED
A paramagnetic salt has nuclear spins with I = 1 in an external magnetic field, producing three equally-spaced levels at energies 0, ε, and 2ε. Write Q, derive ⟨E⟩, and sketch how Cᵥ behaves as a function of T. At what approximate temperature does Cᵥ peak, and what is its maximum value?
PROBLEM 5CRITICAL THINKING
Prove that the heat capacity Cᵥ derived from the canonical partition function can be expressed as Cᵥ = kBβ²(⟨E²⟩ − ⟨E⟩²), starting from the definitions ⟨E⟩ = −∂(ln Q)/∂β and Cᵥ = −kBβ² ∂⟨E⟩/∂β. Discuss what this result implies about the sign of Cᵥ and about systems that might have unusually large or small Cᵥ.

Summary & Key Takeaways

The canonical partition function Q = Σᵢ exp(−εᵢ/kBT) is the central object of statistical thermodynamics, encoding the thermally-weighted contribution of every quantum microstate. The average internal energy is extracted via ⟨E⟩ = −∂(ln Q)/∂β, and the heat capacity follows as Cᵥ = kBβ²⟨(ΔE)²⟩ — directly proportional to the energy fluctuations in the canonical ensemble. This connection between response functions and fluctuations is an instance of the fluctuation–dissipation theorem.

Concrete examples — the two-level system with its Schottky anomaly and the quantum harmonic oscillator with the Einstein heat capacity function — demonstrate how the partition function naturally accounts for the freezing out of quantum modes at low temperature and the recovery of classical equipartition at high temperature. The framework extends through factorization of Q into translational, rotational, vibrational, and electronic contributions, and generalizes to the grand canonical and microcanonical ensembles for systems with fluctuating particle number or fixed total energy.

Varsity Tutors • Physical Chemistry 2 • Partition Function & Thermodynamics — Relate partition function to energy and heat capacity (conceptual)