The relationship between entropy $S$, the total number of particles $N$, the total energy $U(\beta)$, the partition function $Z(\beta)$ and a yet to be defined constant $\beta$ is: $$S(\beta)=k_BN \cdot \ln(Z(\beta)) - \beta k_B \cdot U(\beta)$$ Which leads to: $$\frac{dS}{d\beta} = -k_B\beta \cdot \frac{dU}{d\beta}$$ And since $dS = \frac{dU}{T}$ this means that $\beta = -\frac{1}{k_BT}$ Source starting from sheet 40

However, this derivation does not take the degeneracy of quantum states into account. If it does then $S(\beta)$ would have an extra parameter in its formula. If the number of quantum states of an energy level is $g_j$, then I'd conclude: $$S = k_BN \cdot \ln(Z(\beta)) - k_B\beta\cdot U(\beta) + k_B \cdot \sum^n_{j=1}\bigg[\ln(g_j)\cdot \frac{N}{Z(\beta)} \cdot e^{\beta E_j}\bigg]$$

Since $\ln(g_j) = \ln\big(\frac{N}{Z(\beta)}e^{\beta E_j}\big)- \beta E_j - \frac{N}{Z(\beta)}$, this would eventually give me: $$\frac{dS}{d\beta} = k_B\cdot\left( - \beta\cdot\frac{dU}{d\beta} + \frac{U(\beta)\cdot N}{Z(\beta)} - U(\beta) \right)$$ Derivation. But using again $dS = \frac{dU}{T}$, this relationship does not give $\beta = -\frac{1}{k_BT}$.

Is it permitted for $\beta$ to have a different value than $-\frac{1}{k_BT}$ when quantum states is taken into account or am I misunderstanding something here?

  • $\begingroup$ Why do you think degeneracy will somehow make the first formula for $S$ invalid? I don't think it will. The formula is general. $\endgroup$ May 31, 2019 at 21:40
  • $\begingroup$ @JánLalinský The first formula for $S$ doesn't include degeneracy. From what I understand, degeneracy needs an additional parameter in order to calculate the number of microstates correctly. $\endgroup$
    – Phy
    Jun 1, 2019 at 1:04
  • 1
    $\begingroup$ The degeneracy is taken into account when calculating $Z$, no? The sum there is over all states, not over energy levels. $\endgroup$ Jun 1, 2019 at 12:12
  • $\begingroup$ @JánLalinský From what I know, $Z = \sum_{j=1}^n g_j \cdot e^{\beta E_j}$ where $E_j$ is the energy level and $g_j$ the degeneracy. When degeneracy is taken into account, one would have to solve for $\ln(g_j) - \ln(n_j) + \alpha + \beta E_j = 0$, where $\alpha = \frac{N}{Z}$. There's a source that supports this but it continues deriving $\beta$ using chemical free energy, I am interested in deriving it using the equation for entropy $S$. See source on sheet 15 here: alan.ece.gatech.edu/ECE6451/Lectures/StudentLectures/… $\endgroup$
    – Phy
    Jun 1, 2019 at 23:06
  • 1
    $\begingroup$ I don't think those $g$'s in the formula for $S$ are right. A slightest shift of energies of states will make all $g$'s zero, so $S$ will change by a big amount, but $Z$ and $U$ will remain the same. In other words, $S$ is strongly dependent on whether the states have exactly the same energy, or very close but different energy. This does not seem likely, physical entropy should not change by a finite amount after making such arbitrarily small difference. $\endgroup$ Jun 2, 2019 at 21:24

2 Answers 2


I have figured it out.

The way I included degeneracy was correct but I made some subtle mistakes during substitution of some parameters.

