Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2.5. Particle in a Box

Course-wide Conventions & Notation

Overview and Learning Objectives

A particle in a box is the simplest quantized model of translation and provides a clean route to the translational partition function. We review the 1D and 3D energy levels, derive qtrans=V/Λ3q_{\mathrm{trans}}=V/\Lambda^3 in the high-temperature/large-volume limit, and use Q=qN/N!Q=q^N/N! to recover ideal-gas thermodynamic relations.

Learning objectives:

Core Ideas and Derivations

Review of the Particle in a Box

Particle in a One-Dimensional Box

Source
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from scipy.constants import k, eV
from labellines import labelLines
from myst_nb import glue

fig, axs = plt.subplot_mosaic([[0]], figsize=(4, 4))

# Plot a one-dimensional box
axs[0].plot([-0.5, -0.5], [18, 0], color='black', zorder=2.5, lw=4)
axs[0].plot([-0.5, 0.5], [0, 0], color='black', zorder=2.5, lw=4)
axs[0].plot([0.5, 0.5], [0, 18], color='black', zorder=2.5, lw=4)

# Plot the energy levels (blue lines)
for n in range(1, 5):
    energy = axs[0].plot([-0.5, 0.5], [n**2, n**2], color='blue', label=r'$E_{%d}$' % n)
    labelLines(energy, xvals=[-1/6], zorder=2.5)

# Plot the wavefunctions (red curves)
x = np.linspace(-0.5, 0.5, 100)
for n in range(1, 5):
    wavefunction = axs[0].plot(x, np.sin(n * np.pi * (x + 0.5)) + n**2, color='red', label=r'$\psi_{%d}$' % n)
    labelLines(wavefunction, xvals=[1/6], zorder=2.5)

axs[0].set_xlabel('Position')
axs[0].set_ylabel('Energy')
axs[0].set_xticks([-0.5, 0, 0.5])
axs[0].set_xticklabels([r'$-L/2$', r'$0$', r'$L/2$'])
axs[0].set_yticks([])
axs[0].spines['top'].set_visible(False)
axs[0].spines['right'].set_visible(False)
axs[0].spines['left'].set_visible(False)

plt.tight_layout()
plt.show()
plt.close(fig)
<Figure size 400x400 with 1 Axes>

Energy levels EnE_n (blue) and wavefunctions ψn\psi_n (red) for a particle in a one-dimensional box with boundaries at x=±L/2x=\pm L/2.

For a particle in a one-dimensional box of length LL, the quantized energy levels are

En=h28mL2 n2for  n=1,2,3,…,E_n = \frac{h^2}{8 m L^2} \, n^2 \quad \text{for} \; n = 1, 2, 3, \ldots,

where hh is Planck’s constant, mm is the particle mass, and nn is a positive integer.

Particle in a Three-Dimensional Box

In three dimensions, the energy levels are

Enx,ny,nz=h28m(nx2Lx2+ny2Ly2+nz2Lz2),E_{n_x, n_y, n_z} = \frac{h^2}{8 m} \left( \frac{n_x^2}{L_x^2} + \frac{n_y^2}{L_y^2} + \frac{n_z^2}{L_z^2} \right),

where nxn_x, nyn_y, and nzn_z are positive integers, and LxL_x, LyL_y, and LzL_z are the respective side lengths of a rectangular box.

Particle in a Cube

For a cube of side LL, Lx=Ly=Lz=LL_x = L_y = L_z = L. The energy simplifies to

Enx,ny,nz=h28mL2(nx2+ny2+nz2)=h28mV2/3(nx2+ny2+nz2),E_{n_x, n_y, n_z} = \frac{h^2}{8mL^2} \left( n_x^2 + n_y^2 + n_z^2 \right) = \frac{h^2}{8 m V^{2/3}} \left( n_x^2 + n_y^2 + n_z^2 \right),

where V=L3V = L^3 is the cube volume.

Partition Function for a Particle in a Cube

The single-particle partition function for a three-dimensional cube is

q=∑nx,ny,nzexp⁡[−βEnx,ny,nz]=∑nx=1∞∑ny=1∞∑nz=1∞exp⁡(−βh28mL2(nx2+ny2+nz2)).\begin{aligned} q &= \sum_{n_x, n_y, n_z} \exp \left[-\beta E_{n_x, n_y, n_z}\right] \\ &= \sum_{n_x=1}^{\infty} \sum_{n_y=1}^{\infty} \sum_{n_z=1}^{\infty} \exp \left(-\beta \frac{h^2}{8 m L^2} (n_x^2 + n_y^2 + n_z^2)\right). \end{aligned}

Define α=βh2/(8mV2/3)\alpha = \beta h^2 / (8 m V^{2/3}). Then

q=(∑n=1∞e−αn2)3.q = \left( \sum_{n=1}^{\infty} e^{-\alpha n^2} \right)^3.

Approximation of the Sum

When the level spacing is small (large TT or large LL), the sum ∑n=1∞e−αn2\sum_{n=1}^{\infty} e^{-\alpha n^2} is well approximated by an integral:

∑n=1∞e−αn2≈∫0∞e−αx2 dx=(π4α) ⁣ ⁣1/2.\sum_{n = 1}^{\infty} e^{-\alpha n^2} \approx \int_0^{\infty} e^{-\alpha x^2} \, dx = \left(\frac{\pi}{4 \alpha}\right)^{\!\!1/2}.

Substituting α=βh2/(8mV2/3)\alpha = \beta h^2/(8 m V^{2/3}) gives

