# Helmholtz Free Energy at Equilibrium

Can somebody point me towards a derivation using statistical physics for the fact that the Helmholtz free energy $F$ is minimised at equilibrium for a canonical system at constant temperature and volume?

I'll sketch the derivation in a classical setting. Let's say we have a system with $N$ degrees of freedom, with $N$ large (disclaimer: I won't discuss the limit properly).
The partition function at temperature $T=1/(k_B\beta)$ is given by the sum over all the configurations $C$ of the system $$Z = \sum_C \mathrm{e}^{-\beta E_C} = \int\mathrm{d}E\; \mathrm{e}^{-\beta E} \sum_C \delta(E-E_C) = \int\mathrm{d}E\; \mathcal{N}_E\mathrm{e}^{-\beta E},$$
where $\mathcal{N}_E$ is the number of states at energy $E$.
The entropy is defined as $S=-k_B \ln \mathcal{N}_E$, and I will assume that energy and entropy are extensive, so that the densities $\varepsilon = E/N$, $s=S/N$ are well defined in the thermodynamic limit. We can rewrite the partition function as $$Z = \int\mathrm{d}E\; \mathrm{e}^{-\beta E+\ln\mathcal{N}_E} = \int \mathrm{d}\varepsilon N \mathrm{e}^{-\beta N (\varepsilon-T s)}\ .$$
For large $N$ we can evaluate the integral by Laplace's method, to obtain the free energy minimisation principle $$f = -\lim_{N\to \infty}\frac{1}{\beta N} \ln Z = -\lim_{N\to \infty}\frac{1}{\beta N} \max_\varepsilon[-\beta N(\varepsilon-T s)] = \min_\varepsilon (\varepsilon-Ts).$$