# The equipartition theorem

We now want to cover an important topic in statistical mechanics, the equipartition theorem. In very general words it can be formulated as follows: the mean energy of a particle is equal to ${\displaystyle k_{B}T/2}$ times the number of microscopic degrees of freedom.

We now see some examples and then we shall prove the theorem in general.

## Real gas

Let us begin with a gas with the following Hamiltonian:

${\displaystyle {\mathcal {H}}=\sum _{i}{\frac {{\vec {p}}_{i}{}^{2}}{2m}}+\sum _{i}U({\vec {q}}_{i})+{\frac {1}{2}}\sum _{i\neq j}U_{2}({\vec {q}}_{i},{\vec {q}}_{j})}$
(so it is not necessarily an ideal gas since we are also including the interaction potential ${\displaystyle U_{2}}$). Its phase space probability density is of course:
${\displaystyle \rho (\mathbb {Q} ,\mathbb {P} )={\frac {1}{Z}}e^{-\beta \left(\sum _{i}{\frac {{\vec {p}}_{i}{}^{2}}{2m}}+\sum _{i}U({\vec {q}}_{i})+{\frac {1}{2}}\sum _{i\neq j}U_{2}({\vec {q}}_{i},{\vec {q}}_{j})\right)}}$
Then we will have:
${\displaystyle \left\langle {\frac {{\vec {p}}_{i}^{2}}{2m}}\right\rangle ={\frac {3}{2}}k_{B}T}$
In fact:
${\displaystyle \left\langle {\frac {{\vec {p}}_{i}^{2}}{2m}}\right\rangle ={\frac {\int {\frac {{\vec {p}}_{i}{}^{2}}{2m}}e^{-\beta \left(\sum _{j}{\frac {{\vec {p}}_{j}{}^{2}}{2m}}+\sum _{j}U({\vec {q}}_{j})+{\frac {1}{2}}\sum _{j\neq k}U_{2}({\vec {q}}_{j},{\vec {q}}_{k})\right)}d\mathbb {Q} d\mathbb {P} }{\int e^{-\beta \left(\sum _{j}{\frac {{\vec {p}}_{j}{}^{2}}{2m}}+\sum _{j}U({\vec {q}}_{j})+{\frac {1}{2}}\sum _{j\neq k}U_{2}({\vec {q}}_{j},{\vec {q}}_{k})\right)}d\mathbb {Q} d\mathbb {P} }}}$
and the integrals in ${\displaystyle \mathbb {Q} }$ and ${\displaystyle \mathbb {P} }$ factorize, since there are no terms that mix them. Therefore:
${\displaystyle \left\langle {\frac {{\vec {p}}_{i}^{2}}{2m}}\right\rangle ={\frac {\int {\frac {{\vec {p}}_{i}{}^{2}}{2m}}e^{-\beta \sum _{j}{\frac {{\vec {p}}_{j}{}^{2}}{2m}}}d\mathbb {P} }{\int e^{-\beta \sum _{j}{\frac {{\vec {p}}_{j}{}^{2}}{2m}}}d\mathbb {P} }}={\frac {\int {\frac {{\vec {p}}_{i}{}^{2}}{2m}}e^{-\beta {\frac {{\vec {p}}_{i}{}^{2}}{2m}}}d{\vec {p}}_{i}}{\int e^{-\beta {\frac {{\vec {p}}_{i}{}^{2}}{2m}}}d{\vec {p}}_{i}}}}$
where in the last step we have done the integrals for ${\displaystyle j\neq i}$, which are all equal and thus simplify. Thus, in the end:
${\displaystyle \left\langle {\frac {{\vec {p}}_{i}^{2}}{2m}}\right\rangle =-{\frac {\partial }{\partial \beta }}\ln \left(\int e^{-\beta {\frac {{\vec {p}}{}^{2}}{2m}}}d{\vec {p}}\right)=-{\frac {\partial }{\partial \beta }}\ln \left[\left({\frac {2\pi m}{\beta }}\right)^{3/2}\right]={\frac {3}{2}}k_{B}T}$
In terms of what we have stated at the beginning in this case the microscopic degrees of freedom are three, i.e. the three possible directions of motion.

## Harmonic oscillator in a heat bath

