What is the complete elliptic integral of the second kind?
The complete elliptic integral of the second kind, written \(E(k)\), is the special function defined by the integral of the square root of (1 minus k-squared times sine-squared theta) from 0 to pi/2. It shows up whenever you need the exact perimeter of an ellipse, the arc length of a sine wave, the period of a large-amplitude pendulum, or stress-intensity factors for elliptical cracks. The input \(k\) is called the modulus and must lie between -1 and 1.
$$E(\text{k}) = \int_{0}^{\pi/2} \sqrt{1 - \text{k}^{2}\,\sin^{2}\theta}\; d\theta$$
How to use this calculator
Enter the modulus \(k\) (a dimensionless number from -1 to 1) and read off \(E(k)\). Because the integrand depends only on k-squared, the result is symmetric: \(E(-k) = E(k)\). The function decreases smoothly from \(E(0) = \pi/2\) down to \(E(1) = 1\). Note this tool takes the modulus \(k\) directly, not the parameter \(m = k^2\) used by some references.
The formula explained
We evaluate \(E(k)\) with the arithmetic-geometric mean (AGM), which converges quadratically. Set \(a_0 = 1\), \(b_0 = \sqrt{1 - k^2}\), \(c_0 = k\). Each step computes \(a = (a+b)/2\), \(b = \sqrt{a\cdot b}\), and \(c = (a-b)/2\) until \(c\) is negligible. Then \(K(k) = \pi / (2\cdot a_N)\) is the first-kind integral, and \(E(k) = K(k)\cdot(1 - \tfrac{1}{2}\cdot\sum 2^n \cdot c_n^2)\). This avoids slowly converging power series and is accurate to machine precision in only a handful of iterations.
Worked example
For \(k = 0.1\), \(m = 0.01\). The AGM gives \(a_N \approx 0.997492\) and the c-squared sum \(S \approx 0.01001256\), so \(K \approx 1.5747456\) and \(E = K(1 - 0.5\cdot S) \approx 1.566862\). This matches the series approximation $$E(k) \approx \frac{\pi}{2}\left(1 - \tfrac{1}{4}k^2 - \tfrac{3}{64}k^4\right).$$
FAQ
What is \(E(0)\)? Exactly \(\pi/2 \approx 1.5707963\), since the integrand reduces to 1.
What is \(E(1)\)? Exactly 1, because the integrand becomes \(\cos\theta\), whose integral from 0 to pi/2 is 1.
Why is \(k\) limited to -1 and 1? Outside this range the integrand becomes imaginary for some \(\theta\), so \(E(k)\) is no longer a real number.