---
title: "Ideal Quantum Gases: The General Framework"
module: Quantum Statistics
moduleNumber: 7
lessonNumber: 4
order: 704
summary: >
  Every ideal quantum gas is handled by one calculation. The sum over
  single-particle modes becomes an energy integral weighted by a density of
  states $g(\varepsilon)\propto\varepsilon^{1/2}$, and the number and pressure
  reduce to the Bose and Fermi functions $g_\nu(z)$ and $f_\nu(z)$ of the
  fugacity. An integration by parts fixes $PV=\tfrac23 U$ for a nonrelativistic
  gas and $PV=\tfrac13 U$ for an ultrarelativistic one, independent of statistics.
  Specializing the density of states and the chemical potential then produces the
  photon gas, phonons, the Bose gas, and the Fermi gas as four branches of the
  same framework.
topics: [Quantum Statistics]
sources:
  - book: Pathria & Beale
    ref: "Ch. 6 §6.1–6.2, Ch. 7 §7.1, and Ch. 8 §8.1"
  - book: Kardar (Statistical Physics of Particles)
    ref: "Ch. 7 — Quantum Statistical Mechanics; §7.3–7.4"
  - book: Schroeder
    ref: "Ch. 7 — Quantum Statistics; §7.3 (introduction)"
draft: false
---

The distributions of the previous lessons give the mean occupation of one mode.
Turning them into the thermodynamics of a gas means summing over all modes, and
for a macroscopic box the levels are so dense that the sum becomes an integral
weighted by a density of states. The integrals that result are the same two
special functions for every ideal quantum gas, the Bose function $g_\nu(z)$ and
the Fermi function $f_\nu(z)$, and the relation between pressure and energy
follows from the shape of the density of states alone, not from which statistics
governs. This lesson assembles that shared machinery. The four applications that
follow it (blackbody radiation, phonons, Bose-Einstein condensation, and the
degenerate Fermi gas) are each obtained by choosing the density of states and
the chemical potential and reading off the same formulas.

## From the mode sum to an energy integral

The extensive quantities of the ideal quantum gas are sums over single-particle
levels weighted by the mean occupation,

$$
N = \sum_k \langle n_k\rangle,
\qquad
U = \sum_k \varepsilon_k\,\langle n_k\rangle .
$$

For free particles in a cube of side $L$ with periodic boundary conditions the
allowed wavevectors are spaced by $2\pi/L$, so a volume $(2\pi/L)^3$ of
$\vec k$-space holds one state. The level spacing shrinks as $L\to\infty$, and the
sum passes to an integral over $\vec k$, then over energy once the states are
grouped by $\varepsilon$:

$$
\sum_k \;\longrightarrow\; g_s\,\frac{V}{(2\pi)^3}\int \d^3k
\;=\; \int_0^\infty g(\varepsilon)\,\d\varepsilon ,
$$

with $g_s = 2s+1$ the spin multiplicity. For nonrelativistic particles,
$\varepsilon = \hbar^2 k^2/2m$, and counting the $\vec k$-shell of energy
$\varepsilon$ gives the density of states

$$
g(\varepsilon) = g_s\,\frac{V}{4\pi^2}\left(\frac{2m}{\hbar^2}\right)^{3/2}
\varepsilon^{1/2}
= g_s\,\frac{2\pi V (2m)^{3/2}}{h^3}\,\varepsilon^{1/2} .
$$

The $\varepsilon^{1/2}$ growth is the geometric fact that higher energy shells in
momentum space have more states; it is the same factor that shaped the Maxwell
speed distribution. Replacing the discrete spectrum by this smooth weight is exact
in the thermodynamic limit and drops only the single lowest level — an omission
that is harmless for fermions but is precisely what must be restored by hand for a
condensing Bose gas.[^pathria-dos]

$$
% caption: The closely spaced modes of a large box are replaced by a continuous density of states rising as the square root of the energy; each discrete level contributes one tick under the smooth envelope.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0) -- (7.0,0) node[right,black,font=\scriptsize] {energy};
\draw[->,black] (0,0) -- (0,3.6) node[above,black,font=\scriptsize] {density of states};
% sqrt curve g ~ sqrt(E): tikz y = 1.25*sqrt(x)
\draw[acc,very thick] plot[domain=0.02:6.4,samples=80] (\x,{1.25*sqrt(\x)});
\node[text=acc,font=\scriptsize,anchor=west] at (1.4,3.05) {g proportional to root E};
% discrete mode ticks
\foreach \x in {0.25,0.55,0.95,1.45,2.05,2.75,3.55,4.45,5.45} {
  \draw[black,thick] (\x,0) -- (\x,{1.25*sqrt(\x)});
}
\node[text=black,font=\scriptsize,anchor=north] at (3.0,-0.35) {discrete modes};
\end{tikzpicture}
$$

