# Derivation of the Fermi-Dirac and Bose-Einstein distributions

Below we derive in standard textbook fashion the Fermi-Dirac and Bose-Einstein distributions from the perspective of the grand canonical ensemble, which in a way is the natural ensemble to consider.

Consider a system of ${N}$ identical quantum particles. Let ${n_j}$ be the number of particles occupying the single-particle states ${|j\rangle}$. Let ${\epsilon_j}$ be the energy for the state ${|j\rangle}$. The occupation number ${n_j}$ is limited to ${n_j=0,~1}$ for fermions due to the Pauli exclusion principle. For bosons the occupation numbers can be arbitrarily large.

The total energy is thus given by

$\displaystyle E= \sum_{j} \epsilon _j n_j ~, \ \ \ \ \ (1)$

and

$\displaystyle N= \sum_j n_j ~. \ \ \ \ \ (2)$

Our goal is to calculate the mean occupation number ${\overline{ n_j}}$ for fermions and bosons when they are in thermodynamic equilibrium, at temperature ${T}$ and with chemical potential ${\mu}$.

## 1. The grand canonical partition function

For fixed chemical potential ${\mu}$, temperature parameter ${\beta}$ and volume ${V}$, the grand canonical partition function is given by

$\displaystyle \Xi(\beta, \mu, V) = \sum _{\rm all~states} \exp [-\beta (E-\mu N)] ~. \ \ \ \ \ (3)$

In the situation previously described, we can write it as

$\displaystyle \begin{array}{rcl} \Xi &=& \sum _{n_1} \sum _{n_2} \sum _{n_3} \ldots \exp \bigg[ \sum_j -\beta (n_j \epsilon_j - \mu n_j)\bigg] \\ &=& \sum _{n_1} \sum _{n_2} \sum _{n_3} \ldots \prod_j \exp [ -\beta (n_j \epsilon_j - \mu n_j) ] \\ &=& \bigg[\sum _{n_1} \exp [ -\beta (n_1 \epsilon_1 - \mu n_1) ] \bigg] \bigg[\sum _{n_2} \exp [ -\beta (n_2 \epsilon_1 - \mu n_2) ] \bigg] \ldots \end{array}$

Hence,

$\displaystyle \Xi = \prod_j ~\sum _{n_j} \exp [-\beta n_j (\epsilon_j - \mu)] ~. \ \ \ \ \ (4)$

In other words, ${\Xi}$ can be factored as product over a sum over occupation numbers for the ${j}$-th single-particle state. The latter sum is easy to calculate for bosons and even easier for fermions.

The mean occupation numbers can then be calculated as a weighted average for the grand canonical ensemble:

$\displaystyle \begin{array}{rcl} \overline{n_j} &=& \frac{ \sum _{n_1,n_2\ldots} n_j \exp \bigg[ \sum_j -\beta (n_j \epsilon_j - \mu n_j)\bigg] } { \sum _{n_1,n_2\ldots} \exp \bigg[ \sum_j -\beta (n_j \epsilon_j - \mu n_j)\bigg] } \\ &=& \frac {1}{\Xi} \frac{\partial \Xi}{\partial(- \beta \epsilon_j)} \end{array}$

so that

$\displaystyle \overline{n_j} = -\frac{1 }{ \beta } \frac{\partial \log \Xi}{\partial\epsilon_j} ~. \ \ \ \ \ (5)$

Substituting for ${\Xi}$ from (4) we get

$\displaystyle \begin{array}{rcl} \overline{n_j} &=& -\frac{1 }{ \beta } \frac{\partial}{\partial\epsilon_j} \log \left[ \prod_k ~\sum _{n_k} \exp [-\beta n_k (\epsilon_k - \mu)] \right] \\ &=& -\frac{1 }{ \beta } \frac{\partial}{\partial\epsilon_j} \sum_k \log \left[ \sum _{n_k} \exp [-\beta n_k (\epsilon_k - \mu)] \right] \\ &=& \sum_k -\frac{1 }{ \beta } \frac{\partial}{\partial\epsilon_j} \log \left[ \sum _{n_k} \exp [-\beta n_k (\epsilon_k - \mu)] \right]~. \end{array}$

