Equipartition theorem (source code)

= Equipartition theorem
{wiki}

= Equipartition
{synonym}

The <equipartition theorem> says that each independent quadratic term in a <Hamiltonian> described by <classical mechanics> has mean <energy> $k_BT/2$ in a <canonical ensemble>. Here $k_B$ is the <Boltzmann constant> and $T>0$ the absolute <temperature>. Count terms in the <energy>, rather than vaguely counting everything that can move: one <harmonic oscillator> has one position <degree of freedom> but TWO quadratic terms, one in <momentum> and one in <displacement>.

A precise sufficient setting is $H(y,\xi)=ay^2/2+H_0(\xi)$ with $a>0$, where $y$ is one of the <canonical variables>, $\xi$ denotes all remaining variables, and the <phase space> integration measure factors as $dy\,d\xi$. The range of $y$ is the whole <real line>, independently of $\xi$; there is no <constraint> coupling its allowed values to other variables. The <partition function> must be finite, and the relevant <expected values> must exist. The <Boltzmann factor> then gives
$$
\beta=\frac{1}{k_BT},\qquad
\rho_y(y)=\sqrt{\frac{\beta a}{2\pi}}e^{-\beta ay^2/2},\qquad
\left\langle\frac{ay^2}{2}\right\rangle=\frac{k_BT}{2}.
$$
The <probability density function> $\rho_y$ is a <normal distribution> with <variance> $k_BT/a$. A larger coefficient narrows the fluctuations enough to cancel its greater <energy> cost. This is why the mean contribution is independent of <mass> or <spring constant>.<Thermodynamics and Statistical Mechanics by Richard Fitzpatrick/Equipartition Theorem>[equations 7.124–7.135]{ref}

For a proof outline, the one-variable <Gaussian integral> is $Z_y=\int_{-\infty}^{\infty}e^{-\beta ay^2/2}\,dy=\sqrt{2\pi/(\beta a)}$, so $-\partial_\beta\ln Z_y=1/(2\beta)$. More generally, <integration by parts> in a canonical variable gives $\langle y\,\partial_yH\rangle=k_BT$ when its boundary term $[y e^{-\beta H}]$ vanishes and the integrals converge. For $ay^2/2$ this is twice its mean <energy>. At a finite hard boundary the boundary term need not vanish; <hard-wall correction to harmonic equipartition> illustrates the resulting departure. A <constraint>, a nonquadratic <potential energy>, or a noncanonical integration measure therefore requires its own calculation. The theorem is an <ensemble average>, not equality of instantaneous <energies>, and applying it to a recorded trajectory requires equilibration and sufficient sampling.

For a classical one-dimensional <harmonic oscillator>, with positive <mass> $m$ and <spring constant> $k$,
$$
H=\frac{p^2}{2m}+\frac{kx^2}{2},\qquad
\frac{\langle p^2\rangle}{2m}=\frac{k\langle x^2\rangle}{2}=\frac{k_BT}{2},\qquad
\langle H\rangle=k_BT.
$$
The origin is the <equilibrium> position. Its <heat capacity> is $k_B$ at fixed $m,k$, not $k_B/2$. Although the two mean <energies> agree, their measured amplitudes do not: $\langle p^2\rangle=mk_BT$ and $\langle x^2\rangle=k_BT/k$. In a <harmonic optical trap>, the position measurement observes the <potential energy> contribution; it does not measure both contributions by observing $x$ alone.<Thermodynamics and Statistical Mechanics by Richard Fitzpatrick/Harmonic Oscillators>[equations 7.136–7.139]{ref}

For $N$ particles in a three-dimensional classical <monatomic gas>, neglect interactions and thermally accessible internal excitations. Its three translational <momentum> terms give <internal energy> $U=3Nk_BT/2$, <heat capacity at constant volume> $C_V=3Nk_B/2$, and <heat capacity at constant pressure> $C_p=C_V+Nk_B=5Nk_B/2$. Per mole, replace $Nk_B$ by the <molar gas constant> $R$. For example, using stipulated $R=8.314\,\mathrm{J\,mol^{-1}\,K^{-1}}$, the <molar heat capacity> at fixed <volume (thermodynamics)> is $12.471\,\mathrm{J\,mol^{-1}\,K^{-1}}$. These results assume a dilute, nonrelativistic <ideal gas> with classical translational statistics, rather than a <quantum degeneracy> regime.

