400px|thumb|right|Plot of the arithmetic–geometric mean \operatorname{agm}(1,x) (in dark blue)
In mathematics, the arithmetic–geometric mean of two positive real numbers  and  is defined as follows:
Call  and   and : \begin{align}  a_0 &= x,\\  g_0 &= y.
\end{align}
Then define the two interdependent sequences  and  as
\begin{align}  a_{n+1} &= \tfrac12(a_n + g_n),\\  g_{n+1} &= \sqrt{a_n g_n}\, .
\end{align}
These two sequences converge to the same number, the arithmetic–geometric mean of  and ; it is denoted by , or sometimes by  or .
The arithmetic–geometric mean is used in fast algorithms for exponential and trigonometric functions, as well as some mathematical constants, in particular, computing .
Example
To find the arithmetic–geometric mean of  and , iterate as follows:
\begin{array}{rcccl}  a_1 & = & \tfrac12(24 + 6) & = & 15\\  g_1 & = & \sqrt{24 \cdot 6} & = & 12\\  a_2 & = & \tfrac12(15 + 12) & = & 13.5\\  g_2 & = & \sqrt{15 \cdot 12} & = & 13.416\ 407\ 8649\dots\\  & & \vdots & & \end{array}
The first five iterations give the following values:
The number of digits in which  and  agree (underlined) approximately doubles with each iteration.
The arithmetic–geometric mean of 24 and 6 is the common limit of these two sequences, which is approximately .agm(24, 6) at Wolfram Alpha History
The first algorithm based on this sequence pair appeared in the works of Lagrange.
Its properties were further analyzed by Gauss.
first published in L'Enseignement Mathématique, t.
30 (1984), p. 275-330 Properties
The geometric mean of two positive numbers is never bigger than the arithmetic mean (see inequality of arithmetic and geometric means).
As a consequence, for ,  is an increasing sequence,  is a decreasing sequence, and .
These are strict inequalities if .
is thus a number between the geometric and arithmetic mean of  and ; it is also between  and .
If , then .
There is an integral-form expression for :
\begin{align}  M(x,y) &= \frac{\pi}{2} \left( \int_0^\frac{\pi}{2}\frac{d\theta}{\sqrt{x^2\cos^2\theta+y^2\sin^2\theta}} \right)^{-1}\\ &=\pi\left(\int_0^\infty \frac{dt}{\sqrt{t(t+x^2)(t+y^2)}}\right)^{-1}\\         &= \frac{\pi}{4} \cdot \frac{x + y}{K\left( \frac{x - y}{x + y} \right)} \end{align}
where  is the complete elliptic integral of the first kind:
K(k) = \int_0^\frac{\pi}{2}\frac{d\theta}{\sqrt{1 - k^2\sin^2(\theta)}}
Indeed, since the arithmetic–geometric process converges so quickly, it provides an efficient way to compute elliptic integrals via this formula.
In engineering, it is used for instance in elliptic filter design.
The arithmetic–geometric mean is connected to the Jacobi theta function \theta_3 by pages 35, 40
M(1,x)=\theta_3^{-2}\left(\exp \left(-\pi \frac{M(1,x)}{M\left(1,\sqrt{1-x^2}\right)}\right)\right)=\left(\sum_{n\in\mathbb{Z}}\exp \left(-n^2 \pi \frac{M(1,x)}{M\left(1,\sqrt{1-x^2}\right)}\right)\right)^{-2},
which upon setting x=1/\sqrt{2} gives
M(1,1/\sqrt{2})=\left(\sum_{n\in\mathbb{Z}}e^{-n^2\pi}\right)^{-2}.
Related concepts
The reciprocal of the arithmetic–geometric mean of 1 and the square root of 2 is called Gauss's constant, after Carl Friedrich Gauss.
\frac{1}{M(1, \sqrt{2})} = G = 0.8346268\dots
In 1941, M(1,\sqrt{2}) (and hence G) was proven transcendental by Theodor Schneider.In particular, he proved that the beta function \Beta (a,b) is transcendental for all a,b\in\mathbb{Q}\setminus\mathbb{Z} such that a+b\notin \mathbb{Z}_0^-.
The fact that M(1,\sqrt{2}) is transcendental follows from M(1,\sqrt{2})=\tfrac{1}{2}\Beta \left(\tfrac{1}{2},\tfrac{3}{4}\right).
The geometric–harmonic mean can be calculated by an analogous method, using sequences of geometric and harmonic means.
One finds that .
The arithmetic–harmonic mean can be similarly defined, but takes the same value as the geometric mean (see section "Calculation" there).
The arithmetic–geometric mean can be used to compute – among others – logarithms,  complete and incomplete elliptic integrals of the first and second kind, and Jacobi elliptic functions.
Proof of existence
From the inequality of arithmetic and geometric means we can conclude that:
g_n \leq a_n
and thus
g_{n + 1} = \sqrt{g_n \cdot a_n} \geq \sqrt{g_n \cdot g_n} = g_n
that is, the sequence  is nondecreasing.
Furthermore, it is easy to see that it is also bounded above by the larger of  and  (which follows from the fact that both the arithmetic and geometric means of two numbers lie between them).
Thus, by the monotone convergence theorem, the sequence is convergent, so there exists a  such that:
\lim_{n\to \infty}g_n = g
However, we can also see that:
a_n = \frac{g_{n + 1}^2}{g_n}
and so:
\lim_{n\to \infty}a_n = \lim_{n\to \infty}\frac{g_{n + 1}^2}{g_{n}} = \frac{g^2}{g} = g
Q.E.D.
Proof of the integral-form expression
This proof is given by Gauss.
Let
I(x,y) = \int_0^{\pi/2}\frac{d\theta}{\sqrt{x^2\cos^2\theta+y^2\sin^2\theta}} ,
Changing the variable of integration to \theta', where
\sin\theta = \frac{2x\sin\theta'}{(x+y)+(x-y)\sin^2\theta'} ,
gives
\begin{align} I(x,y) &= \int_0^{\pi/2}\frac{d\theta'}{\sqrt{\bigl(\frac12(x+y)\bigr)^2\cos^2\theta'+\bigl(\sqrt{xy}\bigr)^2\sin^2\theta'}}\\        &= I\bigl(\tfrac12(x+y),\sqrt{xy}\bigr) .
\end{align}
Thus, we have
\begin{align} I(x,y) &= I(a_1, g_1) = I(a_2, g_2) = \cdots\\   &= I\bigl(M(x,y),M(x,y)\bigr) = \pi/\bigr(2M(x,y)\bigl) .
\end{align}
The last equality comes from observing that I(z,z) = \pi/(2z).
Finally, we obtain the desired result
M(x,y) = \pi/\bigl(2 I(x,y) \bigr) .
Applications
The number ''π''
For example, according to the Gauss–Legendre algorithm:
\pi = \frac{4\,M(1,1/\sqrt{2})^2} {1 - \sum_{j=1}^\infty 2^{j+1} c_j^2} ,
where
c_j = \frac{1}{2}\left(a_{j-1}-g_{j-1}\right) ,
with a_0=1 and g_0=1/\sqrt{2}, which can be computed without loss of precision using
c_j = \frac{c_{j-1}^2}{4a_j} .
Complete elliptic integral ''K''(sin''α'')
Taking a_0 = 1 and g_0 = \cos\alpha yields the AGM
M(1,\cos\alpha) = \frac{\pi}{2K(\sin \alpha)} ,
where  is a complete elliptic integral of the first kind:
K(k) = \int_0^{\pi/2}(1 - k^2 \sin^2\theta)^{-1/2} \, d\theta.
That is to say that this quarter period may be efficiently computed through the AGM, K(k) =  \frac{\pi}{2M(1,\sqrt{1-k^2})} .
Other applications
Using this property of the AGM along with the ascending transformations of John Landen, Richard P. Brent suggested the first AGM algorithms for the fast evaluation of elementary transcendental functions (, , ).
Subsequently, many authors went on to study the use of the AGM algorithms.
See also
Generalized mean
Gauss–Legendre algorithm
References
Notes
Other
