# Canonical Ensemble and Combinatorics

I'm reading through Pathria and in chapter 3 he presents a derivation of the canonical ensemble via combinatorics. I'll summarize the key points of his derivation here, and I'll state my questions at the end.

# Pathria's Derivation + some in between steps

We have $$\mathcal{N}$$ systems with macro state ($$N,V,T$$) distributed among all available energy levels, with $$n_r$$ being the number of systems with energy $$E_r$$ such that, $$\sum_{r}n_r=\mathcal{N} \tag{1}$$ $$\sum_{r}E_rn_r=\mathcal{E} \tag{2}$$ There are $$W$$ ways of distributing those $$\mathcal{N}$$ systems among the energy levels, $$W=\frac{\mathcal{N}!}{n_0!n_1!...} \tag{3}$$ Using some rules of logarithms and Stirling's approximation we get, $$\ln W=\mathcal{N}\ln \mathcal{N}-\sum_r n_r \ln n_r \tag{4}$$ If we disturb the distribution set such that the set is $$\{n_r+\delta n_r\}$$ and calculate the disturbance of $$\ln W$$, we get, $$\delta \ln W = -\sum_r (1 + \ln n_r)\delta n_r = f(\delta n_r) \tag{5}$$ Based on the conditions in (1) and (2), the total number of systems $$\mathcal{N}$$ is unaltered and the total energy of all systems is still $$\mathcal{E}$$ so that, $$\sum_r \delta n_r =0 = g(\delta n_r) \tag{6}$$ $$\sum_r E_r \delta n_r =0 =h(\delta n_r)\tag{7}$$ Since the most probable distribution will occur when $$\ln W$$ is maximized, the disturbance $$\delta \ln W$$ should be minimized. This can be achieved by using Lagrange multipliers and considering the constraint equations (6) and (7) having the multipliers $$\alpha$$ and $$\beta$$ respectively. $$\mathcal{L}(\delta n_r, \alpha, \beta) = f(\delta n_r) - \alpha g(\delta n_r)-\beta h(\delta n_r)$$ $$=-\sum_r \delta n_r(1 + \ln n_r + \alpha + \beta E_r) \tag{8}$$ $$\frac{\partial \mathcal{L}}{\partial \delta n_r} =-\sum_r (1 + \ln n_r + \alpha + \beta E_r) = 0 \tag{9}$$ This ultimately gives us, $$n_r=Ce^{-\beta E_r}$$ And, $$\frac{n_r}{\mathcal{N}}=\frac{Ce^{-\beta E_r}}{\sum_r Ce^{-\beta E_r}}=\frac{e^{-\beta E_r}}{\sum_r e^{-\beta E_r}}=P(E_r) \tag{10}$$ Okay, great, so we have the canonical ensemble from a combinatorics vantage point.

# Questions:

1. Is the canonical ensemble "approximate"? We only get (4) due to Stirling's approximation. When we derive the canonical ensemble using $$d\rho/dt = 0$$ and $$\{\rho, H\}=0$$, we get (10) precisely. Pathria does another derivation involving a Taylor series expansion of $$\ln \Omega_{heat bath}$$ near $$E_{heatbath}=E_{system}$$ and we only take the first two terms. Does this imply there are "more terms" in the canonical ensemble?
2. To arrive at (5) I basically took the derivative of (4) with respect to $$n_r$$ and then multiplied by our variation $$\delta n_r$$. Is this legitimate? Is there a name on this type of analysis?
3. Since $$\delta n_r$$ is discrete, I would assume it can't be zero, and in principle should be $$\delta n_r = 1$$. In what sense are (6) and (7) true then? Can we make the claim that $$\mathcal{N}$$ and $$\mathcal{E}$$ are unaltered?
4. Something feels "wrong" about constructing the Lagrangian (8) of a function which is dependent on a variation. In (9) we take the partial derivative of (8) with respect to the variation, which doesn't seem sound mathematically. Can we treat the variation as a truly independent variable here?

Thanks for reading. On a side note, Pathria has been incredible to read, and has tied together many theoretical pieces of stat. mech. for me.

2. Equation $$(5)$$ is nothing more than the differential of $$\ln W$$ in terms of the differentials of its variables. It is an honest mathematical expression.
3. Working with differentials, one is used to work with continuous $$\delta n_r$$, whose values may become as small as required by local analysis of the behavior of functions. Apparently, this is not the case with discrete counting variables. However, once again, it is the implicitly present thermodynamic limit that will settle all problems. Indeed, even if for a finite system $$\delta n_r$$ is bounded below, when dealing with the intensive quantities, the same quantity divided by an eventually diverging quantity may get any real number value, depending on how it behaves with increasing the size.