For an <ideal gas> of diatomic <molecules>, modeled as two <chemical atoms> with a bond, there are three translational quadratic terms, two accessible <rotational kinetic energy> terms for changes of bond orientation, and one bond-stretching <harmonic oscillator> with two quadratic terms. Rotation about the bond axis is not an additional active mode in this linear-molecule model. The three familiar limits of <heat capacity at constant volume> are
$$
\frac{C_V}{Nk_B}\simeq
\begin{cases}
3/2,&\text{rotations and vibrations frozen},\\
5/2,&\text{rotations active, vibrations frozen},\\
7/2,&\text{rotations and vibrations classical}.
\end{cases}
$$
Corresponding <molar heat capacities> are $3R/2$, $5R/2$ and $7R/2$. Counting the stretching <harmonic oscillator> only once as $k_BT/2$ would give the wrong last value.<Statistical Physics by David Tong/2 Classical Gases>[§§2.2.1]{ref}

The frozen regimes require <quantum mechanics>. In the simple molecular rotation model, $E_j=k_B\theta_r j(j+1)$ with <state degeneracy> $2j+1$, $\theta_r=\hbar^2/(2Ik_B)$, and <moment of inertia> $I$. For the bond-stretching <quantum harmonic oscillator>, $\theta_v=\hbar\omega/k_B$ with <angular frequency> $\omega$ and $\hbar=h/(2\pi)$ from the <Planck constant>. When $\theta_r\ll\theta_v$, the three limits above correspond to $T\ll\theta_r$, $\theta_r\ll T\ll\theta_v$, and $T\gg\theta_v$, provided translational motion remains classical. They are smooth crossovers, not abrupt switches. Real <molecules> can have different allowed rotational populations; at high <temperature>, <thermal dissociation>, internal excitations and nonharmonic bond motion can invalidate the fixed-molecule model before its last limit is reached.<Statistical Physics by David Tong/3 Quantum Gases>[§3.4]{ref}

For a <quantum harmonic oscillator> with fixed $\omega$, put $z=\theta_v/T$. Its exact mean <energy> and <heat capacity> are
$$
\langle H\rangle=\frac{\hbar\omega}{2}+\frac{\hbar\omega}{e^z-1},\qquad
\frac{C_{\rm osc}}{k_B}=\frac{z^2e^{-z}}{(1-e^{-z})^2}.
$$
At $T\gg\theta_v$, the mean <energy> approaches $k_BT$ and $C_{\rm osc}$ approaches $k_B$. At $T\ll\theta_v$, thermal excitation is exponentially suppressed and $C_{\rm osc}$ tends to zero, although the <zero-point energy> $\hbar\omega/2$ survives. Frozen thus means little thermal response, not zero motion or zero <energy>.<Thermodynamics and Statistical Mechanics by Richard Fitzpatrick/Harmonic Oscillators>[equations 7.140–7.155]{ref}

\Image[/equipartition-quantum-heat-capacity.png]
{title=Model <heat capacities>: a <quantum harmonic oscillator> and a diatomic <ideal gas>}
{description=Original computed equilibrium curves, not measured gas data. Left: $C_{\rm osc}/k_B$ approaches its classical value 1 as $T/\theta_v$ grows. Right: $C_V/(Nk_B)=3/2+C_{\rm rot}/k_B+C_{\rm osc}/k_B$ for stipulated $\theta_v/\theta_r=100$. The rotational <partition function> is $\sum_{j=0}^{\infty}(2j+1)e^{-\theta_r j(j+1)/T}$ with every nonnegative integer $j$ allowed; $C_{\rm rot}/k_B$ is the <variance> of $j(j+1)$ divided by $(T/\theta_r)^2$. No molecular nuclear-spin restrictions, <thermal dissociation> or nonharmonic effects are modeled. Horizontal guides mark the three limiting values, not exact plateaus at finite <temperature>.}

A motivating measurement is <thermal calibration of an optical trap>. A focused <laser> through a microscope objective confines a bead in water; imaging or a quadrant photodetector records a position <time series>. Gieseler and colleagues describe a polystyrene bead of radius $1.03\,\mathrm{\mu m}$ at $293.15\,\mathrm K$, a $1064\,\mathrm{nm}$ trapping <laser>, and photodetector acquisition at $10^5\,\mathrm{Hz}$. Their recorded bead continues undergoing <Brownian motion>; higher trapping power produces a narrower equilibrium position distribution. Infer the centered <variance>, not a squared distance from an arbitrary camera origin:
$$
\sigma_x^2=\left\langle(x-\langle x\rangle)^2\right\rangle,\qquad
k=\frac{k_BT}{\sigma_x^2}.
$$
The <normal distribution> position histogram and agreement with dynamical calibration methods support the local <harmonic optical trap> interpretation. For a stipulated example, $T=300\,\mathrm K$ and $\sigma_x=20\,\mathrm{nm}$ imply $k\simeq1.04\times10^{-5}\,\mathrm{N/m}=0.0104\,\mathrm{pN/nm}$. This calculated scale is not an experimental reading.<Optical Tweezers: A Comprehensive Tutorial from Calibration to Applications by Jan Gieseler>[§§2.1–2.2, 3.3; Tables 1–3]{ref}

