Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 39 · The Microcanonical and Canonical Ensembles

Energy Fluctuations and Heat Capacity

Show that in the canonical ensemble the energy variance equals k_B T^2 C_V, check it by simulation, and see why relative fluctuations scale like 1/sqrt(N).

In the canonical ensemble the energy of the system is not fixed: it fluctuates as the system exchanges energy with the bath. How big are these fluctuations? The answer is a beautiful link between microscopic noise and a measurable property, the heat capacity.

Average energy from Z

Recall Z = Σ_s e^(−βE_s) and p_s = e^(−βE_s)/Z. Differentiate ln Z with respect to β:

Text
∂(ln Z)/∂β = (1/Z) Σ_s (−E_s) e^(−βE_s) = −⟨E⟩

so the average energy is

Text
⟨E⟩ = U = −∂(ln Z)/∂β

Differentiate once more:

Text
∂²(ln Z)/∂β² = ⟨E²⟩ − ⟨E⟩² = σ_E²

Hence the variance of the energy is the second derivative of ln Z, and the first derivative of ⟨E⟩:

Text
σ_E² = −∂⟨E⟩/∂β

Since β = 1/(k_B T), ∂/∂β = −k_B T² ∂/∂T. The heat capacity at constant volume is C_V = ∂U/∂T. Therefore

Text
σ_E² = ⟨E²⟩ − ⟨E⟩² = k_B T² C_V

This is a fluctuation-response relation: the response of the average energy to temperature (a measurable heat capacity) equals the size of the spontaneous energy fluctuations. Both heat capacity and variance are positive, so C_V ≥ 0 for any system in equilibrium with a bath: this is a stability condition.

Relative fluctuations

Both U and C_V are extensive: proportional to the number of particles N. So

Text
σ_E = √(k_B T² C_V) ∝ √N,    ⟨E⟩ ∝ N    ⟹    σ_E/⟨E⟩ ∝ 1/√N

For N ~ 10^23 the relative energy fluctuation is about 10^-11.5. That is why the canonical and microcanonical ensembles agree for large systems: the energy in the canonical ensemble is effectively fixed.

Check with two-level systems

For N independent two-level particles, the energy is E = ε × (number excited) and each particle is excited with probability p = 1/(e^x + 1), independently. Therefore

Text
⟨E⟩ = N ε p,        σ_E² = N ε² p (1 − p)

Using p(1 − p) = e^x/(e^x + 1)², this equals N ε² e^x/(e^x + 1)². The heat capacity is C_V = N k_B x² e^x/(e^x + 1)², so k_B T² C_V = N ε² e^x/(e^x + 1)² (since x = ε/(k_B T), k_B T² x² = ε²/k_B). They match.

Python Variance of E against k T^2 C

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 ratio is 1 to within the statistical noise of the simulation.

Fluctuations shrink with N

We can see directly how the relative width of the energy distribution falls as the system grows.

Python Relative energy fluctuation against 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.

The relative fluctuation decreases as 1/√N, as predicted.

For a real gas at 300 K, treating each of the 3N translational degrees of freedom classically, C_V = (3/2) N k_B. The fluctuation in energy of one mole is then σ_E/⟨E⟩ = √(2/(3N)), roughly 10^-12. Entirely negligible.

Why C_V > 0 matters

A system with negative heat capacity would have a negative variance, which is impossible. So any system in contact with a heat bath has C_V ≥ 0. (Self-gravitating systems like stars can show negative heat capacity in the microcanonical ensemble, but they do not equilibrate with a bath, so this is no contradiction.)

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. In the canonical ensemble, the variance of the energy equals:

    sigma_E^2 = k_B T^2 C_V.
  2. 2. How does the relative energy fluctuation scale with the number of particles N?

    sigma_E grows like sqrt(N) while the mean grows like N.
  3. 3. Which derivative of ln Z gives the average energy?

    <E> = -d(ln Z)/d(beta). The second derivative gives the variance.
  4. 4. Why must C_V be non-negative for a system in equilibrium with a heat bath?

    C_V = sigma_E^2 / (k_B T^2) >= 0.

Summary

  • ⟨E⟩ = −∂ln Z/∂β and σ_E² = ∂²ln Z/∂β² = k_B T² C_V.
  • Fluctuations (noise) are tied to the heat capacity (response).
  • σ_E/⟨E⟩ ∝ 1/√N, so the canonical energy is practically sharp for large N.
  • C_V ≥ 0 follows for systems in equilibrium with a bath.

Next: Gibbs Entropy and Information