# Particle in a box

Figure 1: The classical view of a particle (with velocity v) in a 1D box. With constant kinetic energy it bounces back and forth between the walls at x = 0 and x = L. Classically the particle is allowed to have any non-negative value for its kinetic energy, including zero.

The particle in a box or infinite square well problem is one of the simplest non-trivial solutions to Schrödinger's wave equation. As such it is often encountered in introductory quantum mechanics material as a demonstration of the quantization of energy. In its simplest form the problem is one-dimensional (1D), and involves a single particle living in an infinite potential well. What this means in the 1D case, which we examine here, is that there is a particle that is free to move back and forth along a line in between two points (e.g. 0 and L, or a / 2 and a / 2). The particle is however constrained to this region, and cannot under any circumstances be found outside of it.

In this article we will rigorously define this problem and find the solutions to the corresponding Schrödinger wave equation, and then examine some of the properties and implications of these solutions.

## The 1D square well

### Setting up the problem

As depicted in Figure 1, the potential energy for this system can be given by

V(x)=\left\{\begin{align} 0 &\ ;\ 0\le x\le L \\ \infty &\ ;\ \text{otherwise}\ . \end{align}\right.

That is, in a region of length L (the box or well) the potential is zero; everywhere else it is infinite. Since the total energy of the particle is given by the sum of its potential and kinetic energies, if it is in a region of infinite potential then the particle itself must have infinite energy, which of course cannot happen. An immediate consequence of this potential is therefore that the particle must be located somewhere between x = 0 and x = L.

This means that we only have to solve Schrödinger's equation inside the box and since the potential does not depend on time we can use the time-independent version of the Schrödinger equation. With V(x) = 0 in the box the wavefunction, ψ(x), that describes the state of the particle must satisfy the differential equation (DE)

$-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}\psi(x)=E\psi(x)\ ,$

where $\scriptstyle\hbar$ is Planck's constant divided by 2π, and m and E are the mass and energy of the particle, respectively. This is nothing but the eigenvalue problem, and our task is to determine the energy eigenvalue(s) E and eigenstate(s) ψ that solve it. The DE is second-order, linear, and ordinary, with constant coefficients. The general solution can be written as

$\psi(x)=a\cos\left(\sqrt{\frac{2mE}{\hbar^2}}x\right)+b\sin\left(\sqrt{\frac{2mE}{\hbar^2}}x\right)\ ,$

where a and b are complex constants to be determined from conditions on the system. (The interested reader is invited to find the second derivative of this function and substitute it back into the differential equation above to verify that it is indeed satisfied.) The first condition we can use is that the wavefunction must be continuous. We therefore know that the particle cannot exist at any position x < 0, which tells us that the wavefunction must be zero at negative positions (in order for the probability of finding the particle there to also be zero). Continuity then implies that at x = 0 the wavefunction is also zero, so we have

$0=\psi(0)=a\cos(0)+b\sin(0)=a\ .$

With a = 0 we now know that the wavefunction is

$\psi(x)=b\sin\left(\sqrt{\frac{2mE}{\hbar^2}}x\right)\ .$

### Energy quantization

Using the same continuity argument at x = L tells us that

$0=\psi(L)=b\sin\left(\sqrt{\frac{2mE}{\hbar^2}}L\right)\ .$

One solution to this is of course b = 0. However, this would mean that the wavefunction vanishes everywhere -- implying that there is no particle! The other way to satisfy this equality is to have the sine term vanish, which will happen if

$\sqrt{\frac{2mE}{\hbar^2}}L = 2n\pi\ ,$

where mathematically n can be any integer. This problem is not purely mathematical though, and we know for physical reasons that m, E, $\hbar$, and L are all greater than zero. This means that 2nπ must also be greater than zero, so n is restricted to being a natural number, 1,2,3,.... We can now solve for the particle's energy,

$E_n=\frac{n^2\pi^2\hbar^2}{2mL^2}\ ,$

where we have labelled the energy by the integer n. We have just derived energy quantization! Without the potential well, i.e. if the particle was free, its energy would be allowed to take on any real number. Once inside the box though, only a specific discrete set of energy eigenvalues is permitted.

Substituting En back into ψ, we now have an infinite number of possible wavefunctions for the particle,

$\psi_n(x)=b\sin\left(\frac{n\pi x}{L}\right)\ .$

The final step is to determine the value of b. This requires another condition that we can impose upon the problem.

### Normalization

The probability of finding the particle somewhere must be 1. Since the wavefunction vanishes everywhere outside [0,L], the normalization condition is

$1 =\int_0^L\psi^*(x)\psi(x)\,\mathrm{d}x =|b|^2\int_0^L\sin^2\left(\frac{n\pi x}{L}\right)\,\mathrm{d}x =|b|^2\frac{L}{2}\ .$

