Analytical continuation of complete elliptic integral of the first kind I am dealing with a problem involving the complete elliptical function of the first kind, which is defined as:
$K(k)=\int_0^{\pi/2} d\theta \frac{1}{\sqrt{1-k^2\sin^2(\theta)}}=\int_0^1 dt \frac{1}{\sqrt{1-t^2}\sqrt{1-k^2 t^2}} $
for $k^2<1$. I am trying to find however how to analytically continue the function for cases where $k^2>1$, and especially when $k^2$ is complex and classify it depending on $\mathrm{Im}(k^2)$ is complex or not.
This looks like a very trivial question that must be written somewhere, but i couldn't find it explicitely not in several references or here in the forum. The closest solution i found has been in these notes:
http://www.damtp.cam.ac.uk/user/md327/fcm_2.pdf
Where they say in a last remark that the analytically continuation should be written in terms of $K(k^2) n +iK'(k')m$, where $k'$ is just the complimentary modulus  and $n,m$ integers, however, right now i don't know how to prove it, and what are the $n,m$ depending on $\mathrm{Re,Im}(k^2)$
Someone can help?

On an abstract level, the elliptic integral $K$ is an inverse of the elliptic functions which are doubly periodic (in the complex plane) with periods $K$ and $iK'$ (this in a sense answers your question).
To be concrete, one can answer your question given the integral representation you have given (setting $m=k^2$) for convenience. We are interested to know the value of the integral for $m_\epsilon = m \pm i\epsilon$  with $m>1$ and $\epsilon>0$. We can evaluate
$$\lim_{\epsilon\to0} K(m_\epsilon) = \lim_{\epsilon\to0} \int_0^{\pi/2}\!d\theta\,\frac{1}{\sqrt{1-m_\epsilon \sin^2 \theta}} = \underbrace{\int_0^{\theta^*}\!d\theta\,\frac{1}{\sqrt{1-m \sin^2 \theta}}}_{I_1}\pm i
\underbrace{\int_{\theta^*}^{\pi/2}\!d\theta\,\frac{1}{\sqrt{m \sin^2 \theta-1}}}_{I_2}$$
with $\theta^*=\arcsin(1/m^{1/2})$.
Now, we treat the two integrals separately. We perform the substitution  $$ m \sin^2\theta = \sin^2 \theta'$$ and obtain
$$I_1 = \frac{1}{\sqrt{m}} \int_{0}^{\pi/2} \!d\theta'\,\frac{1}{\sqrt{1- m^{-1} \sin^2 \theta'}} = \frac{K(m^{-1})}{\sqrt{m}}.$$
Similarly employing the substitution $1- \sin^2 \theta =(1-m^{-1}) \sin^2 \theta'$ , we find that
$$ I_2 = \frac{1}{\sqrt{m}} \int_0^{\pi/2}\!d\theta'\,\frac{1}{\sqrt{1-(1-m^{-1}) \sin^2 \theta'}} = \frac{K(1-m^{-1})}{\sqrt{m}}.$$
Thus, we have that
$$ K(m) = \frac{1}{\sqrt{m}}\left[K(m^{-1}) \pm i K(1-m^{-1}) \right] .  \tag{1}$$
The right hand side is the analytical continuation through the branch cut at $m>1$. 
With the formula (1), you can find all the additional branches. E.g., at the point $m<1$ the right hand side becomes invalid but then using (1) you can find a the analytical continuation again.
To get a connection to your formula, you have to note that
$$ \frac{K(1-m^{-1})}{\sqrt{m}} = K(1-m)= K'(m).$$ Thus, we have that (for $m>1$ as before)
$$\mathop{\rm Im} K(m) = \pm K'(m)$$
and thus the branches differ by (even) multiples of $i K'(m)$. Similarly, by analytically continuing $K'(m)$ you observe that you get additional branches displaces by $K(m)$.
You find some more information e.g. here.