The formula for $\ln(\Omega)$ when degeneracy $g_j$ is taken into account is: $$\ln(\Omega)= N \cdot \ln(N) - N - \sum^n_{j=1}[n_j \cdot \ln(n_j) - n_j] + \sum^n_{j=1} [\ln(g_j) \cdot n_j]$$ Substituting $n_j = g_j \cdot \frac{N}{Z} \cdot e^{\beta E_j}$ (I erroneously left out the $g_j$ during this substitution) along with rewriting, splitting the summations and simplifying eventually gives me: $$\ln(\Omega) = N \cdot \ln(Z) - \beta U$$ Which is the exact equation as when degeneracy is not taken into account, and thus I get the same value for $\beta$ when taking the derivative of $S = k_B \cdot \ln(\Omega)$ and putting it next to the equation of entropy $dS = \frac{dU}{T}$.

Details Derivation

Formula for $\ln(\Omega)$ when taking degeneracy into account $$\ln(\Omega)= N \cdot \ln(N) - N - \sum^n_{j=1}[n_j \cdot \ln(n_j) - n_j] + \sum^n_{j=1} [\ln(g_j) \cdot n_j]$$

According to Boltzmann Statistics $n_j = g_j \frac{N}{Z} e^{\beta E_j}$. Furthermore, $\ln(n_j) = \ln\big(g_j \frac{N}{Z}\big) + \beta E_j$. Substituting these parameters:

$$\ln(\Omega)= N \cdot \ln(N) - N - \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\cdot \bigg(\ln\big(g_j \frac{N}{Z}\big) + \beta E_j\bigg) - g_j \frac{N}{Z} e^{\beta E_j}\bigg] + \sum^n_{j=1} \bigg[\ln(g_j) \cdot g_j \frac{N}{Z} e^{\beta E_j}\bigg]$$

Splitting the 1st summation into 3 summations between the + and – signs and removing the brackets that appear after splitting: $$\ln(\Omega)= N \cdot \ln(N) - N - \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\cdot \ln\big(g_j \frac{N}{Z}\big)\bigg] - \beta\sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j} \cdot E_j)\bigg] + \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\bigg] + \sum^n_{j=1} \bigg[\ln(g_j) \cdot g_j \frac{N}{Z} e^{\beta E_j}\bigg]$$ The 2nd summation is equal to the total energy $U$, and the 3rd summation is equal to the total number of particles $N$ which cancels the $-N$ term. $$\ln(\Omega)= N \cdot \ln(N) - \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\cdot \ln\big(g_j \frac{N}{Z}\big)\bigg] - \beta U + \sum^n_{j=1} \bigg[\ln(g_j) \cdot g_j \frac{N}{Z} e^{\beta E_j}\bigg]$$ In the 1st summation term, substituting $\ln\bigg(g_j \frac{N}{Z}\bigg) = \ln(g_j) + \ln\big(\frac{N}{Z}\big)$ and then splitting that summation between the newly created + sign as well and removing the appearing brackets: $$\ln(\Omega)= N \cdot \ln(N) - \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\cdot \ln(g_j)\bigg] - \ln\big(\frac{N}{Z}\big) \sum^n_{j=1}\bigg[g_j \frac{N}{Z} e^{\beta E_j}\bigg] -\beta U + \sum^n_{j=1} \bigg[\ln(g_j) \cdot g_j \frac{N}{Z} e^{\beta E_j}\bigg]$$ The first and 3rd summations cancel each other out. The 2nd summation is equal to $N$, giving: $$\ln(\Omega)= N \bigg(\ln(N) - \ln\big(\frac{N}{Z}\big)\bigg) - \beta U$$ Since, $\ln(N) - \ln\big(\frac{N}{Z}\big) = \ln(Z)$, this gives: $$\ln(\Omega) = N\cdot \ln(Z) - \beta U$$ The $Z$ and $U$ are functions of $\beta$. Equation for entropy is $S = k_B \cdot \ln(\Omega)$. Thus deriving $\frac{dS}{d\beta}$: $$\frac{dS}{d\beta} = k_B \bigg(\frac{N}{Z} \cdot \frac{dZ}{d\beta} - \bigg(U + \beta \frac{dU}{d\beta}\bigg)\bigg)$$ Since $\frac{dZ}{d\beta} = \frac{UZ}{N}$ this gives: $$\frac{dS}{d\beta} = -k_B \cdot \beta \frac{dU}{d\beta}$$ Knowing that $dS = \frac{dU}{T}$ (when a fixed volume is assumed), this yields: $$\beta = - \frac{1}{k_B T}$$

  • $\begingroup$ Okay mate, you're getting the bounty as well. If you can provide the calculations in a compact manner (i.e. a PDF file, no need to be rigorous, just project the process), I will be extremely pleased. Again, notify me if you do so. $\endgroup$
    – acarturk
    Jun 6, 2019 at 23:11
  • $\begingroup$ @acarturk Thanks a lot mate. I have included a PDF with the derivation in my answer. Let me know if something's missing. $\endgroup$
    – Phy
    Jun 7, 2019 at 2:31
  • $\begingroup$ Please write the detailed derivation in the answer. Links to dropbox might not be long lived, and the calculation will not be accessible in the future. $\endgroup$
    – Adam
    Jun 7, 2019 at 8:05
  • $\begingroup$ @Adam There you go $\endgroup$
    – Phy
    Jun 7, 2019 at 15:18
  • $\begingroup$ And, try accepting your own answer if you wish $\endgroup$
    – acarturk
    Jun 7, 2019 at 20:53

