Solution (source code)

= Solution

An \b[<statistical ensemble> specifies probabilities of microstates under particular macroscopic constraints]. It represents statistical information about a system; the <reservoir constraints of equilibrium ensembles> specify what it can exchange with its surroundings.

* The <microcanonical ensemble> has fixed $E,V,N$. Accessible states in a narrow <energy> shell are equally probable, with $S=k_B\ln\Omega$, where $\Omega$ counts the states in that shell. It describes an isolated system.
* The <canonical ensemble> has fixed $T,V,N$ and can exchange <energy> with a heat reservoir. A microstate has probability $p_i=e^{-\beta E_i}/Z$, with $Z=\sum_i e^{-\beta E_i}$ and $F=-k_BT\ln Z$. The <energy> fluctuates; its mean is not imposed independently.
* The <grand canonical ensemble> has fixed $T,V,\mu_{\rm ch}$ and exchanges both particles and <energy>. Its probabilities are proportional to $e^{-\beta(E_i-\mu_{\rm ch}N_i)}$, with $\Xi=\sum_N e^{\beta\mu_{\rm ch}N}Z_N$ and <grand potential> $\Omega_G=-k_BT\ln\Xi$. For a homogeneous extensive equilibrium system, $\Omega_G=-pV$.

The <thermodynamic potentials> generate mean quantities and response functions. For example, canonical <energy> variance is $\langle(\Delta E)^2\rangle=k_BT^2C_V$. With short-range interactions and stable bulk phases, relative fluctuations usually vanish for large systems and these ensembles give equivalent bulk predictions after matching their mean variables. Finite systems, constraints and long-range interactions require greater care; the ensembles retain different fluctuating variables.<The Fundamentals of Statistical Mechanics by David Tong>[Sections 1.2–1.4: microcanonical, canonical and grand canonical ensembles]{ref}