Solution (source code)

= Solution

For an <S wave>, put $u(r)=r\psi(r)$. A bound state has $E=-\varepsilon<0$, and the radial Schrödinger equation gives
$$
u(r)=
\begin{cases}
A\sin(kr),&r<a,\\
Be^{-\kappa r},&r>a,
\end{cases}
$$
where
$$
k^2=\frac{2m(U-\varepsilon)}{\hbar^2},
\qquad
\kappa^2=\frac{2m\varepsilon}{\hbar^2}.
$$
Continuity of $u,u'$ at $a$ gives
$$
\boxed{k\cot(ka)=-\kappa,\qquad
k^2+\kappa^2=\frac{2mU}{\hbar^2}.}
$$
The first bound state appears at threshold $\kappa\downarrow0$, where $ka=\pi/2$. The zero-energy threshold itself is not normalizable, so a deuteron bound state exists precisely when
$$
\boxed{U>\frac{\pi^2\hbar^2}{8ma^2}.}
$$
The wavefunction is $\psi=u/r$, with normalization fixing the remaining constant.