In Gauss's formulation, the value of the integral :I = \int_0^{\frac{\pi}{2}}\frac{1}{\sqrt{a^2 \cos^2(\theta) + b^2 \sin^2(\theta)}} \, d \theta is unchanged if a and b are replaced by their
arithmetic and
geometric means respectively, that is :a_1 = \frac{a + b}{2},\qquad b_1 = \sqrt{a b}, :I_1 = \int _0^{\frac{\pi}{2}}\frac{1}{\sqrt{a_1^2 \cos^2(\theta) + b_1^2 \sin^2(\theta)}} \, d \theta. Therefore, :I=\frac{1}{a}K\left(\frac{\sqrt{a^2 - b^2}}{a}\right), :I_1=\frac{2}{a+b}K\left(\frac{a-b}{a+b}\right). From Landen's transformation we conclude :K\left(\frac{\sqrt{a^2 - b^2}}{a}\right)=\frac{2a}{a+b}K\left(\frac{a-b}{a+b}\right) and I_1=I.
Proof The transformation may be effected by
integration by substitution. It is convenient to first cast the integral in an
algebraic form by a substitution of \theta = \arctan (x/b), d \theta = (\cos^{2}(\theta)/b) d x giving :I = \int _0^{\frac{\pi}{2}}\frac{1}{\sqrt{a^2 \cos^2(\theta) + b^2 \sin^2(\theta)}} \, d \theta = \int _0^\infty \frac{1}{\sqrt{(x^2 + a^2) (x^2 + b^2)}} \, dx A further substitution of x = t + \sqrt{t^{2} + a b} gives the desired result :\begin{align}I & = \int _0^\infty \frac{1}{\sqrt{(x^2 + a^2) (x^2 + b^2)}} \, dx \\ & = \int _{- \infty}^\infty \frac{1}{2 \sqrt{\left( t^2 + \left( \frac{a + b}{2}\right)^2 \right) (t^2 + a b)}} \, dt \\ & = \int _0^\infty\frac{1}{\sqrt{\left( t^2 + \left( \frac{a + b}{2}\right)^2\right) \left(t^2 + \left(\sqrt{a b}\right)^2\right)}} \, dt \end{align} This latter step is facilitated by writing the radical as :\sqrt{(x^2 + a^2) (x^2 + b^2)} = 2x \sqrt{t^2 + \left( \frac{a + b}{2}\right)^2} and the infinitesimal as : dx = \frac{x}{\sqrt{t^2 + a b}} \, dt so that the factor of x is recognized and cancelled between the two factors. To prove \left(x^2+a^2\right)\left(x^2+b^2\right) = 4\,x^2\left( t^2+\left( \frac{a+b}{2} \right)^2 \right) we write x=t+r with r=\sqrt{t^2+ab}. We also write \bar{x}=t-r. Then x^2\bar{x}^2 = a^2b^2 since x\bar{x} = t^2-r^2 = -ab, and x^2+\bar{x}^2 = 2\,\left(t^2+r^2\right) = 4\,t^2+2ab. Then \begin{aligned}\left(x^2+a^2\right)\left(x^2+b^2\right) &= x^2\left(x^2+a^2+b^2+\frac{a^2b^2}{x^2} \right)\\ &= x^2\left(x^2+\bar{x}^2+a^2+b^2\right)\\ &= x^2\left(4\,t^2+2ab+a^2+b^2\right)\\ &= 4\,x^2\left( t^2+\left( \frac{a+b}{2} \right)^2 \right)\end{aligned}
Arithmetic-geometric mean and Legendre's first integral If the transformation is iterated a number of times, then the parameters a and b converge very rapidly to a common value, even if they are initially of different orders of magnitude. The limiting value is called the
arithmetic-geometric mean of a and b, \operatorname{AGM}(a,b). In the limit, the integrand becomes a constant, so that integration is trivial :I = \int _0^{\frac{\pi}{2}} \frac{1}{\sqrt{a^2 \cos^2(\theta) + b^2 \sin^2(\theta)}} \, d\theta = \int _0^{\frac{\pi}{2}}\frac{1}{\operatorname{AGM}(a,b)} \, d\theta = \frac{\pi}{2 \operatorname{AGM}(a,b)} The integral may also be recognized as a multiple of
Legendre's complete elliptic integral of the first kind. Putting b^2 = a^2 (1 - k^2) :I = \frac{1}{a} \int _0^{\frac{\pi}{2}} \frac{1}{\sqrt{1 - k^2 \sin^2(\theta)}} \, d\theta = \frac{1}{a} F\left( \frac{\pi}{2},k\right) = \frac{1}{a} K(k) Hence, for any a, the arithmetic-geometric mean and the complete elliptic integral of the first kind are related by :K(k) = \frac{\pi }{2 \operatorname{AGM}(1, \sqrt{1 - k^2})} By performing an inverse transformation (reverse arithmetic-geometric mean iteration), that is :a_{-1} = a + \sqrt{a^2 - b^2} \, :b_{-1} = a - \sqrt{a^2 - b^2} \, :\operatorname{AGM}(a,b) = \operatorname{AGM}\left(a + \sqrt{a^2 - b^2},a - \sqrt{a^2 - b^2}\right) \, the relationship may be written as :K(k) = \frac{\pi}{2 \operatorname{AGM}(1 + k, 1 - k)} \, which may be solved for the AGM of a pair of arbitrary arguments; : \operatorname{AGM}(u,v) = \frac{\pi (u + v)}{4 K\left( \frac{u - v}{v + u}\right)}. ==References==