Solving for b tells us $b=e^{i\varphi}\sqrt{2/L}$, where $\varphi$ is some overall quantum phase (a real number). Because overall phases do not affect measurable results we are free to choose any value we want for $\varphi$ without affecting the physics. For simplicity then, we set $\varphi=0$.

### The solutions

Figure 2: A plot of ψn(x) for the first 4 wavefunctions.

We have now solved the particle-in-a-box problem. According to the Schrödinger wave equation the particle confined to the (infinite) box can only take on certain energy eigenvalues, namely

$E_n=\frac{n^2\pi^2\hbar^2}{2mL^2}\ ,$

and the wavefunction for the particle when it is in the nth energy eigenstate is

$\psi_n(x)=\sqrt{\frac{2}{L}}\sin\left(\frac{n\pi x}{L}\right)$

inside the box, and ψ(x) = 0 outside it.

Figure 2 shows a plot of the first four solutions for the wavefunction of a particle in a box. Note how as n increases the number of waves that fit in the box increases as well, meaning that the wavelength has decreased and therefore frequency has increased. As with electromagnetic waves a higher frequency corresponds to a higher energy, in agreement with the expression for En.

### Alternate description

Another common (equivalent) way to describe this problem is to shift the location of the box, so that it runs from L / 2 to L / 2 instead of 0 to L. The derivation of the allowed wavefunctions is very similar to what we did here, or the results can be obtained via coordinate transformation (specifically, a translation). With this different description of the square well the energy eigenvalues remain unchanged (as is to be expected[1]) while the resulting wavefunctions are given by[2]

$\psi_n(x)=\sqrt{\frac{2}{L}}\cos\left(\frac{n\pi x}{L}\right),$

if n is odd, and

$\psi_n(x)=\sqrt{\frac{2}{L}}\sin\left(\frac{n\pi x}{L}\right),$

if n is even.

## Properties of the particle in a box

### Completeness

The ψn are complete, so form a basis for the possible wavefunctions, or states, of the particle. This means that an arbitrary state, ψ(x), can be expressed as

$\psi(x)=\sum_{n=1}^\infty c_n\psi_n(x)$

where $\left|c_n\right|^2$ is the probability of measuring the particle's energy to be En, and therefore finding the particle in state ψn.

### Non-vanishing ground state energy

The particle is not allowed to have zero energy, because if E = 0 then n = 0, which makes the wavefunction

$\psi_0(x)=\sqrt{\frac{2}{L}}\sin\left(0\cdot\frac{\pi x}{L}\right)=0\ .$

But if ψ = 0 for all x then there is zero probability of finding the particle no matter where you look -- which means that there is no particle! What this implies then is that the lowest allowed energy or ground state energy for the particle in the box is

$E_1=\frac{\pi^2\hbar^2}{2mL^2}\ .$

### The free space limit

We can think of 'free space' as an infinitely wide box. Therefore if we take L, the width of the box, to infinity we would expect to find that in the limit we recover the result of a free particle. In fact, this is exactly what happens.

Mathematically we would find the same result for either of the solutions above, but physically free space doesn't have an infinite potential wall at x = 0. It is therefore more intuitive to look at the second solution, in which the potential well extends from x = − L / 2 to L / 2.

Notice that the energy spacing between two consecutive energy levels is

$\Delta E=E_{n+1}-E_n=\frac{\pi^2\hbar^2}{2mL^2}(2n+1)\ .$

It is easy to see that for any finite value of n the value of ΔE goes to zero as L goes to infinity. This tells us that a free particle can have any (real, positive) energy.

Perhaps surprisingly the wavefunction also appears to go to zero everywhere in the limit, which at first may appear to be a problem. As discussed above if the wavefunction vanishes everywhere then there shouldn't be a particle. The difference in this case is subtle, and has to do with the fact that we are dealing with infinities. The important point to note is that if the particle is in state ψn then the probability to find it if we look in the entire box is given by

$\int_{-L/2}^{L/2} \psi_n(x)^*\psi_n(x)\,dx =\frac{2}{L}\int_{-L/2}^{L/2} \sin^2\left(\frac{n\pi x}{L}\right)\,dx=1\ ,$

which is independent of L. This means that we would still find the particle if we looked in all of space after taking the limit $L\to\infty.$

## Non-stationary states

Eigenstates of the time-independent Schrödinger equation have a probability distribution that does not change with time, as | ψ(x,t) | 2 = | ψ(x,0) | 2. However, the probability distributions of wavefunctions that are sums of eigenfunctions with different energies do depend on time. In this section we will look at an example of this, and see how the energy eigenstates we found above allow us to solve for the evolution of the particle when it starts in an arbitrary state.

