# 7.5: Entropy Can Be Expressed in Terms of a Partition Function

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

We have seen that the partition function of a system gives us the key to calculate thermodynamic functions like energy or pressure as a moment of the energy distribution. We can extend this formulism to calculate the entropy of a system once its $$Q$$ is known. We can start with our equations from Section 20-5:

$S = k \ln(W) \label{Boltz}$

$W=\frac{A!}{\prod_j{a_j}!} \nonumber$

Combining these equations, we obtain:

$S_{ensemble} = k \ln\frac{A!}{\prod_j{a_j}!} \nonumber$

Rearranging:

$S_{ensemble} = k \ln{A!}-k \sum_j{\ln{a_j!}} \nonumber$

Using Sterling's approximation:

$\begin{split}S_{ensemble} &= k A\ln{A}-k A - k \sum_j{a_j\ln{a_j}} + k \sum_j{a_j} \\ &= k A\ln{A}- k \sum_j{a_j\ln{a_j}}\end{split} \nonumber$

Since:

$\sum_j{a_j}=A \nonumber$

The probability of finding the system in state $$a_j$$ is:

$p_j=\frac{a_j}{A} \nonumber$

Rearranging:

$a_j = p_jA \nonumber$

Plugging in:

$S_{ensemble}=k A\ln{A}- k \sum_j{p_jA\ln{p_jA}} \nonumber$

Rearranging:

$S_{ensemble}=k A\ln{A}- k \sum_j{p_jA\ln{p_j}}- k \sum_j{p_jA\ln{A}} \nonumber$

If $$A$$ is constant, then:

$k \sum_j{p_jA\ln{A}} = k A\ln{A}\sum_j{p_j} \nonumber$

Since:

$$\sum_j{p_j} = 1$$

We get:

$S_{ensemble}=k A\ln{A}- k \sum_j{p_jA\ln{p_j}}- k A\ln{A} \nonumber$

The first and last term cancel out:

$S_{ensemble}=- k \sum_j{p_jA\ln{p_j}} \nonumber$

We can divide by $$A$$ to get the entropy of the system:

$S_{system}=- k \sum_j{p_j\ln{p_j}} \nonumber$

If all the $$p_j$$ are zero except for the for one, then the system is perfectly ordered and the entropy of the system is zero. The probability of being in state $$j$$ is::

$p_j=\frac{e^{-\beta E_j}}{Q} \nonumber$

Plugging into our equation, we obtain:

$\begin{split}S &= - k \sum_j{\frac{e^{-\beta E_j}}{Q}\ln{\frac{e^{-\beta E_j}}{Q}}} \\ &= - k \sum_j{\frac{e^{-\beta E_j}}{Q}\left(-\beta E_j- \ln{Q}\right)} \\ &= - \beta k \sum_j{\frac{E_je^{-\beta E_j}}{Q}}+\frac{k\ln{Q}}{Q}\sum_j{e^{-\beta E_j}} \\ \end{split} \nonumber$

Making use of:

$\beta k=\frac{1}{T} \nonumber$

And:

$\sum{\frac{e^{-\beta E_j}}{Q}}=\sum{p_j}=1 \nonumber$

We obtain:

$S= \dfrac{U}{T} + k\ln Q \label{20.42}$

7.5: Entropy Can Be Expressed in Terms of a Partition Function is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.