Real part of elliptic integral
Suppose complete elliptic integral of the first kind: $$ \tag 1 K(k) \equiv \int_{0}^{\frac{\pi}{2}}\frac{\mathrm{d}y}{\sqrt{1-k^2\sin^{2}(x)}}. $$ I need to evaluate its real part on interval $0 < k < \infty$.
Since $K(k)$ has discontinuity at $k = 1$ and acquires imaginary part, we need to use analytical continuation: $$ \tag 2 K(k) = \frac{1}{k}\left(K\left(\frac{1}{k}\right) \pm i K\left( \sqrt{1-\frac{1}{k^{2}}}\right)\right). $$ The great surprise for me is that by using the relation $$ K(x) = \frac{1}{1+x}K\left(\frac{2\sqrt{x}}{x+1}\right) $$ for $K(k)$ on the interval $0<k<1$ and for $\dfrac{1}{k}K\left(\dfrac{1}{k}\right)$ on the interval $1<k<\infty$, we find that expressions for $\mathrm{Re}K(k), 0 < k<1$ and $\mathrm{Re}K(k), 1 < k < \infty$ coincide: $$ \mathrm{Re}K(k) = \frac{1}{k+1}K\left(\frac{2\sqrt{k}}{k+1}\right). \quad 0 < k < \infty $$ Why this is true? I didn't expect this because of singularity of $K(k)$ at $k = 1$... For example, imaginary part in the region $0 < k < 1$ is zero, while in the region $1 < z < \infty$ it is non-zero with non-trivial functional dependence, making a jump at $z = 1$.
Is this somehow related to general properties of analytical continuation (which in our particular case is given by (2))?
First note: the function is not "analytic" at $k=1$. The real part has a logarithmic divergence.
Second note: it is quite natural that "jump" across the branch cut, just occurs in imaginary component. A similar observation follows for functions that are defined (on some part of the real axis) as real functions due to Schwarz reflection principle. E.g., you observe a similar behaviour for the elementary function $\log z$ on the (standard) branch cut along the negative real line.
Note that you may make the real part more regular without removing the "jump" of the imaginary part across the branch cut. For that you can take a look at the family of functions $$z^m \log z$$ with $m\geq 1$.
Last note: in this context, the Hilbert transform might help to guide your intuition. Given any real function $u(x)$, the Hilbert transform $v= H(u)$ provides another function such that $f_1(x) = u(x) +i v(x)$ is analytic in the upper half plane (thus is is an analytic continuation in the upper half plane). By Schwarz reflection principle $f_2(x) = u(x)-i v(x)$ is an analytic function on the lower half plane. If $v(x)=0$ for some interval along the real axis (given by the function $f(x)=u(x)$), then $f_1$ and $f_2$ are the analytical continuation of this function in the upper/lower half plane. In the region, where $v\neq 0$, they obviously just differ by an imaginary number.