= Solution
For a normalized wavefunction obeying the infinite-wall <Dirichlet boundary condition>, integration by parts gives the energy expectation
$$
\langle H\rangle
=\int_0^a\left(\frac{\hbar^2}{2m}|\psi'(x)|^2
+U(x)|\psi(x)|^2\right)\,dx\geq0.
$$
Thus every <energy eigenvalue> is nonnegative.
For $0<E<U_0$, the <Time-independent Schrödinger equation> and the wall conditions give
$$
\psi(x)=
\begin{cases}
A\sin(kx),&0\leq x\leq a/2,\\
B\sinh(l(a-x)),&a/2\leq x\leq a,
\end{cases}
$$
where $k=\sqrt{2mE}/\hbar$ and $l=\sqrt{2m(U_0-E)}/\hbar$. Continuity of $\psi$ and $\psi'$ at the finite potential step gives
$$
A\sin(ka/2)=B\sinh(la/2),
$$
$$
Ak\cos(ka/2)=-Bl\cosh(la/2).
$$
Dividing and rearranging yields the <bound-state quantization condition>
$$
\boxed{\frac1k\tan\frac{ka}{2}
=-\frac1l\tanh\frac{la}{2}}.
$$
Back to article page