Solution (source code)

= Solution

Set $z=\phi-it$ with real constant $\phi$. Then
$$
\dot B=-\frac{i}{2\hbar}\sec^2z=-\frac{i}{2\hbar}-\frac{i}{2\hbar}\tan^2z=-\frac{i}{2\hbar}-2i\hbar B^2.
$$
Thus \b[$B=\tan(\phi-it)/(2\hbar)$ solves the Riccati equation wherever it is finite]. Integrating the amplitude equation also gives
$$
A(t)=A(0)\left[\frac{\cos\phi}{\cos(\phi-it)}\right]^{1/2},
$$
with the square root chosen continuously from $t=0$. For the normalizable solutions used in part (c), $\sin(2\phi)>0$; equivalently one can choose $0<\phi<\pi/2$ modulo $\pi$. The unrestricted real parameter solves the differential equation locally, but not every value defines a normalizable <wavefunction>.