$U=\tfrac{1}{2}\operatorname{arctanh}\left(\sin\phi\right)+\tfrac{1}{2}k^{-1}%
\operatorname{arctanh}\left(k\sin\phi\right).$