An integral theorem of Gauss
Gauss proved in 1818 that the value of integral
is unchanged ifx andy are replaced by (x +y)/2 and (xy), i.e. if you replacedx andy 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^2 and cos^2 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 withx = 3 andy = 7. Then we hadx = 5 andy = 21 = 4.5826. If we compute the arithmetic and geometric means again, we getx = 4.7913 andy = 4.7874. If we do this one more time we getx =y = 4.789013. The values ofx andy still differ, but only after the sixth decimal place.
It would seem that if we keep replacing x andy by their arithmetic and geometric means, we will converge to a constant. And indeed we do. This constant is called the arithmetic-geometric mean ofx andy, 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.