# Complete Elliptic Integral of the 3rd Kind - Residual Computation

Let us consider the following function $f(a,k)$ in the interval $a,k\in (0,1]$ :

$$f(a,k)=\frac{2 \sqrt{1-a^2} \sqrt{a^2-k^2}}{\sqrt{a^2}}\Pi\left(a^2,k^2\right)$$

where $\Pi\left(a^2,k^2\right)$ is the complete elliptic integral of the 3rd kind:

$$\Pi\left(a^2,k^2\right)=\int_0^{\frac{\pi }{2}} \frac{1}{\left(1-a^2\text{sin}^2(x)\right)\sqrt{1-k^2\text{sin}^2(x)}} \, dx$$

Since the integral is symmetric in $(x \leftrightarrow -x)$ we can spread it from $-\pi/2$ to $\pi/2$ and divide the result by two, so that we have:

$$f(a,k)=\frac{\sqrt{1-a^2} \sqrt{a^2-k^2}}{\sqrt{a^2}}\int_{-\frac{\pi }{2}}^{\frac{\pi }{2}} \frac{ dx}{\left(1+\frac{a^2}{4}\left(e^{i 2 x}-2+e^{-i 2 x}\right)\right)\sqrt{1+\frac{k^2}{4}\left(e^{i 2 x}-2+e^{-i 2 x}\right)}}$$

Considering that $e^{i 2 x}$ goes through one closed circle when $x$ goes from $-\pi/2$ to $\pi/2$, we can make the substitution:

$$e^{i 2 x}=z~\text{,}~~~~dx =\frac{1}{2 i z} dz$$

and obtain a closed contour integral in the complex plane:

$$f(a,k)=\oint _{|z|=1}\frac{\sqrt{1-a^2} \sqrt{a^2-k^2}\sqrt{z}}{2i\sqrt{a^2}\left(z+\frac{a^2}{4}\left(z^2-2z+1\right)\right)\sqrt{z+\frac{k^2}{4}\left(z^2-2z+1\right)}} dz$$

Now, since the contour is closed, the integral should only be different from zero if a singularity with a non-vanishing residuum is enclosed by the contour. The residuum associated with the vanishing of the square root term in the denominator is zero. The other terms in the denominator $\left(z+\frac{a^2}{4}\left(z^2-2z+1\right)\right)$ vanish for:

$$z_\pm = \frac{a^2-2 \left(1 \pm \sqrt{1-a^2}\right)}{a^2}$$

and the corresponding residuum for the integral is $\text{Res}(z_\pm)=\pm \frac{i}{2}$. However, it turns out that $z_+ \leq -1$ with $z_+ = -1$ only for $a=1$. In the same way we have $0 > z_- \geq-1$ with $z_-=-1$ only for $a=1$. Therefore, at regular points on the interval in question only the residue at $z_-$ contributes, so that the integral equals to:

$$f(a,k)=2\pi i \left(-\frac{i}{2} \right)=\pi$$

Now, obviously this result is not entirely correct, since the function $f(a,k)$ is not even constant over the region when plotted e.g. in Mathematica. I would like to know what kind of mistakes I did in the computation, and how I should deal with residual contributions to the elliptic integrals in general? Also, the point $(a=1,k=1)$ seems to be very special, since there $z_+=z_-=-1$ which is $on$ the integration contour (but $z_-$ approaches this spot from within the contour and $z_+$ from outside of the contour). It would be nice to know how to treat this special point.

• How you got rid of the branch cut between the branch points where the term inside the $\surd$ vanishes? – Fabian Jan 17 '13 at 23:07
• I did not get rid of it. I computed the residuum by multiplying the integrand with linear $(z-z_{1,2})$ and then expanded at that point in a series. Now that you mention it I am starting to realize - the singularity is probably infinite, so that I cannot compute the residuum in this simple way? – Kagaratsch Jan 17 '13 at 23:15
• Ok, the zeros in the square root are not isolated singularities, but branch points. The function cannot be made continuous in any annulus around the zero, therefore residual computation techniques may not be applied. I guess that renders the above computation completely useless... Wonder if at least the residual contribution of $\pi$ still is valid? – Kagaratsch Jan 17 '13 at 23:45
• you can take the contribution of the residue but you have to additionally care about the contribution of the branch cut, see e.g. here. – Fabian Jan 18 '13 at 6:28
• Thank you! That's a useful link. – Kagaratsch Jan 23 '13 at 0:01