Solution (source code)

= Solution

\b[The <ground-state energies> are $1.50\ \mathrm{eV}$ and $0.376\ \mathrm{eV}$, respectively.] For a <particle in a box> of width $L$, the <wave function> must vanish at both infinite walls. The lowest nonzero <standing wave> therefore has <wavelength> $2L$, giving the <kinetic energy> eigenvalue
$$
E_1=\frac{\pi^2\hbar^2}{2m_eL^2}=\frac{h^2}{8m_eL^2}.
$$
Using the <electron mass> and converting <joules> to <electronvolts> gives
$$
\boxed{E_1(0.5\ \mathrm{nm})\simeq1.504\ \mathrm{eV},\qquad E_1(1\ \mathrm{nm})\simeq0.3760\ \mathrm{eV}.}
$$
Doubling the confinement length divides this <kinetic energy> by four. A zero <potential energy> inside the box does not imply zero total <energy>: a constant, zero-<momentum> <wave function> cannot satisfy both wall conditions unless it vanishes everywhere. This is a concrete manifestation of <quantum confinement> and the <Heisenberg uncertainty principle>.