Bound-state matching in a symmetric stepped well (source code)

= Bound-state matching in a symmetric stepped well

In an even, piecewise constant potential, integrate outward from the centre with either even <boundary conditions> $\psi'(0)=0$ or odd <boundary conditions> $\psi(0)=0$. Match the <wavefunction> and its <derivative> at every finite step and impose <exponential decay> outside. The resulting discrete <energies> alternate in <parity>, with the fourth <bound state> odd and containing three <nodes of a wavefunction>. There is no hard-wall zero at a finite step; the second <derivative> changes according to $\psi''=2m(V-E)\psi/\hbar^2$.