Solution (source code)

= Solution

Normalize the solution by its incoming amplitude at $+\infty$. The <transmission coefficient> and <reflection coefficient> are
$$
\boxed{T(k)=\frac1{a(k)},
\qquad
R(k)=\frac{b(k)}{a(k)}.}
$$
For two solutions of the same equation in <Sturm-Liouville form>, the modified <Wronskian>
$$
W=p^2(\psi_1\psi_2'-\psi_2\psi_1')
$$
is independent of $x$. Take $\psi_1=\phi_k$ and $\psi_2=\overline{\phi_k}$. At $-\infty$ this gives $W=-2ik$, while at $+\infty$ it gives
$$
W=-2ik(|a(k)|^2-|b(k)|^2).
$$
Therefore $|a|^2-|b|^2=1$, and division by $|a|^2$ yields conservation of scattering flux:
$$
\boxed{|R(k)|^2+|T(k)|^2=1.}
$$