Let us now consider a single one-dimensional harmonic oscillator in a heat bath (the presence of the heat bath justifies the use of the canonical partition function); in other words we are considering a single particle with Hamiltonian:

${\displaystyle {\mathcal {H}}={\frac {p^{2}}{2m}}+m{\frac {\omega ^{2}}{2}}q^{2}}$
The (single-particle) partition function is:
{\displaystyle {\begin{aligned}Z=\int e^{-\beta \left({\frac {p^{2}}{2m}}+m{\frac {\omega ^{2}}{2}}q^{2}\right)}{\frac {dqdp}{h}}={\frac {1}{h}}\left(\int e^{-\beta m{\frac {\omega ^{2}}{2}}q^{2}}dq\right)\left(\int e^{-\beta {\frac {p^{2}}{2m}}}dp\right)=\\={\frac {1}{h}}{\sqrt {\frac {2\pi }{\beta m\omega ^{2}}}}{\sqrt {\frac {2\pi m}{\beta }}}={\frac {1}{\beta \hbar \omega }}\end{aligned}}}
Now, from the expression of the partition function we see that we should have:
${\displaystyle \left\langle {\frac {p^{2}}{2m}}\right\rangle =\left\langle m{\frac {\omega ^{2}}{2}}q^{2}\right\rangle =-{\frac {\partial }{\partial \beta }}\ln Z}$
However, if we simply derive ${\displaystyle Z}$ as we have found it we determine ${\displaystyle \left\langle p^{2}/2m+m\omega ^{2}q^{2}/2\right\rangle }$, not ${\displaystyle \left\langle p^{2}/2m\right\rangle }$ and ${\displaystyle \left\langle m\omega ^{2}q^{2}/2\right\rangle }$ singularly. In order to avoid this problem we give a different name to the parameters ${\displaystyle \beta }$ that multiply the kinetic and the configurational parts in the integrals that define ${\displaystyle Z}$, i.e. we set:
${\displaystyle Z={\frac {1}{h}}\left(\int e^{-\beta m{\frac {\omega ^{2}}{2}}q^{2}}dq\right)\left(\int e^{-\beta '{\frac {p^{2}}{2m}}}dp\right)={\frac {1}{\hbar \omega }}\cdot {\frac {1}{\sqrt {\beta \beta '}}}}$
(and of course in the end we must set ${\displaystyle \beta =\beta '}$). This way, we have:
${\displaystyle \left\langle {\frac {p^{2}}{2m}}\right\rangle =-{\frac {\partial }{\partial \beta }}\ln Z={\frac {1}{2}}\cdot {\frac {1}{\beta \beta '}}\beta '={\frac {1}{2\beta }}={\frac {k_{B}T}{2}}}$

${\displaystyle \left\langle m{\frac {\omega ^{2}}{2}}q^{2}\right\rangle =-{\frac {\partial }{\partial \beta '}}\ln Z={\frac {1}{2\beta '}}_{|\beta '=\beta }={\frac {k_{B}T}{2}}}$
Again, we see that every degree of freedom of the particle (in this case, the translational and vibrational ones) contributes with ${\displaystyle k_{B}T/2}$ to its energy.

We can now move on and prove the equipartition theorem in general.

Theorem (Equipartition)

Every term in the Hamiltonian of a system that appears only quadratically contributes to the total energy with ${\displaystyle k_{B}T/2}$. In other words, if we can write the Hamiltonian of the system in the form:

${\displaystyle {\mathcal {H}}(\mathbb {Q} ,\mathbb {P} )={\mathcal {H}}'+kx^{2}}$
where ${\displaystyle x}$ is any of the variables ${\displaystyle (\mathbb {Q} ,\mathbb {P} )}$ and ${\displaystyle {\mathcal {H}}'}$ is an Hamiltonian that does not depend on ${\displaystyle x}$, then:
${\displaystyle \left\langle kx^{2}\right\rangle ={\frac {k_{B}T}{2}}}$

Proof

The partition function of the system is:

${\displaystyle Z=\int d\Gamma e^{-\beta {\mathcal {H}}}=\int e^{-\beta {\mathcal {H}}'}d\Gamma _{x}\int e^{-\beta 'kx^{2}}dx}$
where with ${\displaystyle d\Gamma _{x}}$ we mean ${\displaystyle d\Gamma }$ without ${\displaystyle dx}$, and as we have done before we call ${\displaystyle \beta '}$ the parameter ${\displaystyle \beta }$ that multiplies ${\displaystyle kx^{2}}$ in order to compute ${\displaystyle \left\langle kx^{2}\right\rangle }$ more simply. Therefore:
${\displaystyle Z={\sqrt {\frac {\pi }{k\beta '}}}\int e^{-\beta {\mathcal {H}}'}d\Gamma _{x}}$
From the definition of partition function, then:
${\displaystyle \left\langle kx^{2}\right\rangle =\int kx^{2}e^{-\beta 'kx^{2}}dx=-{\frac {\partial }{\partial \beta '}}\ln Z={\frac {1}{2\beta '}}_{|\beta '=\beta }={\frac {k_{B}T}{2}}}$

Therefore, if we have an ideal gas of ${\displaystyle N}$ particles its energy will be:

${\displaystyle E=\left\langle {\mathcal {H}}\right\rangle ={\frac {3}{2}}Nk_{B}T}$
since every particle contributes to the energy with ${\displaystyle 3k_{B}T/2}$. The specific heat at constant volume of such a system is then ${\displaystyle C_{V}=\partial E/\partial T=3Nk_{B}/2}$, and if we compute it for a single mole of gas we will have:
${\displaystyle C_{V}^{\text{m.}}={\frac {3}{2}}R}$
where "m." stands for "molar" and ${\displaystyle R=N_{A}k_{B}}$ is the gas constant. On the other hand if we have a gas of ${\displaystyle N}$ one-dimensional harmonic oscillators then the energy of the system will be:
${\displaystyle E=\left\langle {\mathcal {H}}\right\rangle =k_{B}T}$
because this time every particle will contribute with ${\displaystyle k_{B}T}$ (a ${\displaystyle k_{B}T/2}$ for the kinetic part and a ${\displaystyle k_{B}T/2}$ for the potential term), and its molar specific heat at constant volume is ${\displaystyle C_{V}^{\text{m.}}=R}$.

## An application of the equipartition theorem: the specific heat of crystals

Now, we could ask if the model of a gas of harmonic oscillators is actually realistic; in other words, are there cases where a particle can be actually considered a harmonic oscillator? Let us suppose that the particles of our system are subjected to a potential of the following kind[1]:

Interaction potential

Clearly, the equilibrium configurations for the particles will be ${\displaystyle q=q_{0}}$; furthermore, if the temperature of the system is very small the fluctuations of the particles around this equilibrium will be very small and therefore we can expand the potential around ${\displaystyle q_{0}}$:

${\displaystyle v(q)=v(q_{0})+(q-q_{0}){\frac {\partial v}{\partial q}}_{|q_{0}}+{\frac {1}{2}}(q-q_{0})^{2}{\frac {\partial ^{2}v}{\partial q^{2}}}_{|q_{0}}+\cdots }$
Now, since ${\displaystyle q_{0}}$ is a global minimum for ${\displaystyle v}$ we will have ${\displaystyle \partial v/\partial q_{|q_{0}}=0}$, and ${\displaystyle \partial ^{2}v/\partial q_{|q_{0}}^{2}:=k>0}$. Therefore, neglecting ${\displaystyle v(q_{0})}$ since it is just an additive constant, the potential acting on the particles will be:
${\displaystyle v(q)\sim {\frac {k}{2}}(q-q_{0})^{2}:={\frac {m\omega ^{2}}{2}}(q-q_{0})^{2}}$
where in the last step we have renamed the constant ${\displaystyle k}$ as ${\displaystyle m\omega ^{2}}$. Let us see explicitly that this approximation is good if the system is in contact with a heat bath whose temperature is low, i.e. that the mean displacement of the particles from ${\displaystyle q_{0}}$ is small at low temperatures. Setting ${\displaystyle q_{0}=0}$ for simplicity, we have:
${\displaystyle \left\langle q^{2}\right\rangle ={\frac {2}{m\omega ^{2}}}\left\langle m{\frac {\omega ^{2}}{2}}q^{2}\right\rangle ={\frac {2}{m\omega ^{2}}}\cdot {\frac {k_{B}T}{2}}={\frac {k_{B}T}{m\omega ^{2}}}}$
and therefore if ${\displaystyle k_{B}T\ll m\omega ^{2}}$ then ${\displaystyle \left\langle q^{2}\right\rangle \approx 0}$. This means that for low temperatures the interparticle potential can actually be approximated with a harmonic one. However, if this is not the case the mean displacement ${\displaystyle \left\langle q^{2}\right\rangle }$ from the equilibrium will be large and the particle will "realize" that the potential is actually different from a parabola.

Now, these facts can be used in order to describe the properties of crystals. Let us in fact suppose to have a system of ${\displaystyle N}$ particles with Hamiltonian:

${\displaystyle {\mathcal {H}}=\sum _{i=1}^{N}{\frac {{\vec {p}}_{i}{}^{2}}{2m}}+\underbrace {{\frac {1}{2}}\sum _{i\neq j}{\mathcal {V}}(|{\vec {q}}_{i}-{\vec {q}}_{j}|)} _{:={\mathcal {V}}(\mathbb {Q} )}}$
and that the interaction potential ${\displaystyle {\mathcal {V}}(\mathbb {Q} )}$ is like the one represented in the previous figure when considering the distance between two atoms, and such that the particles of the system have positions ${\displaystyle {\vec {q}}_{i}={\vec {q}}_{i}{}^{(0)}+\delta {\vec {q}}_{i}}$, where ${\displaystyle {\vec {q}}_{i}{}^{(0)}}$ is the equilibrium position of the ${\displaystyle i}$-th particle (analogous to the position ${\displaystyle q_{0}}$ in figure above) and ${\displaystyle \delta {\vec {q}}_{i}}$ is the displacement from it. We also suppose that ${\displaystyle {\vec {q}}_{i}{}^{(0)}}$ are fixed and arranged in a lattice; this is what normally happens in crystalline solids (like metals). Therefore, just like we have done before, if we suppose the displacements ${\displaystyle \delta {\vec {q}}_{i}}$ to be small we can expand ${\displaystyle {\mathcal {V}}(\mathbb {Q} )}$ around the equilibrium positions ${\displaystyle \mathbb {Q} _{0}}$:
${\displaystyle {\mathcal {V}}(\mathbb {Q} )={\mathcal {V}}(\mathbb {Q} _{0})+\sum _{i}\sum _{\alpha }\delta q_{i\alpha }{\frac {\partial {\mathcal {V}}}{\partial q_{i\alpha }}}_{|\mathbb {Q} _{0}}+{\frac {1}{2}}\sum _{i,j}\sum _{\alpha ,\beta }\delta q_{i\alpha }\delta q_{j\beta }{\frac {\partial ^{2}{\mathcal {V}}}{\partial q_{i\alpha }\partial q_{j\beta }}}_{|\mathbb {Q} _{0}}+\cdots }$
where ${\displaystyle i=1,\dots ,N}$ is the index that labels the particle and ${\displaystyle \alpha =x,y,z}$ the index that labels its coordinates. Note that ${\displaystyle i\alpha }$ and ${\displaystyle j\beta }$ are single indexes (i.e., strictly speaking ${\displaystyle i}$ and ${\displaystyle \alpha }$ are not independent indexes, like ${\displaystyle j}$ and ${\displaystyle \beta }$). Since ${\displaystyle \mathbb {Q} _{0}}$ are the equilibrium positions of the particles, we have:
${\displaystyle {\frac {\partial {\mathcal {V}}}{\partial q_{i\alpha }}}_{|\mathbb {Q} _{0}}=0}$
Furthermore the second derivative of ${\displaystyle {\mathcal {V}}}$ is a matrix, which we call ${\displaystyle K}$:
${\displaystyle {\frac {\partial ^{2}{\mathcal {V}}}{\partial q_{i\alpha }\partial q_{j\beta }}}_{|\mathbb {Q} _{0}}:=K_{i\alpha ,j\beta }}$
This way, also neglecting the additive constant ${\displaystyle {\mathcal {V}}(\mathbb {Q} _{0})}$, we can write the interaction potential as:
${\displaystyle {\mathcal {V}}(\mathbb {Q} )={\frac {1}{2}}\sum _{i\alpha ,j\beta }\delta q_{i\alpha }K_{i\alpha ,j\beta }\delta q_{j\beta }={\frac {1}{2}}\delta \mathbb {Q} ^{T}K\delta \mathbb {Q} }$
Now, by definition ${\displaystyle K}$ is a symmetric matrix (remember that we must exchange ${\displaystyle i\alpha }$ with ${\displaystyle j\beta }$) and so it can be diagonalized, namely we can write:
${\displaystyle K=\mathbb {S} ^{T}\Lambda \mathbb {S} \quad {\text{with}}\quad \mathbb {S} ^{T}\mathbb {S} =\mathbb {I} ,\quad \Lambda =\operatorname {diag} (\lambda _{1},\dots ,\lambda _{3N}),\quad \lambda _{i}>0}$
Therefore the Hamiltonian of the system can be rewritten in the form:
${\displaystyle {\mathcal {H}}=\sum _{i}{\frac {{\vec {p}}_{i}{}^{2}}{2m}}+{\frac {1}{2}}\delta \mathbb {Q} ^{T}\mathbb {S} ^{T}\Lambda \mathbb {S} \delta \mathbb {Q} ={\frac {1}{2m}}\mathbb {P} ^{T}\cdot \mathbb {I} \cdot \mathbb {P} +{\frac {1}{2}}\delta \mathbb {Q} \mathbb {S} ^{T}\Lambda \mathbb {S} \delta \mathbb {Q} }$
If we now define the new variables:
${\displaystyle \delta {\hat {\mathbb {Q} }}:=\mathbb {S} \delta \mathbb {Q} \quad \qquad {\hat {\mathbb {P} }}:=\mathbb {SP} }$
then:
${\displaystyle {\mathcal {H}}={\frac {{\hat {\mathbb {P} }}{}^{2}}{2m}}+{\frac {1}{2}}\delta {\hat {\mathbb {Q} }}^{T}\Lambda \delta {\hat {\mathbb {Q} }}}$
or, explicitly:
${\displaystyle {\mathcal {H}}=\sum _{i\alpha }\left[{\frac {{\hat {p}}_{i\alpha }^{2}}{2m}}+\lambda _{i\alpha }{\frac {\delta {\hat {q}}_{i\alpha }^{2}}{2}}\right]}$
Therefore, with the previously defined change of variables (called normal modes of vibration) we have rewritten the Hamiltonian as a sum of ${\displaystyle 3N}$decoupled harmonic oscillators. Note in fact that in ${\displaystyle {\mathcal {V}}(\mathbb {Q} )}$ the positions ${\displaystyle \mathbb {Q} }$ are coupled by the matrix ${\displaystyle K}$, which in general is not diagonal[2], while now the new variables are not. Note however that these new variables are not related to the positions or the momenta of any of the atoms: they are just some generalised coordinates, which allow us to rewrite the Hamiltonian in a simpler way[3]. Thus, since our system is equivalent to a set of ${\displaystyle 3N}$ harmonic oscillators, its energy will be:
${\displaystyle \left\langle {\mathcal {H}}\right\rangle =3N\left({\frac {k_{B}T}{2}}+{\frac {k_{B}T}{2}}\right)=3Nk_{B}T}$
which is twice the energy of the ideal gas. Therefore, the model of crystals we are studying predicts a value for the molar specific heat at constant volume equal to:
${\displaystyle C_{V}^{\text{m.}}=3R}$
This is experimentally verified, but only for high temperatures; we will cover this issue in some more detail in the next section, and as we will see this problem is essentially due to the fact that for low temperatures quantum effects become relevant.

## One last application of the equipartition theorem: specific heat of biatomic gases

If we apply what we have seen for the equipartition theorem to a biatomic gas, what do we expect? In this case the atoms in a molecule can oscillate around their equilibrium positions and the molecules can rotate. Choosing a reference frame where the vector that connects the two atoms is directed along the ${\displaystyle z}$ axis, the Hamiltonian of such a system will be:

${\displaystyle {\mathcal {H}}=\sum _{i}{\frac {{\vec {p}}_{i}{}^{2}}{2m}}+\sum _{i}\left[\left({\frac {p_{{\text{rel}},i}{}^{2}}{2m}}+{\frac {m\omega ^{2}}{2}}q_{{\text{rel}},i}{}^{2}\right)+{\frac {1}{2}}\left(I_{1}{\dot {\theta }}_{i1}^{2}+I_{2}{\dot {\theta }}_{i2}^{2}\right)\right]}$
where ${\displaystyle q_{\text{rel}}}$ is the relative distance between two atoms in the same molecule and ${\displaystyle I_{\alpha }}$ and ${\displaystyle \theta _{i\alpha }}$ are, respectively, the moment of inertia of the molecule and its angle relative to the ${\displaystyle \alpha }$-th axis, with ${\displaystyle \alpha =x,y}$ (the rotations around the direction that connects the two atoms are ineffective). Therefore, we expect the energy of the system to be:
${\displaystyle \left\langle {\mathcal {H}}\right\rangle =Nk_{B}T\left({\frac {3}{2}}+2{\frac {1}{2}}+2{\frac {1}{2}}\right)={\frac {7}{2}}Nk_{B}T}$
and the molar specific heat at constant volume to be ${\displaystyle C_{V}^{\text{m.}}=7R/2}$. However, experimentally we observe something quite different: for low temperatures ${\displaystyle C_{V}^{\text{m.}}}$ turns out to be ${\displaystyle 3R/2}$, then at a certain point increasing the temperature ${\displaystyle C_{V}^{\text{m.}}}$ jumps to ${\displaystyle 5R/2}$, and then at higher temperatures there is another jump to ${\displaystyle 7R/2}$. In other words, "new" degrees of freedom become "visible" for high enough temperatures (in the case we have mentioned, increasing ${\displaystyle T}$ we "see" first the translational degrees of freedom, then the rotational and in the end the vibrational ones).

This is due to the fact that in reality the molecules are quantum systems and the observed behaviour of ${\displaystyle C_{V}^{\text{m.}}}$ comes from their properties on a quantum level. To be more explicit: it is a known fact that in quantum mechanics the energy levels of a system are discrete (for example, for a harmonic oscillator ${\displaystyle E_{n}=(n+1/2)\hbar \omega }$); in particular any system will have a non-null zero-point energy, i.e. the lowest possible energy level, and then all the possible excited states. If the temperature of the system is low enough it will occupy its lowest possible energy state; if we then increase ${\displaystyle T}$ the thermal energy of the system (${\displaystyle k_{B}T}$) at a certain point will be large enough to allow the system to pass to the first excited states, and then to the others. For example the harmonic oscillator has equally spaced energy levels, with the spacing equal to ${\displaystyle \hbar \omega }$; if the temperature of the system is such that ${\displaystyle k_{B}T\ll \hbar \omega }$ the system cannot acquire the necessary energy to pass to the first excited state (this will be possible as soon as ${\displaystyle k_{B}T\approx \hbar \omega }$). In the case of the biatomic gas the observed behaviour is due exactly to this mechanism: the first excited state of the vibrational spectrum has an energy higher to the first excited state of the rotational spectrum, so increasing the temperature at a certain point we will be able to give enough energy to the molecules to pass from their ground state to the first rotational excited state, and similarly when we further increase the temperature we will be able to make them pass to the first vibrational excited state.

1. This is the Lennard-Jones potential, which we will cover in some more detail in Mean field theories for weakly interacting systems. It is a very realistic potential for interatomic interactions.
2. The positions and the oscillations of the atoms in a crystal are strongly correlated: when an atom is excited and oscillates faster it "gives" some of its energy to the nearby atoms increasing their energy of oscillation. If this was not the case, the crystal would disgregate.
3. Note, however, that if our fundamental assumption is not valid, i.e. if the displacements of the atoms from their equilibrium positions are not small, then also these new variables would be coupled: in this case in fact we couldn't have neglected the third derivatives of ${\displaystyle {\mathcal {V}}}$, which using the expression of the Hamiltonian in terms of the normal modes of vibration would have been a coupling term between the ${\displaystyle \delta {\hat {q}}}$.