## The Bose and Fermi functions

Substituting the density of states and the mean occupation, and changing variables
to $x=\beta\varepsilon$ with fugacity $z=e^{\beta\mu}$, expresses the number
density and pressure through two standard functions. Define

$$
g_\nu(z) = \frac{1}{\Gamma(\nu)}\int_0^\infty
\frac{x^{\nu-1}}{z^{-1}e^{x}-1}\,\d x = \sum_{l=1}^\infty \frac{z^l}{l^\nu},
\qquad
f_\nu(z) = \frac{1}{\Gamma(\nu)}\int_0^\infty
\frac{x^{\nu-1}}{z^{-1}e^{x}+1}\,\d x = \sum_{l=1}^\infty \frac{(-1)^{l-1}z^l}{l^\nu},
$$

the **Bose-Einstein** and **Fermi-Dirac functions**, convergent for $0\le z\le1$
and $z\ge0$ respectively. Both start as $z$ at small fugacity, the Maxwell-Boltzmann
limit. With these, the ideal quantum gas is summarized in a few lines:

$$
\frac{N}{V} = \frac{g_s}{\lambda^3}\,h_{3/2}(z),
\qquad
\frac{P}{k_B T} = \frac{g_s}{\lambda^3}\,h_{5/2}(z),
\qquad
\frac{U}{V} = \frac{3}{2}\,\frac{g_s k_B T}{\lambda^3}\,h_{5/2}(z),
$$

where $h_\nu$ stands for $g_\nu$ (bosons) or $f_\nu$ (fermions) and $\lambda$ is
the thermal wavelength. The index shifts by one between the number and the
pressure because the pressure integral carries one extra power of energy from the
integration by parts below. At $z=1$ the Bose function reaches the finite value
$g_{3/2}(1)=\zeta(3/2)=2.612$,[^zeta] and that this maximum is finite is the mathematical
origin of Bose-Einstein condensation.[^kardar-func]

$$
% caption: The Bose and Fermi functions of index three-halves against fugacity. Both are linear at small fugacity; the Bose function has a vertical tangent and finite value at $z=1$, the Fermi function stays smooth.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0) -- (6.4,0) node[right,black,font=\scriptsize] {fugacity z};
\draw[->,black] (0,0) -- (0,3.6) node[above,black,font=\scriptsize] {function value};
\draw[black,dashed] (5,0) -- (5,3.35);
\node[black,font=\scriptsize,anchor=north] at (5,-0.05) {1};
\node[black,font=\scriptsize,anchor=east] at (0,3.27) {2.612};
\draw[black,dashed] (0,3.27) -- (5,3.27);
% Bose g_{3/2}: values scaled y = value*1.25 (2.612->3.265)
\draw[acc,very thick] plot coordinates
  {(0,0)(1.25,0.34)(2.5,0.775)(3.75,1.38)(4.4,1.95)(4.75,2.5)(5,3.27)};
\node[text=acc,font=\scriptsize,anchor=east] at (3.9,1.6) {Bose g};
% straight MB reference y = z (data) *1.25: at z=1 (tikz5) -> 1.25
\draw[black,thick,densely dashed] (0,0) -- (5,1.56);
\node[text=black,font=\scriptsize,anchor=west] at (4.1,1.3) {small-z limit};
% Fermi f_{3/2}: at z=1 -> 0.765 -> y=0.956
\draw[black!70,very thick,densely dotted] plot coordinates
  {(0,0)(1.25,0.289)(2.5,0.534)(3.75,0.753)(5,0.956)};
\node[text=black!70,font=\scriptsize,anchor=west] at (4.0,0.72) {Fermi f};
\end{tikzpicture}
$$

## Pressure and energy from the density of states

The relation between pressure and energy is fixed by the exponent of the density
of states, independent of statistics and of temperature. Write $g(\varepsilon) =
c\,\varepsilon^{s}$; for the nonrelativistic gas $s=\tfrac12$. The grand potential
is $-PV = \mp k_B T\int g(\varepsilon)\ln\!\big(1\mp z e^{-\beta\varepsilon}\big)\,
\d\varepsilon$, and integrating by parts moves the log onto the occupation.

