Solution (source code)

= Solution

The <wave function> vanishes in regions I and III. In region II it is sinusoidal and satisfies $\psi(0)=\psi(L)=0$. The time-independent equation there is
$$
\boxed{-\frac{\hbar^2}{2m}\frac{d^2\psi}{dx^2}=E\psi,\qquad0<x<L.}
$$
A nonzero <stationary state> therefore has standing-wave nodes at the two walls; it cannot have a nonzero constant ground-state <wave function>.