Position calibration is essential: if detector output $v$ has conversion $x=s(v-v_0)$, its physical <variance> is $s^2\operatorname{Var}(v)$. An unknown scale $s$ cannot be determined together with $k$ from that one <variance>. A complementary calibration demonstrated by Tolić-Nørrelykke and colleagues combines the <power spectrum> of thermal motion with the bead response to known sinusoidal motion of a translation stage. The driven response supplies an additional length scale, and their method does not require bead size, liquid <dynamic viscosity> or wall distance as inputs. It still uses a thermal dynamical model; agreement between methods is a consistency check, not a theory-free proof of <equipartition theorem>.<Calibration of optical tweezers with positional detection in the back-focal-plane by Simon F. Tolić-Nørrelykke and others>[abstract]{ref}

The readout itself can hide fluctuations. Wong and Halvorsen used a $1064\,\mathrm{nm}$ <optical trap> and adjustable-exposure CCD imaging of a bead in water. They varied exposure and trapping power, held the bead away from the nearest wall, adjusted illumination to maintain comparable images, and measured tracking noise using a stuck bead. The measured <variance> fell as exposure increased; corrected results agreed with their time-averaging model. For a stationary overdamped <harmonic optical trap>, with <optical trap relaxation time> $\tau$, an exposure of length $W$ measures $\bar x_W=W^{-1}\int_0^W x(t)\,dt$. Its ideal noise-free <variance> is
$$
\operatorname{Var}(\bar x_W)=\frac{k_BT}{k}S(\alpha),\qquad
\alpha=\frac{W}{\tau},\qquad
S(\alpha)=\frac{2(\alpha-1+e^{-\alpha})}{\alpha^2}.
$$
For $\alpha>0$, $S(\alpha)<1$: using the blurred <variance> in the uncorrected formula overestimates $k$ by $1/S(\alpha)$. At $W=\tau$, the calculated factor is $e/2\simeq1.36$. Additive tracking noise instead raises the measured <variance> and biases the inferred $k$ downward if left uncorrected.<The effect of integration time on fluctuation measurements: calibrating an optical trap in the presence of motion blur by Wesley P. Wong and others>[equations 15]{ref}

\Image[/equipartition-phase-space-readout.png]
{title=Equal mean quadratic <energies> with unequal fluctuations, and exposure-biased readout}
{description=Original analytic models, not bead trajectories or measured curves. Left: equal-<energy> contours $H/(k_BT)=1/2,2$ in scaled <phase space>, with $Q=x/\sqrt{k_BT/k_0}$, $P=p/\sqrt{mk_BT}$ and $H/(k_BT)=(P^2+\kappa Q^2)/2$, for $\kappa=k/k_0=1,4$. Increasing stiffness narrows position fluctuations but leaves both mean quadratic contributions equal to $k_BT/2$. Right: the exact noise-free exposure reduction $S(W/\tau)$; at $W/\tau=1$, $S=2/e$ and naive inferred stiffness is $e/2$ times true stiffness. The exposure calculation assumes stationary overdamped harmonic <Brownian motion> and uniform averaging.}

Useful controls are to record over many <optical trap relaxation times>, compare blocks for drift, calibrate the position scale, measure fixed-bead noise, vary exposure, and check the position histogram for departures from a <normal distribution>. A sparse sequence of accurate instantaneous positions can estimate an equilibrium <variance>; a long exposure averages away motion even if many frames are collected. Flow, appreciable <laser> heating, escape from the harmonic region or nonconservative <forces> can break the assumed <thermal equilibrium>. Inferring $k$ by imposing <equipartition theorem> is a calibration, whereas testing the relation requires an independently established stiffness and position scale. The beautiful practical connection is that microscopic randomness can set a <force> scale: once calibrated, a small constant applied <force> displaces the mean by $f/k$. The same quadratic-term counting predicts macroscopic <heat capacity> and makes microscopic fluctuations useful measurements.