> **Theorem (Pressure-energy relation).** For an ideal quantum gas with density of
> states $g(\varepsilon)\propto\varepsilon^{s}$,
> $$
> PV = \frac{1}{s+1}\,U .
> $$
> A nonrelativistic gas ($s=\tfrac12$) has $PV=\tfrac23 U$; an ultrarelativistic
> gas or a photon gas ($\varepsilon=pc$, $s=2$) has $PV=\tfrac13 U$.[^kardar-pu]

> **Proof.** Let $G(\varepsilon)=\int_0^\varepsilon g(\varepsilon')\,\d\varepsilon'
> = \tfrac{1}{s+1}\,\varepsilon\,g(\varepsilon)$, using $g\propto\varepsilon^{s}$.
> Integrating $PV = k_B T\int_0^\infty g(\varepsilon)\,\ln\!\big(1\mp z
> e^{-\beta\varepsilon}\big)^{\mp1}\,\d\varepsilon$ by parts, the boundary term
> vanishes because $G(0)=0$ and the logarithm decays faster than $G$ grows, so
> $$
> PV = -k_B T\int_0^\infty G(\varepsilon)\,
> \frac{\d}{\d\varepsilon}\Big[{\mp}\ln\!\big(1\mp z e^{-\beta\varepsilon}\big)\Big]
> \,\d\varepsilon
> = \int_0^\infty G(\varepsilon)\,\frac{z e^{-\beta\varepsilon}}
> {1\mp z e^{-\beta\varepsilon}}\,\d\varepsilon .
> $$
> The remaining fraction is the mean occupation $\langle n(\varepsilon)\rangle$, so
> $$
> PV = \int_0^\infty \frac{1}{s+1}\,\varepsilon\,g(\varepsilon)\,
> \langle n(\varepsilon)\rangle\,\d\varepsilon
> = \frac{1}{s+1}\int_0^\infty \varepsilon\,g(\varepsilon)\,
> \langle n(\varepsilon)\rangle\,\d\varepsilon
> = \frac{1}{s+1}\,U . \;\square
> $$

The result is stronger than the ideal-gas law it generalizes. It holds for bosons
and fermions alike, at any degeneracy, and reduces to $PV=Nk_BT$ only in the
classical limit where $U=\tfrac32 Nk_BT$. The degeneracy pressure of a cold Fermi
gas and the radiation pressure of a photon gas are both instances of it, differing
only through $s$.

$$
% caption: The pressure-energy ratio is set by the dispersion. A quadratic dispersion gives a square-root density of states and $PV=\tfrac23U$; a linear dispersion gives a quadratic density of states and $PV=\tfrac13U$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% nonrelativistic panel
\draw[->,black] (0,0) -- (2.8,0) node[right,black,font=\scriptsize] {p};
\draw[->,black] (0,0) -- (0,2.6) node[above,black,font=\scriptsize] {E};
\draw[acc,very thick] plot[domain=0:1.55,samples=40] (\x,{0.95*\x*\x});
\node[text=acc,font=\scriptsize,anchor=west] at (0.3,2.0) {E from p squared};
\node[black,font=\scriptsize,anchor=north] at (1.3,-0.5) {PV = two thirds U};
% relativistic panel
\begin{scope}[xshift=5.4cm]
\draw[->,black] (0,0) -- (2.8,0) node[right,black,font=\scriptsize] {p};
\draw[->,black] (0,0) -- (0,2.6) node[above,black,font=\scriptsize] {E};
\draw[black,very thick] (0,0) -- (2.3,2.3);
\node[text=black,font=\scriptsize,anchor=west] at (0.4,2.0) {E from p};
\node[black,font=\scriptsize,anchor=north] at (1.3,-0.5) {PV = one third U};
\end{scope}
\end{tikzpicture}
$$

## The four applications as one framework

Everything downstream is a choice of two ingredients: the density of states
$g(\varepsilon)$, fixed by the dispersion and dimensionality, and the chemical
potential $\mu$, fixed by whether the particle number is conserved.

- **Photon gas.** Photons are not conserved, so $\mu=0$ and $z=1$; the dispersion
  is $\varepsilon=pc$, giving $s=2$ and $PV=\tfrac13U$. The occupation is the pure
  Bose function at zero chemical potential, and the energy integral is the Planck
  spectrum.
- **Phonons.** Lattice vibrations are bosons with $\mu=0$ and a linear acoustic
  dispersion cut off at the Debye frequency by the finite mode count $3N$. The same
  $PV=\tfrac13U$ machinery gives the Debye heat capacity.
- **Bose gas.** Conserved bosons keep $\mu<0$ and $z<1$ until $g_{3/2}(z)$ hits its
  ceiling $\zeta(3/2)$, at which point the excited states saturate and a condensate
  forms in the omitted ground level.
- **Fermi gas.** Conserved fermions have $\mu\to\varepsilon_F>0$ as $T\to0$; the
  Fermi function replaces the Bose function, the occupation approaches a step, and
  the pressure is the degeneracy pressure.

$$
% caption: One framework, the density of states with the Bose or Fermi functions, branches into the four ideal-gas applications by the choice of dispersion and chemical potential.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\node[draw,acc,thick,fill=acc!10,align=center,minimum width=4.2cm,minimum height=1.0cm] (root) at (0,3.2) {ideal quantum gas\\g(E) with Bose and Fermi functions};
\node[draw,black,align=center,minimum width=2.2cm] (ph) at (-4.5,0.8) {photon gas\\mu equals 0};
\node[draw,black,align=center,minimum width=2.2cm] (pn) at (-1.5,0.8) {phonons\\Debye cutoff};
\node[draw,black,align=center,minimum width=2.2cm] (bg) at (1.5,0.8) {Bose gas\\condensation};
\node[draw,black,align=center,minimum width=2.2cm] (fg) at (4.5,0.8) {Fermi gas\\degeneracy};
\draw[->,black] (root) -- (ph);
\draw[->,black] (root) -- (pn);
\draw[->,black] (root) -- (bg);
\draw[->,black] (root) -- (fg);
\end{tikzpicture}
$$

The [photon gas](/statistical-mechanics/bose-systems/the-photon-gas-and-plancks-radiation-law)
and [Bose-Einstein condensation](/statistical-mechanics/bose-systems/bose-einstein-condensation-derived)
carry the boson branch, and the
[degenerate Fermi gas](/statistical-mechanics/fermi-gas/the-ideal-fermi-gas-at-zero-temperature)
carries the fermion branch; each specializes the formulas assembled here.

## Summary

- The mode sum becomes $\int_0^\infty g(\varepsilon)\,\d\varepsilon$ with density
  of states $g(\varepsilon)=g_s\,2\pi V(2m)^{3/2}h^{-3}\,\varepsilon^{1/2}$ for a
  nonrelativistic gas in three dimensions.
- Number, pressure, and energy reduce to the Bose functions $g_\nu(z)$ or Fermi
  functions $f_\nu(z)$: $N/V=(g_s/\lambda^3)h_{3/2}(z)$ and
  $P/k_BT=(g_s/\lambda^3)h_{5/2}(z)$, with $U=\tfrac32 PV$ nonrelativistically.
- Integration by parts gives $PV=U/(s+1)$ for $g\propto\varepsilon^{s}$: $\tfrac23U$
  nonrelativistic, $\tfrac13U$ ultrarelativistic, independent of statistics.
- The finite ceiling $g_{3/2}(1)=\zeta(3/2)=2.612$ foreshadows condensation.
- Choosing $g(\varepsilon)$ and $\mu$ specializes the framework to the photon gas,
  phonons, the Bose gas, and the Fermi gas.

[^pathria-dos]: **Pathria & Beale**, _Statistical Mechanics_, §6.1–6.2 — the continuum replacement of the mode sum, the $\varepsilon^{1/2}$ density of states, and the caveat that the lowest level is dropped (restored for the condensing Bose gas in Ch. 7).
[^kardar-func]: **Kardar**, _Statistical Physics of Particles_, §7.3 — the Bose and Fermi functions $g_\nu(z)$, $f_\nu(z)$, their series and integral forms, and the value $g_{3/2}(1)=\zeta(3/2)$. See MIT OCW 8.333, <https://ocw.mit.edu/courses/8-333-statistical-mechanics-i-statistical-mechanics-of-particles-fall-2013/>.
[^kardar-pu]: **Kardar**, _Statistical Physics of Particles_, §7.3–7.4, and **Pathria & Beale**, §7.1 and §8.1 — the pressure-energy relation $PV=U/(s+1)$ from integration by parts, giving $\tfrac23U$ nonrelativistically and $\tfrac13U$ for the ultrarelativistic and photon gases.
[^zeta]: The **Riemann zeta function** is $\zeta(s)=\sum_{n=1}^{\infty} n^{-s}=1+2^{-s}+3^{-s}+\cdots$. It enters these gas integrals through the standard Bose result $\int_0^\infty \frac{x^{s-1}}{e^x-1}\,\d x=\Gamma(s)\,\zeta(s)$. The value $\zeta(3/2)\approx 2.612$ used here is a half-integer argument, characteristic of nonrelativistic Bose gases.
