Gauss proved in 1818 that the value of integral
is unchanged if x and y are replaced by (x + y)/2 and √(xy), i.e. if you replaced x and y with their arithmetic mean and geometric mean [1].
So, for example, if you wanted to compute
you could instead compute
Notice that the coefficients of sin² θ and cos² θ are more similar in the second integral. It would be nice if the two coefficients were equal because then the integrand would be a constant, independent of θ, and we could evaluate the integral. Maybe if we apply Gauss’ theorem again and again, the coefficients will become more nearly equal.
We started with x = 3 and y = 7. Then we had x = 5 and y = √21 = 4.5826. If we compute the arithmetic and geometric means again, we get x = 4.7913 and y = 4.7874. If we do this one more time we get x = y = 4.789013. The values of x and y still differ, but only after the sixth decimal place.
It would seem that if we keep replacing x and y by their arithmetic and geometric means, we will converge to a constant. And indeed we do. This constant is called the arithmetic-geometric mean of x and y, denoted AGM(x, y). This means that the value of the integral above is π/2√AGM(x, y). Because the iteration leading to the AGM converges quickly, this provides an efficient numerical algorithm for computing the integral at the top of the post.
This is something I’ve written about several times, though in less concrete terms. See, for example, here. Using more advanced terminology, the AGM gives an efficient way to evaluate elliptic integrals.
Related posts
[1] B. C. Carlson, Invariance of an Integral Average of a Logarithm. The American Mathematical Monthly, Vol. 82, No. 4 (April 1975), pp. 379–382.
The post An integral theorem of Gauss first appeared on John D. Cook.