Solution (source code)

= Solution

The travelling-wave substitution $\xi=x-Ut$ gives
$$
\boxed{\psi_0''-2iU\psi_0'
+(1-|\psi_0|^2)\psi_0=0}.
$$
Write
$$
\psi_0(\xi)=u(\xi)+i\sqrt2U.
$$
Its real part satisfies
$$
\boxed{u''+(1-2U^2-u^2)u=0}.
$$
For $U>0$, the imaginary part also gives
$$
\sqrt2\,u'=1-2U^2-u^2.
$$
With $\alpha=\sqrt{1-2U^2}$ and a translation chosen so that the notch is centred at zero,
$$
\boxed{
\psi_0(\xi)=
\alpha\tanh\left(\frac{\alpha\xi}{\sqrt2}\right)
+i\sqrt2U}.
$$
Its limiting <modulus> is $\sqrt{\alpha^2+2U^2}=1=d$, as required. The same expression at $U=0$ is obtained directly from the second-order equation.