---
tag: E0V3N93DX8
kind: statement
role: theorem
name: Arithmetic–geometric mean and elliptic integrals
msc: ["33E05", "26E60", 65D20]
uses: [0DRF0F3XC9, 05M5SWSZZD, RM54CPPE12]
about: [RM54CPPE12]
sources:
  - url: https://en.wikipedia.org/wiki/Arithmetic%E2%80%93geometric_mean
---

## Statement

Let $a, b > 0$.
Define sequences by $a_0 = a$, $b_0 = b$ and
$$a_{n+1} = \frac{a_n + b_n}{2}, \qquad b_{n+1} = \sqrt{a_n b_n}.$$
Then:

1. Both sequences [[converge|05M5SWSZZD]] to the same limit $M(a, b) > 0$, the *arithmetic–geometric mean* of $a$ and $b$.
2. $$\int_0^{\pi/2} \frac{d\theta}{\sqrt{a^2\cos^2\theta + b^2\sin^2\theta}} = \frac{\pi}{2 M(a, b)}.$$
3. For $0 \le k < 1$ and $k' = \sqrt{1 - k^2}$, the [[complete elliptic integral of the first kind|RM54CPPE12]] satisfies $K(k) = \dfrac{\pi}{2 M(1, k')}$.

## Remarks

Proof idea: by the [[inequality of arithmetic and geometric means|0DRF0F3XC9]], $b_n \le b_{n+1} \le a_{n+1} \le a_n$ for $n \ge 1$, so both sequences are monotone and bounded.
Since $b_{n+1} \ge b_n$, one gets $a_{n+1} - b_{n+1} \le a_{n+1} - b_n = (a_n - b_n)/2$, so the difference tends to $0$ and the two limits agree.
For part 2, call the integral $I(a, b)$; a change of variables found by Gauss shows that $I(a, b) = I(a_1, b_1)$.
Hence $I(a, b) = I(a_n, b_n)$ for all $n$, and letting $n \to \infty$ gives $I(M, M) = \pi / (2M)$.
Part 3 is part 2 with $a = 1$ and $b = k'$, since $\cos^2\theta + k'^2\sin^2\theta = 1 - k^2\sin^2\theta$.

Example: $M(1, \sqrt2) \approx 1.19814$, and $1/M(1, \sqrt 2)$ is Gauss's constant, equal to $\varpi/\pi$ where $\varpi$ is the [[lemniscate constant|V5A2S8QYQQ]].

## Explanations

### L1 human

Start with two positive numbers, and replace them by their average and their geometric mean, again and again.
The two numbers squeeze together very fast, and their common limit is the arithmetic–geometric mean.
The surprise is that this simple process computes an elliptic integral, which has no elementary formula.

### L2 human

The convergence is quadratic: once $a_n$ and $b_n$ are close, the number of correct digits roughly doubles at each step, because $a_{n+1} - b_{n+1} = (\sqrt{a_n} - \sqrt{b_n})^2/2$.
This makes the formula $K(k) = \pi/(2M(1, k'))$ the standard way to evaluate $K$ numerically.
Its invariance step $I(a, b) = I(a_1, b_1)$ is a form of [[Landen's transformation|A0V7ZAEQBW]].
Combined with [[Legendre's relation|8GSKDNZ4TK]] it gives the Gauss–Legendre algorithm for $\pi$.