(π4α) ⁣ ⁣1/2=(π4⋅8mV2/3βh2) ⁣ ⁣1/2=(2πmβh2) ⁣1/2V1/3.\left(\frac{\pi}{4 \alpha}\right)^{\!\!1/2} = \left(\frac{\pi}{4} \cdot \frac{8 m V^{2/3}}{\beta h^2}\right)^{\!\!1/2} = \left(\frac{2 \pi m}{\beta h^2}\right)^{\!1/2} V^{1/3}.

We often define the thermal de Broglie wavelength Λ\Lambda as

Λ=(h22πmkBT) ⁣1/2.\Lambda = \left(\frac{h^2}{2 \pi m k_{\mathrm B} T}\right)^{\!1/2}.

Hence,

∑n=1∞e−αn2≈V1/3Λ.\sum_{n = 1}^{\infty} e^{-\alpha n^2} \approx \frac{V^{1/3}}{\Lambda}.

So the single-particle partition function becomes

q=VΛ3.q = \frac{V}{\Lambda^3}.

Partition Function for NN Particles in a Cube

For NN identical, non-interacting, indistinguishable particles, the total partition function QQ is

Q=qNN!=1N!(VΛ3) ⁣N.Q = \frac{q^N}{N!} = \frac{1}{N!}\left(\frac{V}{\Lambda^3}\right)^{\!N}.

The factor of N!N! corrects for particle indistinguishability: permutations of identical particles do not produce new states.

Ensemble Averages for NN Particles in a Cube

Natural Logarithm of the Partition Function

Taking the logarithm of QQ gives

ln⁡Q=Nln⁡(VΛ3)−ln⁡N!.\ln Q = N \ln \left(\frac{V}{\Lambda^3}\right) - \ln N!.

Often, the Stirling approximation (ln⁡N!≈Nln⁡N−N\ln N! \approx N \ln N - N) is used for large NN.

Internal Energy

The internal energy UU follows from

U=−(∂ln⁡Q∂β)N,V=32Nβ=32NkBT.U = -\left(\frac{\partial \ln Q}{\partial \beta}\right)_{N,V} = \frac{3}{2} \frac{N}{\beta} = \frac{3}{2} N k_{\mathrm B} T.

Heat Capacity at Constant Volume

From U=32NkBTU = \frac{3}{2}N k_{\mathrm B}T, it follows that

CV=(∂U∂T)N,V=32NkB.C_V = \left(\frac{\partial U}{\partial T}\right)_{N,V} = \frac{3}{2} N k_{\mathrm B}.

Pressure

To find the pressure, we use

P=kBT(∂ln⁡Q∂V)N,T=NkBTV,P = k_{\mathrm B} T \left(\frac{\partial \ln Q}{\partial V}\right)_{N,T} = \frac{N k_{\mathrm B} T}{V},

recovering the ideal gas law.

Translational Partition Function

Because the particle-in-a-box spectrum describes translational motion, the single-particle partition function

qtrans=VΛ3q_{\mathrm{trans}} = \frac{V}{\Lambda^3}

is called the translational partition function. It underpins the classical description of dilute gases when Λ≪\Lambda \ll (typical particle spacing), so quantum effects are negligible at ordinary densities and temperatures.

Computational Studio: Ideal Gas

Use the interactive studio below (or open it in a new tab) to vary particle count (NN), volume (VV), and temperature (TT). The studio visualizes how these parameters affect the gas while showing PP, UU, and SS derived from the partition function.

You can open the studio in a new tab: Ideal Gas Computational Studio.

Worked Example

Estimating Λ\Lambda and qtransq_{\mathrm{trans}} (helium, 300 K)

For a particle of mass mm, the thermal de Broglie wavelength is

Λ=h2πmkBT.\Lambda=\frac{h}{\sqrt{2\pi m k_{\mathrm B}T}}.

Take helium: m=4.0026 u=6.65×10−27 kgm=4.0026\,u=6.65\times10^{-27}\ \mathrm{kg}, T=300 KT=300\ \mathrm{K}.

  1. Compute Λ\Lambda

    Λ=6.626×10−342π(6.65×10−27)(1.381×10−23)(300)≈5.0×10−11 m.\Lambda=\frac{6.626\times10^{-34}}{\sqrt{2\pi(6.65\times10^{-27})(1.381\times10^{-23})(300)}} \approx 5.0\times10^{-11}\ \mathrm{m}.
  2. Compute the single-particle translational partition function in V=1.00 L=10−3 m3V=1.00\ \mathrm{L}=10^{-3}\ \mathrm{m^3}

    qtrans=VΛ3=10−3(5.0×10−11)3≈7.8×1027.q_{\mathrm{trans}}=\frac{V}{\Lambda^3} =\frac{10^{-3}}{(5.0\times10^{-11})^3} \approx 7.8\times10^{27}.

Result. qtrans≫1q_{\mathrm{trans}}\gg 1 in macroscopic volumes, consistent with the continuum approximation used to derive V/Λ3V/\Lambda^3.

Concept Checks

  1. Why does the sum over quantum numbers become well-approximated by an integral at high TT or large VV?

  2. What does the condition “interparticle spacing ≫Λ\gg \Lambda” mean physically?

  3. Why does translation give U∝TU\propto T but not U∝VU\propto V for an ideal gas?

  4. Where does the 1/N!1/N! factor enter when connecting microscopic states to macroscopic entropy?

Key Takeaways