- Arithmetic-geometric mean
In
mathematics , the arithmetic-geometric mean (AGM) of two positivereal number s "x" and "y" is defined as follows:First compute the
arithmetic mean of "x" and "y" and call it "a"1. Next compute thegeometric mean of "x" and "y" and call it "g"1; this is thesquare root of the product "xy"::
:
Then iterate this operation with "a"1 taking the place of "x" and "g"1 taking the place of "y". In this way, two
sequence s ("a""n") and ("g""n") are defined::
:
These two sequences converge to the same number, which is the arithmetic-geometric mean of "x" and "y"; it is denoted by M("x", "y"), or sometimes by agm("x", "y").
Example
To find the arithmetic-geometric mean of "a"0 = 24 and "g"0 = 6, first calculate their arithmetic mean and geometric mean, thus:
:
:
and then iterate as follows:
:
: etc.
The first four iterations give the following values:
:
The arithmetic-geometric mean of 24 and 6 is the common limit of these two sequences, which is approximately 13.45817148173.
Properties
M("x", "y") is a number between the geometric and arithmetic mean of "x" and "y"; in particular it is between "x" and "y".
If "r" > 0, then M("rx", "ry") = "r" M("x", "y").
There is a closed form expression for M("x","y"):
:
where "K"("x") is the "complete
elliptic integral of the first kind".The reciprocal of the arithmetic-geometric mean of 1 and the
square root of 2 is calledGauss's constant .:
named after
Carl Friedrich Gauss .The
geometric-harmonic mean can be calculated by an analogous method, using sequences of geometric and harmonic means. Thearithmetic-harmonic mean can be similarly defined, but takes the same value as the geometric mean.Implementation in Python
The following example code in Python computes the arithmetic-geometric mean of two positive real numbers:
from math import sqrtdef avg(a, b, delta=None): if None=delta: delta=(a+b)/2*1E-10 if(abs(b-a)>delta): return avg((a+b)/2.0, sqrt(a*b), delta) else: return (a+b)/2.0
ee also
*
Inequality of arithmetic and geometric means References
*
Jonathan Borwein ,Peter Borwein , "Pi and the AGM. A study in analytic number theory and computational complexity." Reprint of the 1987 original. Canadian Mathematical Society Series of Monographs and Advanced Texts, 4. A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1998. xvi+414 pp. ISBN 0-471-31515-X MathSciNet|id=1641658
*SpringerEOM|author=M. Hazewinkel|title=Arithmetic-geometric mean process|urlname=a/a130280
*mathworld|urlname=Arithmetic-GeometricMean|title=Arithmetic-Geometric mean
Wikimedia Foundation. 2010.