*Please wait for the animation to completely load.*

In the infinite square well potential, a particle is confined to a
box of length *L* by two infinitely high potential energy
barriers:

*V* = ∞
*x* ≤ 0 ,
*V* = 0 0 <
*x* < *L* ,
*V* = ∞
*x* ≥
*L .*

Because of the infinitely high walls we must have that ψ(*x*) = 0* * for *x* ≤ 0
and ψ(*x*) = 0 for *x* ≥ *L. * From the time-independent Schrödinger equation in one
dimension inside the well, 0 <* x *<* L*, we have that

−(*ħ*^{2}/2*m*)(*d*^{2}/*dx*^{2}) ψ(*x*) =
*E* ψ(*x*) .

The general solution is (we choose sines and cosines because of the boundary conditions, but complex exponentials are also solutions)

ψ(*x*) = *A*sin(*kx*) +* B*cos(*kx*) ,

where *k*^{2 }= 2*mE*/*ħ*^{2}, but we still need to satisfy the boundary conditions, and determine *A*, *B*, and *k* (and
if we know *k* we also have determined *E*). For the wall on the left we
need ψ(0) = 0, which means that *B* = 0, and hence that ψ(*x*) = *A*sin(*kx*). This solution
is plotted in the animation. Change the energy of the solution and note how the wave function shape changes.
For the wall on the right we need ψ(*L*) = 0 which sets *k* = *n*π/*L*.

The algorithm used to calculate energy eigenfunctions is called the *shooting method*. The
shooting method calculates the wave function by numerically solving the time-independent Schrödinger equation. The
solution for the wave function starts with ψ(*x*_{left}) = 0 to approximate ψ(*x *= −∞) = 0, and then
numerically solves the time-independent Schrödinger equation, calculating the energy eigenfunction from left to right.
Note that all energy values solve the time-independent Schrödinger equation, but only some of these are referred to as
*energy eigenvalues* (eigen is German for proper or characteristic) which yield valid (proper) bound-state energy
eigenfunctions.

In the case of the present animation, only the energy values that correspond to ψ(*L*) = 0
are called energy eigenvalues.