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.

An orbital model with test tubes and a plotted curve for advanced physical chemistry.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

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.

SECTION 2

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.

SECTION 3

Visual Explanation — Energy Levels, Populations, and Q

Population Distribution at Low T vs. High TLow Temperature(k_BT ≪ Δε)ε₀ε₁ε₂ε₃ε₄p₀ = 0.85p₁ = 0.12p₂ = 0.03p₃ ≈ 0Q ≈ 1.18High Temperature(k_BT ≫ Δε)ε₀ε₁ε₂ε₃ε₄p₀ = 0.30p₁ = 0.25p₂ = 0.20p₃ = 0.15p₄ = 0.10Q ≈ 3.85Bar width ∝ population pᵢ = exp(−εᵢ/k_BT) / 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.

SECTION 4

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=Σiexp(−βεi)whereβ=1/(kBT)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⟩=−(∂lnQ/∂β)V=kBT2(∂lnQ/∂T)V⟨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

Cv=(∂⟨E⟩/∂T)V=kBβ2(∂2lnQ/∂β2)V=kBβ2⟨(ΔE)2⟩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=−kBTlnQA = −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.

SECTION 5

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(βε))→Cv=kB(βε)2exp(βε)/[1+exp(βε)]2Q = 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 ε.

Two-Level System: ⟨E⟩ and Cᵥ vs. Temperaturek_BT / εValue00.51.01.52.02.500.51.0⟨E⟩/εCᵥ/k_BSchottky peakk_BT ≈ 0.42εε/2 limit⟨E⟩ rises monotonically toward ε/2; Cᵥ peaks then falls — the Schottky anomaly
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.

SECTION 6

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. 1

    Step 1 — Write the partition function

    Setting 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. 2

    Step 2 — Compute ln Q

    Taking the natural log: ln Qvib = −ln(1 − exp(−Θvib/T)).
    ln Q = −ln(1 − e−Θ_vib/T)
  3. 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. 4

    Step 4 — Derive Cᵥ = ∂⟨E⟩/∂T

    Differentiating ⟨E⟩ with respect to T: CV = kB (Θvib/T)² × exp(Θvib/T) / [exp(Θvib/T) − 1]². This is the Einstein heat capacity function.
    Cᵥ = kB(Θvib/T)² eΘ_vib/T / (eΘ_vib/T − 1)²
  5. 5

    Step 5 — Check limiting behavior

    At 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

SECTION 7

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.

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.

Strengths and limitations of the canonical partition function approach

✦

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.

SECTION 8

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.

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 = kBk_B ln Ω
Best for: closed systems at fixed TBest for: open systems, adsorption, quantum gasesBest for: fundamental derivations, astrophysics

Comparison of statistical mechanical ensembles

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.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

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?
Show answer
At T → 0, essentially all population is in the ground state; adding a tiny amount of heat produces negligible redistribution because the Boltzmann factor for the upper state is still vanishingly small, so Cᵥ → 0. At T → ∞, both states are already equally populated (each with probability 1/2); further temperature increases cannot change the distribution, so again Cᵥ → 0. The Schottky peak occurs at an intermediate temperature (kBT ≈ 0.42ε) where population is most rapidly transferring from the lower to the upper state — this is the temperature at which a small increase in T causes the maximum change in ⟨E⟩. The peak represents the system's maximum responsiveness to thermal perturbation.

Question 2: BASIC 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.
Show answer
First compute βε = ε/(kBT) = 200/(0.6950 × 300) = 200/208.5 = 0.9592. Then Q = 1 + exp(−0.9592) = 1 + 0.3832 = 1.3832. The average energy is ⟨E⟩ = ε × exp(−βε)/Q = 200 × 0.3832/1.3832 = 55.4 cm⁻¹, or equivalently ⟨E⟩ = ε/(1 + exp(βε)) = 200/(1 + 2.610) = 55.4 cm⁻¹. This tells us that roughly 28% of the energy gap is thermally accessed at room temperature, consistent with the upper state population p₁ = 0.383/1.383 = 0.277.

Question 3: INTERMEDIATE

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.
Show answer
The Einstein heat capacity function is Cᵥ/kB = u² eᵘ/(eᵘ − 1)² where u = Θvib/T. At T = 300 K: u = 3120/300 = 10.4, eᵘ ≈ 3.3 × 10⁴, so Cᵥ/kB ≈ (10.4)² × 3.3×10⁴ / (3.3×10⁴)² ≈ 108.16 × 3.3×10⁴ / 1.09×10⁹ ≈ 3.3 × 10⁻³ — essentially zero. At T = 3000 K: u = 3120/3000 = 1.04, e¹·⁰⁴ = 2.829, so Cᵥ/kB = (1.04)² × 2.829 / (2.829 − 1)² = 1.082 × 2.829 / (1.829)² = 3.061 / 3.345 = 0.915. The vibration is essentially frozen at 300 K but nearly fully activated at 3000 K, approaching the classical limit of kB.

Question 4: APPLIED

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?
Show answer
Q = 1 + exp(−βε) + exp(−2βε). Let x = exp(−βε), so Q = 1 + x + x². Then ⟨E⟩ = (ε × x + 2ε × x²)/(1 + x + x²) = ε(x + 2x²)/(1 + x + x²). Differentiating ⟨E⟩ with respect to T (or equivalently using Cᵥ = kBβ²(⟨E²⟩ − ⟨E⟩²)) yields the heat capacity. The behavior is qualitatively similar to the two-level Schottky anomaly but broader because three levels are involved. At T → 0: Cᵥ → 0 (only ground state occupied); at T → ∞: ⟨E⟩ → ε (equal population of 0, ε, 2ε), and Cᵥ → 0 again. The peak occurs near kBT ≈ 0.6ε (somewhat higher than the two-level case), with a maximum value of approximately 0.64 kB. The peak is lower and broader than the two-level Schottky anomaly because the energy is spread over a wider range of states.

Question 5: CRITICAL 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ᵥ.
Show answer
Start with ⟨E⟩ = −∂(ln Q)/∂β = (1/Q)Σᵢ εᵢ exp(−βεᵢ). Differentiate again: ∂⟨E⟩/∂β = −(1/Q)Σᵢ εᵢ² exp(−βεᵢ) + (1/Q²)(Σᵢ εᵢ exp(−βεᵢ))² = −⟨E²⟩ + ⟨E⟩². Thus ∂⟨E⟩/∂β = −(⟨E²⟩ − ⟨E⟩²). Since Cᵥ = −kBβ² ∂⟨E⟩/∂β (converting the T-derivative to a β-derivative), we get Cᵥ = kBβ²(⟨E²⟩ − ⟨E⟩²) = kBβ²Var(E). Since the variance of any random variable is non-negative, Cᵥ ≥ 0 — a thermodynamic stability result derived purely from statistics. Systems with widely spaced, highly degenerate levels (large variance at the activation temperature) will have large Cᵥ peaks, while systems with a single non-degenerate level trivially have Cᵥ = 0 (no fluctuations possible).

SUMMARY

Summary & Key Takeaways

Summary

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)