Unwrapped reflectionless sine-Gordon transmission phase (source code)

= Unwrapped reflectionless sine-Gordon transmission phase
{title2=$\delta_N(0)=\pi N,\quad\delta_N(\infty)=\pi(N+1)/2$}

For the transmitting product with factors $\cosh[(\theta-i\pi j/N)/2]/\cosh[(\theta+i\pi j/N)/2]$ and prefactor $(-1)^N$, the continuous phase on $\theta\geq0$ is $\pi N-2\sum_{j=1}^{N-1}\arctan[\tanh(\theta/2)\tan(\pi j/(2N))]$. Its derivative is $-\sum_j\sin(\pi j/N)/[\cosh\theta+\cos(\pi j/N)]$. A <Riemann sum> at fixed positive <rapidity> gives $(2N/\pi)\log\tanh(\theta/2)$ at leading order. The endpoints depend on the stated unwrapped branch; setting the high-energy value to zero silently changes the constant.