The Boltzmann distribution, formulated in 1868 by Ludwig Boltzmann, describes the probability distribution \(p_i\) of objects (particles or oscillation modes) in a system over various energy states, \(\varepsilon_i\).

It is mathematically expressed as:
$$p_i=\frac{n_i}{N}=\frac{e^{-\frac{\varepsilon_i}{kT}}}{\sum_ie^{-\frac{\varepsilon_i}{kT}}$$
where
\(k\) is the Boltzmann constant.
\(n_i\) is the number of objects in the energy state \(\varepsilon_i\).
\(N\) is the total number of objects in the system.
The derivation of the Boltzmann distribution equation involves the following steps:
-
- Derivation of the total differential of \(lnW\).
- Application of the Lagrange method of undetermined multipliers on the total differential of \(lnW\).
- Simplification of solution using Stirling’s approximation.
- Evaluation of \(\beta\).
Step 1
Consider a system with molecules randomly occupying different energy states, \(\varepsilon_i\). The configuration of the system can be represented by \(\{n_0,n_1,\cdots\}\) with \(n_0\) molecules in energy state \(\varepsilon_0\), \(n_1\) molecules in energy state \(\varepsilon_1\), and so on. The total number of molecules is therefore:
$$\sum_in_i=N\;\;\;\;\;\;\;\;i=0,1,\cdots\;\;\;\;\;\;\;\;1$$
where \(n_i\) is the number of molecules in the energy state \(\varepsilon_i\).
Let’s further define our system as a closed system with total energy, \(E\), given by:
$$\sum_in_i\varepsilon_i=E\;\;\;\;\;\;\;\;i=0,1,\cdots\;\;\;\;\;\;\;\;2$$
The number of ways, \(W\), to achieve a configuration of \(\{n_0,n_1,\cdots\}\) is given by the multinomial permutation:
$$W=\frac{N!}{n_0!n_1!\cdots}\;\;\;\;\;\;\;\;3$$
or in the natural logarithmic form:
$$lnW=ln\frac{N!}{n_0!n_1!\cdots}\;\;\;\;\;\;\;\;4$$

Question
Eq3 implies that the molecules are distinguishable when they are being assigned to different energy states, and that once these assignments are made, the order of molecules within each state does not matter. Why?
Answer
Boltzmann statistics is rooted in classical physics, where particles of the same type are considered distinguishable because they can be differentiated by their physical states, such as position and velocity. In contrast, particles of the same type in quantum mechanics are considered indistinguishable, which leads to different statistical distributions like Fermi-Dirac statistics for fermions and Bose-Einstein statistics for bosons.
Once the molecules are assigned to energy states, the order of the molecules within each state does not matter, because the configuration is defined only by the number of molecules in each state, not by which specific molecules occupy them.
However, the possible configurations that the system may adopt are restricted by eq1 and eq2. For example, the configurations of \(\{N,0,0,\cdots\}\) and \(\{N-1,1,0,\cdots\}\) cannot coexist as they have different total energies. Within the allowed set of configurations, the most probable configuration is the one with the largest number of ways of achieving it, i.e. the one whose \(W\) (or \(lnW\)) is maximal.
We can therefore express the LHS of eq4 in its total differential form of
\(\small{dlnW=\sum_i\biggr(\frac{\partial lnW}{\partial n_i}\biggr)_{all\;other\;n\neq n_i}dn_i}\), or for simplicity:
$$dlnW=\sum_i\biggr(\frac{\partial lnW}{\partial n_i}\biggr)dn_i\;\;\;\;\;\;\;\;5$$
Step 2
The most probable configuration is found by evaluating the maximum point for the function in eq4, i.e.
$$dlnW=\sum_i\biggr(\frac{\partial lnW}{\partial n_i}\biggr)dn_i=0\;\;\;\;\;\;\;\;6$$
To solve eq 6, we employ the Lagrange method of undetermined multipliers. We begin by rearranging eq1 to \(n_j=N-n_0-n_1-\cdots-n_{j-1}-n_{j+1}-\cdots\), where \(n_j\) is dependent on the rest of the variables, which are all independent. Eq1 can also be written in the form of a new function, :
$$g=n_0+n_1+\cdots-N=0\;\;\;\;\;\;\;\;7$$
Likewise, by rearranging eq2 to \(\small{n_k=\frac{1}{\varepsilon_k}(E-n_0\varepsilon_0-n_1\varepsilon_1-\cdots-n_{k-1}\varepsilon_{k-1}-\cdots)}\)
we have another dependent variable, \(n_k\) and another function:
$$h=n_0\varepsilon_0+n_1\varepsilon_1+\cdots-E=0\;\;\;\;\;\;\;\;8$$
This results in eq6 having two dependent variables. The total differential of \(g\) and \(h\) are
$$dg=\sum_i\biggr(\frac{\partial g}{\partial n_i}\biggr)dn_i=0\;\;\;\;\;\;\;\;9$$
and
$$dh=\sum_i\varepsilon_i\biggr(\frac{\partial h}{\partial n_i}\biggr)dn_i=0\;\;\;\;\;\;\;\;10$$
respectively.
Since \(dg=dh=0\), we can multiply eq9 and eq10 by the factors \(\alpha\) and \(-\beta\) respectively and add them to eq6 to give:
$$\sum_i\biggr[\biggr(\frac{\partial lnW}{\partial n_i}\biggr)+\alpha\biggr(\frac{\partial g}{\partial n_i}\biggr)-\beta\varepsilon_i\biggr(\frac{\partial h}{\partial n_i}\biggr)\biggr]dn_i=0\;\;\;\;\;\;\;\;11$$
The factors, \(\alpha\) and \(\beta\), are called Lagrange multipliers. Two of the variables, e.g. \(n_j\) and \(n_k\), are dependent variables, while the rest are independent variables. If there is some value of \(\alpha\) and some value of \(\beta\) that render the \(j\)-th and \(k\)-th terms of eq11 zero, we have
$$\biggr(\frac{\partial lnW}{\partial n_j}\biggr)+\alpha\biggr(\frac{\partial g}{\partial n_j}\biggr)-\beta\varepsilon_j\biggr(\frac{\partial h}{\partial n_j}\biggr)=0\;\;\;\;\;\;\;\;12$$
$$\biggr(\frac{\partial lnW}{\partial n_k}\biggr)+\alpha\biggr(\frac{\partial g}{\partial n_k}\biggr)-\beta\varepsilon_k\biggr(\frac{\partial h}{\partial n_k}\biggr)=0\;\;\;\;\;\;\;\;13$$
Consequently, we are left with all independent variables terms. \(dn_i\) in eq11 can now vary arbitrarily, which implies that all the remaining coefficients equal to zero. Substituting eq9 and eq10 in eq11,
$$\sum_i\biggr(\frac{\partial lnW}{\partial n_i}\biggr)dn_i+\alpha dg-\beta dh=0\;\;\;\;\;\;\;\;14$$
Noting that \(N\) and \(E\) are constants, eq7 and eq8 become \(\small{dg=dn_0+dn_1+\cdots=\sum_idn_i}\) and \(\small{dh=dn_0\varepsilon_0+dn_1\varepsilon_1+\cdots=\sum_i\varepsilon_idn_i}\) respectively. Substituting \(dg\) and \(dh\) in eq14,
$$\sum_i\biggr[\biggr(\frac{\partial lnW}{\partial n_i}\biggr)+\alpha-\beta\varepsilon_i\biggr] dn_i=0\;\;\;\;\;\;\;\;15$$
Since all coefficients are now equal to zero,
$$\biggr(\frac{\partial lnW}{\partial n_i}\biggr)+\alpha-\beta\varepsilon_i=0\;\;\;\;\;\;\;\;16$$
Step 3
To simplify eq16, we rearrange eq4 to give \(\small{lnW=lnN!-\sum_iln(n_i!)}\). Since \(\small{lnN!=ln[N(N-1)\cdots]=lnN+ln(N-1)+\cdots=\sum_{K=1}^NlnK}\) ,
$$lnW=\sum_{K=1}^NlnK-\sum_iln(n!)\;\;\;\;\;\;\;\;17$$
For large \(N\), we have \(\small{\sum_{K=1}^NlnK\approx\int_1^NlnKdK}\). Integrating by parts, \(\small{\int_1^NlnKdK=NlnN-N}\). Hence, \(\small{lnN!=\sum_{K=1}^NlnK\approx NlnN-N}\), which is known as Stirling’s approximation. Eq17 becomes \(\small{lnW=NlnN-N-\biggr[\sum_in_ilnn_i-\sum_in_i\biggr]}\). Since, \(\small{\sum_in_i=N}\),
$$lnW=NlnN-\sum_in_ilnn_i\;\;\;\;\;\;\;\;18$$
Substituting eq18 in eq16,
$$lnN\frac{\partial N}{\partial n_i}+N\frac{\partial lnN}{\partial n_i}-\sum_j\frac{\partial n_jlnn_j}{\partial n_i}+\alpha-\beta\varepsilon_i=0\;\;\;\;\;\;\;\;19$$
where we have changed the summation index from \(i\) to \(j\) in eq19 to discriminate the summation variable from the differentiation variable.
Since \(N=n_0+n_1+\cdots\), we have \(\small{\frac{\partial N}{\partial n_i}=1}\). By implicit differentiation, \(\small{\frac{\partial lnN}{\partial n_i}=\frac{1}{N}\frac{\partial N}{\partial n_i}=\frac{1}{N}}\) and \(\small{\frac{\partial lnn_j}{\partial n_i}=\frac{1}{n_j}\frac{\partial n_j}{\partial n_i}}\). Furthermore, \(\small{\frac{\partial n_j}{\partial n_i}=\delta_{ij}\). Therefore, eq19 becomes,
$$n_i=Ne^{\alpha}e^{-\beta\varepsilon_i}\;\;\;\;\;\;\;\;20$$
Substituting eq20 into eq1 yields \(\small{e^{\alpha}=1/\sum_ie^{-\beta\varepsilon_i}}\), which when substituted into eq20 gives
$$\frac{n_i}{N}=\frac{e^{-\beta\varepsilon_i}}{\sum_ie^{-\beta\varepsilon_i}}\;\;\;\;\;\;\;\;21$$
Step 4
An easy way to determine the value of \(\beta\) is to use the equation for the distribution of molecules of an ideal gas in a cylinder:
$$\frac{n}{n_0}=e^{-\frac{N_Amg\Delta h}{RT}}\;\;\;\;\;\;\;\;22$$
where
\(n\) is number of molecules at a height \(l\), which implies that \(n\) is number of molecules in energy state \(\varepsilon_l\).
\(n_0\) is the number of molecules at a height \(j\), where \(j < l\). It follows that \(n_0\) is number of molecules in energy state \(\varepsilon_j\).
\(m\) is the mass of a molecule.
\(g\) is the acceleration due to gravity.
\(\Delta h\) is the difference in height between \(l\) and \(j\).
\(N_A\) is the Avogadro constant
\(R\) is the universal gas constant
Since \(mg\Delta h\) represents the difference in energy between states \(l\) and \(j\), we can rewrite eq22 as:
$$\frac{n_l}{n_j}=e^{-\frac{N_A(\varepsilon_l-\varepsilon_j)}{RT}}\;\;\;\;\;\;\;\;23$$
From eq21, the fractions of molecules in energy states \(l\) and \(j\) are \(\small{\frac{n_l}{N}=\frac{e^{-\beta\varepsilon_l}}{\sum_ie^{-\beta\varepsilon_i}}}\) and \(\small{\frac{n_j}{N}=\frac{e^{-\beta\varepsilon_j}}{\sum_ie^{-\beta\varepsilon_i}}}\) respectively. Dividing \(\small{\frac{n_l}{N}}\) by \(\small{\frac{n_j}{N}}\),
$$\frac{n_l}{n_j}=e^{-\beta(\varepsilon_l-\varepsilon_j)}\;\;\;\;\;\;\;\;24$$
Comparing eq23 and 24, \(\beta=N_A/RT\), and introducing the constant \(k=R/N_A\) (the Boltzmann constant), we have
$$\beta=\frac{1}{kT}\;\;\;\;\;\;\;\;24a$$
Therefore, eq21 becomes
$$\frac{n_i}{N}=\frac{e^{-\frac{\varepsilon_i}{kT}}}{\sum_ie^{-\frac{\varepsilon_i}{kT}}}\;\;\;\;\;\;\;\;25$$
which is the Boltzmann distribution.
The Boltzmann distribution is used to derive mathematical expressions of many scientific concepts, including the statistical entropy, the Maxwell-Boltzmann distribution, and the Planck radiation law.

Question
If the Boltzmann distribution is derived based on distinguishable particles, does it mean that the ideal gas particles described in the barometric formula of eq22 are distinguishable?
Answer
No, the ideal gas particles are indistinguishable. However, whether the particles are distinguishable or not only affects the total statistical weight \(\sum_ie^{-\frac{\varepsilon_i}{kT}\) (also known as the molecular partition function) in eq25. Relative probabilities, such as those expressed by the barometric formula, do not depend on the distinguishability of the particles because the partition function cancels out in the ratio.