# Statistical thermodynamics [closed]

Entropy of indistinguishable particles $$S$$ is

$$S = k\ln W,$$

but in some places notation is different:

$$S = k\ln Q + \frac{U}{T}$$

The only time I've ever seen that second notation is when referring to the substitution of the Helmholtz energy, as A = U-TS and therefore A = -kTlnQ. If you want an in depth explanation of how the thing is derived I suggest looking at Chapter 10 of Biomolecular Thermodynamics: From Theory to Application by Douglas E. Barrick.

Here are some photos of the key parts:  The second formula you quote follows directly from the first. Starting with $$W=N!/(n_1!n_2!\cdots)$$ for $$N$$ distinguishable particles spread over set of $$i$$ energy levels with energy $$\epsilon_i$$, then $$\ln(W)=\ln(N!)-\sum\ln(n_1!)$$. Using the Sterling formula for factorials the entropy becomes, after some fiddling around and simplifying, $$\displaystyle S=-Nk_B\sum \frac{n_i}{N}\ln\left(\frac{n_i}{N} \right)=-Nk_B\sum p_i\ln(p_i)$$ where $$p_i=n_i/N$$ is the chance that the $$i^{th}$$ state is occupied. This fraction is also $$p_i=e^{-\epsilon_i/k_BT}/Z$$ where $$Z$$ is the partition function and $$Z=\sum_ie^{-\epsilon_i/k_BT}$$ then $$\displaystyle \ln(p_i)=-\frac{\epsilon_i}{k_BT}-\ln(Z)$$ and substituting gives

$$S=-Nk_B \left(-\frac{1}{k_BT}\sum(p_i\epsilon_i)-\ln(Z\sum p_i)\right)$$

which becomes $$\displaystyle S=\frac{U}{T}+Nk_B\ln(Z)$$

after evaluating the terms $$\displaystyle \sum p_i=1$$, the probability over all states is one and the total energy $$\sum p_i\epsilon_i$$ is $$\displaystyle \sum p_i\epsilon_i=\frac{U}{N}$$ where $$U$$ is the internal energy.

This approach is only valid for solids because in some way the atoms in a solid can be identified. In a gas this is not possible and the number of microstates must be divided by $$N!$$ because after exchanging atoms/molecules the state of the gas still it indistinguishable. For a perfect gas it is found that $$\displaystyle S=\frac{U}{T}+Nk_B\ln(Z) -Nk_B(\ln(Z)-1)$$