By solving the time-independent Schrödinger equation above we found the energy eigenstates of the particle in a 1D box. As the eigenstates of the total Hamiltonian these states are stationary, meaning that they do not change over time. However we also saw that these states form a basis for the space of all possible states of the particle, so what happens when it is in a superposition of multiple energy states? Since such a state is no longer an eigenstate of the Hamiltonian we know that it won't be stationary, so we will have to use the time-dependent Schrödinger equation.

As a specific example suppose that at time t = 0 we know that the particle is in the superposition of the first two energy levels given by

$\Psi(x,t=0) = \frac{1}{\sqrt{2}}\Big(\psi_1(x)+\psi_2(x)\Big)$

where the factor of $\scriptstyle 1/\sqrt{2}$ is there to make the state normalized. Our goal now is to determine how the particle's state changes with time, i.e. to find $\scriptstyle\Psi(x,t)$ for t > 0. Since the Hamiltonian of the system is independent of time and the state is expressed in terms of energy eigenstates we can simply write down the wavefunction of the particle at time t as

$\Psi(x,t)=\frac{1}{\sqrt{2}}\left(e^{iE_1t/\hbar}\psi_1(x)+e^{iE_2t/\hbar}\psi_2(x)\right)\ .$

Since we have already solved for the En and ψn, we can plug in the values from above to find the actual form of the solution. But first let's simplify our notation slightly. Dimensional analysis tells us that $\scriptstyle E_n/\hbar$ must have units of frequency, so let us define

$\omega_n = \frac{E_n}{\hbar} = \frac{n^2\pi^2\hbar}{2mL^2}$
Figure 3: The time-evolving probability density for a coherent superposition of the first two energy eigenfunctions (n = 1 and n = 2).

from which we can see that $\scriptstyle \omega_n=n^2\omega_1$. Now when we substitute the energy values and states into our time-evolving wavefunction we find

\begin{align} \Psi(x,t) &=\frac{1}{\sqrt{2}}\left( e^{i\omega_1 t}\sqrt{\frac{2}{L}}\sin\left(\frac{\pi x}{L}\right) +e^{i\omega_2 t}\sqrt{\frac{2}{L}}\sin\left(\frac{2\pi x}{L}\right) \right) \\ &= \frac{e^{i\omega_1 t}}{\sqrt{L}} \left( \sin\left(\frac{\pi x}{L}\right) + e^{3i\omega_1 t} \sin\left(\frac{2\pi x}{L}\right) \right) \end{align}\ .

To help us visualize what this wavefunction represents we will look at the probability density for the particle to be at a given location in the box as a function of time. This gives us

\begin{align} p(x,t)&=\Psi^*(x,t)\Psi(x,t) \\ &= \frac{1}{L}\left( \sin\left(\frac{\pi x}{L}\right) +e^{-3i\omega_1 t}\sin\left(\frac{2\pi x}{L}\right) \right) \left( \sin\left(\frac{\pi x}{L}\right) +e^{3i\omega_1 t}\sin\left(\frac{2\pi x}{L}\right) \right) \\ &= \frac{1}{L} \left( \sin^2\left(\frac{\pi x}{L}\right) +\sin^2\left(\frac{2\pi x}{L}\right) +2\cos(3\omega_1 t)\sin\left(\frac{\pi x}{L}\right)\sin\left(\frac{2\pi x}{L}\right) \right)\ . \end{align}

This probability density is shown in Figure 3, from which we can see that the most likely place to find the particle oscillates back and forth across the box. This oscillation occurs at frequency ω2 − ω1 = 3ω1. If the particle is charged, the oscillating charge density will produce electromagnetic radiation (light) with photon energy equal to the energy difference between the levels n = 1 and n = 2.

The method used here can be generalized to solve for the evolution of any initial state, due to the completeness of the eigenstates of the Hamiltonian. An arbitrary initial state can be written as

$\Psi(x,0) = \sum_{n=1}^{\infty} c_n\psi_n(x)$

where the expansion coefficients cn are in general complex and satisfy the normalization condition

$\sum_{n=1}^\infty |c_n|^2=1\ .$

The state of the particle at a later time can then be written simply as

$\Psi(x,t)=\sum_{n=1}^\infty c_n e^{iE_nt/\hbar}\psi_n(x)\ ,$

as was done in the example above.

## References

1. The energy of a particle should not depend in any way on our choice of coordinate system, i.e. where we choose to place the origin x = 0.
2. A. Messiah (1999) Quantum Mechanics: Two volumes bound as one ISBN 0486409244