# Fixing total particle number for Canonical Ensemble vs Grand canonical ensemble

For a (non-interacting) gas of bosons (any gas for that matter), the total particle number has to be a finite value and in the canonical description this is ensured by writing a constrained sum for the canonical partition function:

$$Z = \sum_{\{n_{\textbf{p}}\}}\exp\bigg(-\beta\sum_{\textbf{p}}n_{\textbf{p}}\epsilon(\textbf{p})\bigg)\delta_{N,\sum_{\textbf{p}}n_{\textbf{p}}}$$

Instead of computing this, one moves to the Grand Canonical Description where now there is no constraint on possible combinations of particles summing to some total N: $$Z_g = \sum_{\{n_{\textbf{p}}\}}\exp\bigg(-\beta\sum_{\textbf{p}}n_{\textbf{p}}(\epsilon(\textbf{p})-\mu)\bigg)$$ which can be re-written as: $$Z_g = \prod_{\textbf{p}}\sum_{n_{\textbf{p}}}\exp\bigg(-\beta n_{\textbf{p}}(\epsilon(\textbf{p})-\mu)\bigg)$$

Here, the $$n_{\textbf{p}}$$ are the allowed occupations which can go to infinity for bosons.

What has happened I think is that somehow the condition "of total particles being equal to $$N$$" has been shoved in the chemical potential which takes care of it and therefore the $$n_{\textbf{p}}$$ now become allowed occupations not constrained to total upto $$N$$.

I only understand this vaguely and don't understand how the unconstrained sum vanishes in grand canonical picture due to the introduction of chemical potential.

In short, the question then is:

How does the grand canonical description takes care of the fact that the total number of gas particles is some finite value $$N$$?

• In the GCE, the average particle number is fixed. The chemical potential is the respective Lagrange multiplier. Have you checked a book or some online resources? Nov 14, 2023 at 7:57
• @TobiasFünke, you are referring to a possible way of introducing the GCE. From the point of view of the individual system in the ensemble, the chemical potential is the fixed quantity, and the number of particles fluctuates around its equilibrium average. In any case, the question is about a formula that contains $\mu$ and not the average number of particles in the volume V. Nov 14, 2023 at 8:43
• @TobiasFünke Yes I know the formal derivation and know that in GCE the average particle number is fixed. Maybe my question as unclear. What I don't understand is how the math takes care of the fact that even when my particle numbers can fluctuate they can never physically reach infinity.
– Lost
Nov 15, 2023 at 4:43

The grand canonical ensemble does not consider that the total number of gas particles is some finite value 𝑁 because there is no total number of particles in such an ensemble, and there is no vanishing of the unconstrained sum. What happens requires following the logic of a few formal steps with some care. To concentrate on the relevant ingredients, let me start with the grand partition function, $$Z_g$$, written as follows $$Z_g = \sum_{N=0}^{\infty}e^{\beta \mu N} Z(\beta,V,N)$$ where $$Z$$ is the canonical partition function (your first formula), containing an unconstrained sum over all the occupation numbers of a function containing a Kronecker delta $$\delta_{N,\sum_{{\bf p}}n_{ {\bf p} }}$$ (it is the delta that takes care of the constraint). By rewriting this formula as $$Z_g = \sum_{N=0}^{\infty}\sum_{\{n_{\textbf{p}}\}}\exp\bigg(\beta \mu N-\beta\sum_{\textbf{p}}n_{\textbf{p}}\epsilon(\textbf{p})\bigg)\delta_{N,\sum_{\textbf{p}}n_{\textbf{p}}}= \sum_{N=0}^{\infty}\sum_{\{n_{\textbf{p}}\}} \exp\bigg(\beta \sum_{\textbf{p}}n_{\textbf{p}}(\mu-\epsilon(\textbf{p}))\bigg)\delta_{N,\sum_{\textbf{p}}n_{\textbf{p}}}$$ where it has been used the presence of the Kronecker delta to rewrite the exponential of $$\beta \mu N$$ in terms of the occupation numbers.

Now, interchanging the two external unconstrained summations, for each choice of the set of occupation numbers $$\{n_{\textbf{p}}\}$$, there will be one value of $$N$$ satisfying the constraint. Therefore, we end up with the unconstrained sum over all the sets of occupation numbers only.

This is the formal basis for the expression of the grand canonical partition function. From the conceptual point of view, the shift from a fixed $$N$$ ensemble to a fixed chemical potential is similar to the change from a fixed energy ensemble like the microcanonical to a fixed-temperature ensemble like the canonical. In the latter case, one can interpret the canonical formulas as describing a system that can exchange energy with a thermostat, ensuring a fixed temperature. In the present case, we can think of the grand canonical ensemble as describing an open system, i.e., a system that can exchange particles and energy, with a much larger system characterized by fixed temperature $$T$$ and a chemical potential $$\mu$$.

• Hi, thanks for the answer. Even when my number of particles are not fixed in a GCE, the total number of particles are still finite ryt? I understand how the math allows one to write the constrained sum as an unconstrained sum and that that comes precisely due to accounting for these particle number fluctuations encoded in chemical potential but I don't get how these particle fluctuations can allow the sum to go to till infinity.
– Lost
Nov 15, 2023 at 4:46
• For instance a thermal gas with average N particles can never have infinity number of particles occupying any given state but the constrained sum allows for that (I think ?) Is it that chemical potential in the distribution causes the probability of this going to zero?
– Lost
Nov 15, 2023 at 4:48
• @Lost It goes precisely that way. The system has to be thought of as coupled with an infinite reservoir. In principle, it can have an arbitrarily large number of particles in a volume $V$ (well, provided interactions do not contain a hard sphere condition). However, the probability of finding $N$ particles in that volume goes to zero extremely quickly with $N$. Nov 15, 2023 at 7:55

All these ensembles are constructed as the sole unbiased distribution for positive valued random variables $$P[X Theses products of densities is statistical independence on the one hand and the product of exponentials becomes the exponential of the sum of the parameter functions for the physical demand of equal units of energy divided by $$k T$$, yielding a sum of pure numbers.

The chemical potential is the expectation $$E[N]=\frac{\sum_n \ n \ e^{-\beta \mu n}}{ \sum_n e^{-\beta \mu n}}$$ which our professors, completely unaquainted with measure and probability theory once, described somehow obscurely, that "the chemical potential is the energy unit to add one particle to the ensemble".

The correction for identical particles of Boltzmann, quantized states of Bose and Fermi type come up with their quite different, famous partition probabilty densities, but cling to the exponentials in order to map physical sums to independent products of probabilties, but reduced by the symmetry of permutions to subensembles of the trival exponentials.

• Your formula is the average of a pure number. It cannot provide a quantity with the dimension of an energy. Nov 14, 2023 at 8:33
• @GiorgioP-DoomsdayClockIsAt-90 I think by $E[N]$ they denote the expectation value (of the particle number). Nov 14, 2023 at 8:39
• @TobiasFünke in this answer I read "The chemical potential is the expectation ...". Nov 14, 2023 at 8:45