Elliptic integrals: derivation of the imaginary-modulus transformation I have been using the imaginary-modulus transformation for elliptic integrals of the second kind $E(\phi,k)$ and I would love to know how it can be derived. This transformation has already been discussed in a number of previous questions (remarkably here), but I have not been able to find a reference where a derivation or proof was provided. Part of the problem might be insufficient mathematical knowledge on my part: I keep finding books where transformations with the same name are explained for elliptic functions, but I do not understand the details and I am not able to determine whether there is an obvious connection to the specific formula I am using:
$E(\phi,ik)=\frac{1}{\kappa'}\Big[E(\theta,\kappa)-\frac{\kappa^2sin(\theta)cos(\theta)}{\sqrt{1-\kappa^2sin^2(\theta)}}\Big]$
I would very much appreciate if anyone could give me any hints on how to derive that formula, even if it is just a rough indication of where it comes from, which might be complex math that I am not familiar with.
 A: By definition we have $$E(\phi, k) =\int_{0}^{\phi}\sqrt{1-k^2\sin^2x}\,dx\tag{1}$$ and replacing $k$ by $ik$ we get $$E(\phi, ik) =\int_{0}^{\phi}\sqrt{1+k^2\sin^2x}\,dx\tag{2}$$ Now we need to use the substitution $$\sin t =\frac {\sqrt{1+k^2}\sin x} {\sqrt{1+k^2\sin^2x}} $$ or equivalently $$\sin^2t=(1+k^2-k^2\sin^2t)\sin^2x$$ or $$\sin x=\frac{\sin t} {\sqrt{1+k^2\cos^2t}} $$ Differentiating the above we get $$\cos x \, dx=\frac{(1+k^2)\cos t} {(1+k^2\cos^2t) ^{3/2}} \, dt$$ and $$\cos x=\frac{\sqrt{1+k^2} \cos t}{\sqrt{1+k^2\cos^2t}} $$ therefore $$dx=\frac{\sqrt {1+k^2}}{1+k^2\cos^2t}\,dt$$ Finally the integral in $(2)$ is transformed into $$E(\phi, ik) =(1+k^2)\int_{0}^{\theta} \frac{dt}{(1+k^2\cos^2t) ^{3/2}}=\kappa'\int_{0}^{\theta}\frac{dt}{(1-\kappa^2\sin^2t)^{3/2}}\tag{3}$$ where $$\kappa=\frac{k} {\sqrt{1+k^2}}$$ and $$\sin\theta =\frac{\sqrt{1+k^2}\sin\phi}{\sqrt{1+k^2\sin^2\phi}}$$ Next note that $$\frac{d} {dt} \frac{\sin t\cos t} {\sqrt{1-\kappa^2\sin^2t}} =\frac{\sqrt{1-\kappa^2\sin^2t}} {\kappa^2}-\frac{\kappa'^2}{\kappa^2}\frac{1}{(1-\kappa^2\sin^2t)^{3/2}}$$ and integrating the above with respect to $t$ on interval $[0,\theta]$ we get $$\frac{\kappa^2\sin\theta \cos\theta} {\sqrt{1-\kappa^2\sin^2\theta}} =E(\theta, \kappa) - \kappa'E(\phi, ik) $$ (via equation $(3)$). This proves the desired transformation.

In exactly the same manner we can prove that if $$F(\phi, k) =\int_{0}^{\phi}\frac{dx}{\sqrt{1-k^2\sin^2x}}\tag{4}$$ then $$F(\phi, ik) =\kappa'F(\theta, \kappa) $$
