# Canonical ensemble

Let us assume that the reservoir temperature $T$ does not change. The probability that the system has a given energy $E$ is given by :

$P(E)={\frac {1}{Z}}g(E)e^{-{\frac {E}{kT}}}$ The above is called Bolzmann distribution. The quantity $Z$ is called partition function and it's given by:

$Z_{Can}=\sum _{E}g(E)e^{-\beta E}$ Thus, the mean value of the energy in such an ensemble is given by:

$\left\langle E\right\rangle =-{\frac {1}{Z}}{\frac {\partial Z}{\partial \beta }}=-{\frac {\partial \log Z}{\partial \beta }}$ In such an ensemble the Helmoltz free energy takes the role of a thermodynamic potential:

$F=E-TS=-kT\log Z_{Can}$ We do present here some useful relations that involve $F$ and its differential form:

• $dF=-pdV-SdT$ • $dF={\frac {\partial F}{\partial T}}dT+{\frac {\partial F}{\partial V}}dV$ • $p=-{\frac {\partial F}{\partial V}}$ • $S=-{\frac {\partial F}{\partial T}}$ Using and $p=-{\frac {\partial F}{\partial V}}$ it can be proved that

$pV=kNT$ That is the equation of state for ideal gases. The partition function of a single particle can be written as:

$Z_{1}=\sum _{\epsilon _{n}}e^{-\beta \epsilon _{n}}={\frac {L^{3}}{2\pi ^{2}}}\left({\frac {2m}{\beta \hbar ^{2}}}\right)^{2}{\frac {\sqrt {\pi }}{4}}=Vn_{Q}$ The value $n_{Q}$ is called quantum density, i.e. the total number of accessible states per unit of volume. We do define the DeBroglie thermal wavelength as the $\lambda$ of a free particle with kinetic energy given by $\pi k_{B}T$ : $\lambda _{Th}\colon \pi k_{B}T={\frac {\hbar ^{2}}{2m}}\left({\frac {2\pi }{\lambda _{Th}}}\right)^{2}$ . Hence we can rewrite $Z_{1}$ as: $Z_{1}={\frac {V}{\lambda _{Th}^{3}}}$ . Using we can find the expression of the Sackur-Tetrode entropy:

$S=kN\log \left({\frac {n_{Q}}{n}}\right)+{\frac {5}{2}}kN$ All these considerations hold for non-degenerate system, that is for systems where ${\frac {n}{n_{Q}}}\ll 1$ : meaning that we do assume that the number of particles is way smaller than the number of allowed energy states.

## Gibbs free energy

This quantity is defined as the Legendre transformation of $F$ within respect to $V$ . Hence:

$G=F-{\frac {\partial F}{\partial V}}V=F+pV=E-TS+pV$ Some important relations involving $G$ and its differential form:

• $dG={\frac {\partial G}{\partial T}}dT+{\frac {\partial G}{\partial p}}dp$ • $dG=-SdT+Vdp$ • $S=-{\frac {\partial G}{\partial T}}$ • $V={\frac {\partial G}{\partial p}}$ 1. Usually the term ${\frac {1}{kT}}$ is called $\beta$ , and so
$P(E)={\frac {1}{Z}}g(E)e^{-\beta E}$ 2. In the derivation of this relation, $L$ is the dimension of the discrete element of space where the w.f. is constrained.