The usual way to make statistical mechanics is to first derive a probability distribution of the states, such as: $$ p(j) = \frac{e^{-\beta E_j}}{Z} $$ where $j$ is the index of the state and $Z$ is the normalization. This is compatible with the presence of degeneracy: simply, two states $j$ and $j'$ have the same energy, $E_j=E_{j'}$.

Then, some macroscopical physical quantities are defined. For defining the first law of thermodynamics, we define $U=<E>$ (the average of $E$) and for the second we define $S$ according to the Shannon entropy. Expressed in terms of probabilities: $$ U = \sum_j E_j p(j) $$ and $$ S = -k \sum_j p_j \log p_j $$ Also these formulas are compatible with the presence of degeneracy, as before. Now, we notice that the two sums can be expressed in terms of $Z$, or, better, in terms of $F=-1/\beta \log(Z)$.

All this is done without any issue with degeneracy, simply by assuming that there can be two (or more) states with the same energy. Any expression obtained by making use of the degeneracy must give the same results.

  • $\begingroup$ So simply degeneracy doesn't affect $\Omega$ at all? $\endgroup$
    – acarturk
    Jun 4, 2019 at 10:48
  • $\begingroup$ You can either work with states $j$ which can have same energy, and no degeneracy, or grouping the states with the same energy and adding the degeneracy where it is needed. E.g. you can have two states $j=1$ and $j=2$ with energy $E_1=E_2=$1 eV, or grouping them with the same index $j=1$, with $E_1=$1 eV, and degeneracy $g_1=$2. The result must be the same. Btw, my discussion was in the canonical case (maybe, you are considering the microcanonical, where the entropy is defined based on the number of states). $\endgroup$ Jun 4, 2019 at 11:45
  • $\begingroup$ @DorianoBrogioli Yes, I am talking about the microcanonical ensemble. What you're saying does make somewhat sense to me, but it is still weird that the derived formulas differ depending on the degeneracy according to sources. Compare formula for $n_j$ without degeneracy on sheet 38 here: hep.ph.liv.ac.uk/~hock/Teaching/… and the formula with degeneracy on sheet 15 here: alan.ece.gatech.edu/ECE6451/Lectures/StudentLectures/… You can compare the other formulas too $\endgroup$
    – Phy
    Jun 4, 2019 at 22:36
  • $\begingroup$ I would say that the former source uses the index $j$ for the states (two states can have the same energy), while the latter uses the index $j$ for the energy levels (for each energy level there can be two or more states). It's an annoying difficulty in notations. The fastest way to get rid of it is to re-derive the formulas, using our preferred representation! $\endgroup$ Jun 5, 2019 at 7:42
  • $\begingroup$ @DorianoBrogioli I don't think the former source is considering it this way. Starting from sheet 21, you can see that they are treating each $j$ as a different energy level. $\endgroup$
    – Phy
    Jun 5, 2019 at 14:20

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.