I'm following this derivation of the equipartition theorem:


On the second page, it is said that a standard result from statistical mechanics is this:

$$U = kT ^{2} \frac{d(ln(q))}{dT} $$

That is, the internal energy is proportional to the derivative of the logarithm of the number of states.

How is this expression obtained from statistical mechanics? I'm aware of the Maxwell-Boltzmann statistics, but I haven't been able to derive this relationship nor have I found a derivation online.

  • 1
    $\begingroup$ You can find this at en.m.wikipedia.org/wiki/… if you scroll down to the section titled Calculating the thermodynamic total energy. $\endgroup$
    – user197851
    Nov 2, 2018 at 20:02
  • $\begingroup$ Apply statistical physics to determine the internal energy and the specific heat capacity of polyatomic gases. $\endgroup$ May 25, 2023 at 15:26

1 Answer 1


The (canonical) partition function is: $$\mathcal Z = \sum_n g_ne^{-\beta E_n}$$ where $\beta \equiv \frac 1{k_B T}$ is the inverse temperature, and the sum runs over different energy levels of the system, with $g_n$ being the degenery of the $n^\mathrm{th}$ eigenenergy. Taking a derivative with respect to $\beta$ from both sides, we get: $$\frac{\partial}{\partial \beta} \mathcal Z = -\sum_n g_n E_n e^{-\beta E_n} = - \mathcal Z \sum_n g_n\frac{e^{-\beta E_n}}{\mathcal Z}E_n$$ But $\mathrm{Pr}(E = E_n)=g_n{e^{-\beta E_n}}/{\mathcal Z}$ is simply the probability of the system being in the $n^\mathrm{th}$ energy level. Thus: $$-\frac{1}{\mathcal Z}\frac{\partial}{\partial \beta} \mathcal Z = \sum_n E_n \mathrm{Pr}(E=E_n) = \langle E \rangle \equiv U$$ Writing this in a slightly different way, we have: $$-\frac{\partial}{\partial \beta} \ln \mathcal Z = U$$ And rewriting it in terms of $T = \frac{1}{k_B \beta}$ gives the final result: $$U = k_B T^2 \frac{\partial}{\partial T} \ln(\mathcal Z)$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.