2. Infinite Square Well
Reading time: ~30 minutes | Pages: 8
The "particle in a box": the simplest bound state problem with discrete energy levels.
The Potential
A particle confined to $0 \leq x \leq a$:
Boundary conditions: $\psi(0) = \psi(a) = 0$
Energy Eigenstates
Inside the well ($0 < x < a$), solve:
Applying boundary conditions gives:
These are normalized eigenstates
Energy Levels
Quantized energies:
Key observations:
- Energy levels grow as $n^2$
- Ground state energy $E_1 > 0$ (zero-point energy)
- No state with $n = 0$ (would violate uncertainty principle)
- Energy spacing increases with $n$
Orthonormality
The eigenstates form a complete orthonormal basis
General Solution
Any state can be expanded:
where $c_n = \langle\psi_n|\Psi(x,0)\rangle$
Properties of Eigenstates
Number of nodes: $\psi_n$ has $n-1$ nodes (zeros)
Parity:
- Odd $n$: symmetric about center ($x = a/2$)
- Even $n$: antisymmetric
Classical limit: For large $n$, $|\psi_n|^2 \to$ uniform (correspondence principle)
Expectation Values
Position:
Momentum:
Computational Example
Let's compute and visualize the first few energy eigenstates numerically:
Infinite Square Well: Wave Functions and Energies
Calculate normalized wave functions and energy levels for a particle in a 1D box
import numpy as np
import matplotlib.pyplot as plt
# Physical constants
hbar = 1.055e-34 # Jยทs
m = 9.109e-31 # electron mass (kg)
a = 1e-9 # box width (1 nm)
# Position array
x = np.linspace(0, a, 1000)
# Calculate first 4 energy levels
def energy_level(n):
"""Energy of nth level in Joules"""
return (n**2 * np.pi**2 * hbar**2) / (2 * m * a**2)
# Calculate wave function
def psi(n, x):
"""Normalized wave function for nth state"""
return np.sqrt(2/a) * np.sin(n * np.pi * x / a)
# Compute and display
print("Infinite Square Well (a = 1 nm)")
print("=" * 50)
for n in range(1, 5):
E_n = energy_level(n)
E_eV = E_n / 1.602e-19 # Convert to eV
print(f"n = {n}:")
print(f" Energy: {E_n:.3e} J = {E_eV:.3f} eV")
print(f" E_{n}/E_1 = {n**2}")
print()
# Create visualization
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))
# Plot wave functions
for n in range(1, 4):
psi_n = psi(n, x)
ax1.plot(x * 1e9, psi_n * 1e-4.5, label=f'n={n}')
ax1.set_xlabel('Position (nm)')
ax1.set_ylabel('ฯ(x) (nm^-1/2)')
ax1.set_title('Wave Functions')
ax1.legend()
ax1.grid(True, alpha=0.3)
# Plot probability densities
for n in range(1, 4):
psi_n = psi(n, x)
prob = psi_n**2
ax2.plot(x * 1e9, prob * 1e-9, label=f'n={n}')
ax2.set_xlabel('Position (nm)')
ax2.set_ylabel('|ฯ(x)|ยฒ (nm^-1)')
ax2.set_title('Probability Densities')
ax2.legend()
ax2.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('infinite_well.png', dpi=150, bbox_inches='tight')
print("Plot saved as 'infinite_well.png'")๐ก This example demonstrates the computational approach to solving physics problems