Unless ${k=j}$ the derivative vanishes, so that

$\displaystyle \overline{n_j} = -\frac{1 }{ \beta } \frac{\partial }{\partial\epsilon_j} \log \left[ \sum _{n_j} \exp [-\beta n_j (\epsilon_j - \mu)] \right] ~. \ \ \ \ \ (6)$

## 2. Fermi-Dirac statistics

For fermions ${n_j}$ cannot be greater than 1. So

$\displaystyle \sum _{n_j} \exp [-\beta n_j (\epsilon_j - \mu)] = 1+ \exp [-\beta (\epsilon_j - \mu)]~. \ \ \ \ \ (7)$

Hence,

$\displaystyle \begin{array}{rcl} \overline{n_j} &=& -\frac{1 }{ \beta } \frac{\partial \log }{\partial\epsilon_j} (1+ \exp [-\beta (\epsilon_j - \mu)])\\ &=& -\frac{1 }{ \beta } \frac{ -\beta \exp [-\beta (\epsilon_j - \mu)]} {(1+ \exp [-\beta (\epsilon_j - \mu)])}\\ &=& \frac{ \exp [-\beta (\epsilon_j - \mu)]} {(1+ \exp [-\beta (\epsilon_j - \mu)])} ~. \end{array}$

Finally we get

$\displaystyle \overline{n_j} = \frac{1 } {\exp [\beta (\epsilon_j - \mu)]+1} ~. \ \ \ \ \ (8)$

## 3. Bose-Einstein Statistics

For bosons we have

$\displaystyle \sum _{n_j} \exp [-\beta n_j (\epsilon_j - \mu)] = \sum _{n_j} (\exp [-\beta (\epsilon_j - \mu)])^{n_j} \ \ \ \ \ (9)$

which is a geometric series.

Recall that for ${|r|<1}$ we can write

$\displaystyle (1-r) \sum_{n=0}^\infty r^n = 1~, \ \ \ \ \ (10)$

so that

$\displaystyle \sum_{n=0}^\infty r^n = {1 \over 1-r}~, \ \ \ \ \ (11)$

from which we get

$\displaystyle \sum _{n_j} \exp [-\beta n_j (\epsilon_j - \mu)] = {1 \over 1 - \exp [-\beta (\epsilon_j - \mu)]}~. \ \ \ \ \ (12)$

Substituting, we get

$\displaystyle \begin{array}{rcl} \overline{n_j} &=& -\frac{1 }{ \beta } \frac{\partial \log }{\partial\epsilon_j} \left[ {1 \over 1 - \exp [-\beta (\epsilon_j - \mu)]} \right] \\ &=& -\frac{1 }{ \beta } \frac{\partial \log }{\partial\epsilon_j} \big[ 1 - \exp [-\beta (\epsilon_j - \mu)] \big]^{-1} \\ &=& \frac{1 }{ \beta } \frac{\partial \log }{\partial\epsilon_j} \big[ 1 - \exp [-\beta (\epsilon_j - \mu)] \big] \\ &=& \frac{1 }{ \beta } \bigg[ { \beta \exp [-\beta (\epsilon_j - \mu)] \over 1 - \exp [-\beta (\epsilon_j - \mu)]} \bigg] \\ &=& { \exp [-\beta (\epsilon_j - \mu)] \over 1 - \exp [-\beta (\epsilon_j - \mu)]} . \end{array}$

Finally we get

$\displaystyle \overline{n_j} = \frac{1 } {\exp [\beta (\epsilon_j - \mu)]-1} ~. \ \ \ \ \ (13)$

## 4. Summary

The Fermi-Dirac and Bose-Einstein distributions can be written as

$\displaystyle \overline{n(\epsilon)}= \frac{1 } {\exp [\beta (\epsilon - \mu)] \pm 1} ~, \ \ \ \ \ (14)$

with the plus sign for Fermi-Dirac statistics and the minus sign for Bose-Einstein statistics.