Skip to content

MSc Quantum Chemistry ยท Numerical Quantum Mechanics

Particle in a Box Numerical Solver

Solve one-dimensional particle-in-a-box states numerically, compare with analytical energy levels, and interpret wavefunction nodes.

Theory

The particle in a box model illustrates quantization from boundary conditions. Numerical finite-difference methods approximate the Hamiltonian matrix and recover eigenvalues and eigenvectors.

Procedure

  1. Define box length and grid spacing.
  2. Construct the kinetic-energy finite-difference matrix.
  3. Diagonalize the Hamiltonian.
  4. Compare eigenvalues and node counts with analytical results.

Observations

Interpretation rule

For an infinite box, En is proportional to n squared and wavefunction n has n - 1 internal nodes.

Validation

Grid convergence is checked by decreasing spacing until energy changes are small.

This page runs an interactive simulation of the experiment; enable JavaScript to use it.