Fungrim home page

Arithmetic-geometric mean

Table of contents: Definitions - Illustrations - Single parameter - Domain - Specific values - AGM iteration - Brent-Salamin algorithm for pi - Functional equations - Representation by other functions - Representation of other functions - Derivatives and differential equations - Series expansions - Integral representations - Bounds and inequalities

Definitions

b0d256
Symbol: AGM agm ⁣(a,b)\operatorname{agm}\!\left(a, b\right) Arithmetic-geometric mean
eda1e3
Symbol: AGMSequence agmn ⁣(a,b)\operatorname{agm}_{n}\!\left(a, b\right) Convergents in AGM iteration

Illustrations

00d5df
Image: Plot of agm ⁣(1,x)\operatorname{agm}\!\left(1, x\right) on x[2,2]x \in \left[-2, 2\right]
c941c4
Image: X-ray of agm ⁣(1,z)\operatorname{agm}\!\left(1, z\right) on z[4,4]+[4,4]iz \in \left[-4, 4\right] + \left[-4, 4\right] i

Single parameter

21f412
agm(z)=agm ⁣(1,z)=agm ⁣(z,1)\operatorname{agm}(z) = \operatorname{agm}\!\left(1, z\right) = \operatorname{agm}\!\left(z, 1\right)

Domain

32b3b4
(aC  and  bC)        agm ⁣(a,b)C\left(a \in \mathbb{C} \;\mathbin{\operatorname{and}}\; b \in \mathbb{C}\right) \;\implies\; \operatorname{agm}\!\left(a, b\right) \in \mathbb{C}
c38209
(a[0,)  and  b[0,))        agm ⁣(a,b)[0,)\left(a \in \left[0, \infty\right) \;\mathbin{\operatorname{and}}\; b \in \left[0, \infty\right)\right) \;\implies\; \operatorname{agm}\!\left(a, b\right) \in \left[0, \infty\right)
f9caac
xC        agm(x)Cx \in \mathbb{C} \;\implies\; \operatorname{agm}(x) \in \mathbb{C}
098757
x[0,)        agm(x)[0,)x \in \left[0, \infty\right) \;\implies\; \operatorname{agm}(x) \in \left[0, \infty\right)

Specific values

08329d
agm ⁣(0,b)=0\operatorname{agm}\!\left(0, b\right) = 0
8f176c
agm ⁣(a,0)=0\operatorname{agm}\!\left(a, 0\right) = 0
3e1398
agm ⁣(a,a)=0\operatorname{agm}\!\left(a, -a\right) = 0
b41bdd
agm ⁣(a,a)=a\operatorname{agm}\!\left(a, a\right) = a
0d9352
agm ⁣(1,2)=22π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, \sqrt{2}\right) = \frac{2 \sqrt{2} {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
e3896e
agm ⁣(1,22)=2π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, \frac{\sqrt{2}}{2}\right) = \frac{2 {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
361801
agm ⁣(1,3+22)=2(2+2)π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, 3 + 2 \sqrt{2}\right) = \frac{2 \left(2 + \sqrt{2}\right) {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
f9190b
agm ⁣(1,322)=2(22)π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, 3 - 2 \sqrt{2}\right) = \frac{2 \left(2 - \sqrt{2}\right) {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
69d0a3
agm ⁣(1,i)=2(1+i)π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, i\right) = \frac{\sqrt{2} \left(1 + i\right) {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
5174ea
agm ⁣(1,i)=2(1i)π3/2(Γ ⁣(14))2\operatorname{agm}\!\left(1, -i\right) = \frac{\sqrt{2} \left(1 - i\right) {\pi}^{3 / 2}}{{\left(\Gamma\!\left(\frac{1}{4}\right)\right)}^{2}}
7b362f
agm ⁣(1,2)=1θ42 ⁣(0,i)\operatorname{agm}\!\left(1, \sqrt{2}\right) = \frac{1}{\theta_{4}^{2}\!\left(0, i\right)}
eb0661
agm ⁣(1,1)=1\operatorname{agm}\!\left(1, 1\right) = 1
3da9b7
[ddxagm ⁣(1,x)]x=1=12\left[ \frac{d}{d x}\, \operatorname{agm}\!\left(1, x\right) \right]_{x = 1} = \frac{1}{2}
f178f2
[d2dx2agm ⁣(1,x)]x=1=18\left[ \frac{d^{2}}{{d x}^{2}} \operatorname{agm}\!\left(1, x\right) \right]_{x = 1} = -\frac{1}{8}
447541
[dndxnagm ⁣(1,x)]x=1=(1)nn!8nA060691 ⁣(n)\left[ \frac{d^{n}}{{d x}^{n}} \operatorname{agm}\!\left(1, x\right) \right]_{x = 1} = \frac{{\left(-1\right)}^{n} n !}{{8}^{n}} \text{A060691}\!\left(n\right)

AGM iteration

Recurrence and limit

95fb3e
agm ⁣(a,b)=limnan=limnbn   where (an,bn)=agmn ⁣(a,b)\operatorname{agm}\!\left(a, b\right) = \lim_{n \to \infty} a_{n} = \lim_{n \to \infty} b_{n}\; \text{ where } \left(a_{n}, b_{n}\right) = \operatorname{agm}_{n}\!\left(a, b\right)
84b888
agm0 ⁣(a,b)=(a,b)\operatorname{agm}_{0}\!\left(a, b\right) = \left(a, b\right)
08b69d
(an+1,bn+1)=(an+bn2,anbn)   where (ak,bk)=agmk ⁣(a,b)\left(a_{n + 1}, b_{n + 1}\right) = \left(\frac{a_{n} + b_{n}}{2}, \sqrt{a_{n} b_{n}}\right)\; \text{ where } \left(a_{k}, b_{k}\right) = \operatorname{agm}_{k}\!\left(a, b\right)
41f67b
2an+1=an+bn  and  bn+12=anbn   where (ak,bk)=agmk ⁣(a,b)2 a_{n + 1} = a_{n} + b_{n} \;\mathbin{\operatorname{and}}\; b_{n + 1}^{2} = a_{n} b_{n}\; \text{ where } \left(a_{k}, b_{k}\right) = \operatorname{agm}_{k}\!\left(a, b\right)

Correct square root for complex variables

a2b0f9
(an+1,bn+1)=(x,sy)   where x=an+bn2,  y=anbn,  s={+1,y=0  or  Re ⁣(xy)01,otherwise   where (ak,bk)=agmk ⁣(a,b)\left(a_{n + 1}, b_{n + 1}\right) = \left(x, s y\right)\; \text{ where } x = \frac{a_{n} + b_{n}}{2},\;y = \sqrt{a_{n} b_{n}},\;s = \begin{cases} +1, & y = 0 \;\mathbin{\operatorname{or}}\; \operatorname{Re}\!\left(\frac{x}{y}\right) \ge 0\\-1, & \text{otherwise}\\ \end{cases}\; \text{ where } \left(a_{k}, b_{k}\right) = \operatorname{agm}_{k}\!\left(a, b\right)

Brent-Salamin algorithm for pi

6d9ceb
π=4(agm ⁣(1,12))21j=02jcj2=limn(an+bn)21j=0n2jcj2   where (an,bn)=agmn ⁣(1,12),  cn=anbn\pi = \frac{4 {\left(\operatorname{agm}\!\left(1, \frac{1}{\sqrt{2}}\right)\right)}^{2}}{1 - \sum_{j=0}^{\infty} {2}^{j} c_{j}^{2}} = \lim_{n \to \infty} \frac{{\left(a_{n} + b_{n}\right)}^{2}}{1 - \sum_{j=0}^{n} {2}^{j} c_{j}^{2}}\; \text{ where } \left(a_{n}, b_{n}\right) = \operatorname{agm}_{n}\!\left(1, \frac{1}{\sqrt{2}}\right),\;c_{n} = a_{n} - b_{n}
13c539
π(an+bn)21j=0n2jcj22n+8eπ2n+1   where (an,bn)=agmn ⁣(1,12),  cn=anbn\left|\pi - \frac{{\left(a_{n} + b_{n}\right)}^{2}}{1 - \sum_{j=0}^{n} {2}^{j} c_{j}^{2}}\right| \le {2}^{n + 8} {e}^{-\pi {2}^{n + 1}}\; \text{ where } \left(a_{n}, b_{n}\right) = \operatorname{agm}_{n}\!\left(1, \frac{1}{\sqrt{2}}\right),\;c_{n} = a_{n} - b_{n}
042551
eπ=32n=0(an+1an)21n   where (an,bn)=agmn ⁣(1,12){e}^{\pi} = 32 \prod_{n=0}^{\infty} {\left(\frac{a_{n + 1}}{a_{n}}\right)}^{{2}^{1 - n}}\; \text{ where } \left(a_{n}, b_{n}\right) = \operatorname{agm}_{n}\!\left(1, \frac{1}{\sqrt{2}}\right)

Functional equations

59fab1
agm ⁣(a,b)=agm ⁣(b,a)\operatorname{agm}\!\left(a, b\right) = \operatorname{agm}\!\left(b, a\right)
c0dea0
agm ⁣(a,b)=agm ⁣(a,b)\operatorname{agm}\!\left(\overline{a}, \overline{b}\right) = \overline{\operatorname{agm}\!\left(a, b\right)}
7189d6
agm ⁣(a,b)=agm ⁣(a,b)\operatorname{agm}\!\left(-a, -b\right) = -\operatorname{agm}\!\left(a, b\right)
ce2395
agm ⁣(a,b)=aagm ⁣(1,ba)\operatorname{agm}\!\left(a, b\right) = a \operatorname{agm}\!\left(1, \frac{b}{a}\right)
ea1d58
agm ⁣(a,b)=bagm ⁣(1,ab)\operatorname{agm}\!\left(a, b\right) = b \operatorname{agm}\!\left(1, \frac{a}{b}\right)
d60119
agm ⁣(ca,cb)=cagm ⁣(a,b)\operatorname{agm}\!\left(c a, c b\right) = c \operatorname{agm}\!\left(a, b\right)
c7f885
agm ⁣(a,b)=agm ⁣(a+b2,ab)\operatorname{agm}\!\left(a, b\right) = \operatorname{agm}\!\left(\frac{a + b}{2}, \sqrt{a b}\right)
fa6ff7
agm ⁣(a,b)=agm ⁣(x,sy)   where x=a+b2,  y=ab,  s={+1,y=0  or  Re ⁣(xy)01,otherwise\operatorname{agm}\!\left(a, b\right) = \operatorname{agm}\!\left(x, s y\right)\; \text{ where } x = \frac{a + b}{2},\;y = \sqrt{a b},\;s = \begin{cases} +1, & y = 0 \;\mathbin{\operatorname{or}}\; \operatorname{Re}\!\left(\frac{x}{y}\right) \ge 0\\-1, & \text{otherwise}\\ \end{cases}
8e80c6
agm ⁣(1,b)=bagm ⁣(1,1b)\operatorname{agm}\!\left(1, b\right) = b \operatorname{agm}\!\left(1, \frac{1}{b}\right)
46c021
agm ⁣(1,b)=b+12agm ⁣(1,2bb+1)\operatorname{agm}\!\left(1, b\right) = \frac{b + 1}{2} \operatorname{agm}\!\left(1, \frac{2 \sqrt{b}}{b + 1}\right)
9d84d8
agm ⁣(1+b,1b)=agm ⁣(1,1b2)\operatorname{agm}\!\left(1 + b, 1 - b\right) = \operatorname{agm}\!\left(1, \sqrt{1 - {b}^{2}}\right)

Representation by other functions

d6d836
agm ⁣(a,b)=a+b22F1 ⁣(12,12,1,(aba+b)2)\operatorname{agm}\!\left(a, b\right) = \frac{a + b}{2 \,{}_2F_1\!\left(\frac{1}{2}, \frac{1}{2}, 1, {\left(\frac{a - b}{a + b}\right)}^{2}\right)}
71a0ff
agm ⁣(a,b)=π4a+bK ⁣((aba+b)2)\operatorname{agm}\!\left(a, b\right) = \frac{\pi}{4} \frac{a + b}{K\!\left({\left(\frac{a - b}{a + b}\right)}^{2}\right)}

Representation of other functions

e15f43
K(m)=π2agm ⁣(1,1m)K(m) = \frac{\pi}{2 \operatorname{agm}\!\left(1, \sqrt{1 - m}\right)}
26fd1b
log ⁣(1q)=πagm ⁣(θ22 ⁣(0,q),θ32 ⁣(0,q))\log\!\left(\frac{1}{q}\right) = \frac{\pi}{\operatorname{agm}\!\left(\theta_{2}^{2}\!\left(0, q\right), \theta_{3}^{2}\!\left(0, q\right)\right)}

Derivatives and differential equations

20828c
ddaagm ⁣(a,b)=agm ⁣(a,b)πa(ab)(πa2agm ⁣(a,b)E ⁣((aba+b)2))\frac{d}{d a}\, \operatorname{agm}\!\left(a, b\right) = \frac{\operatorname{agm}\!\left(a, b\right)}{\pi a \left(a - b\right)} \left(\pi a - 2 \operatorname{agm}\!\left(a, b\right) E\!\left({\left(\frac{a - b}{a + b}\right)}^{2}\right)\right)
a4cc5a
2a(b2a2)(f(a))2a(f(a))2+((3a2b2)f(a)+a(a2b2)f(a))f(a)=0   where f(a)=agm ⁣(a,b)2 a \left({b}^{2} - {a}^{2}\right) {\left(f'(a)\right)}^{2} - a {\left(f(a)\right)}^{2} + \left(\left(3 {a}^{2} - {b}^{2}\right) f'(a) + a \left({a}^{2} - {b}^{2}\right) f''(a)\right) f(a) = 0\; \text{ where } f(a) = \operatorname{agm}\!\left(a, b\right)

Series expansions

cfefa9
agm ⁣(1,1+x)=n=0A060691 ⁣(n)8n(x)n\operatorname{agm}\!\left(1, 1 + x\right) = \sum_{n=0}^{\infty} \frac{\text{A060691}\!\left(n\right)}{{8}^{n}} {\left(-x\right)}^{n}

Integral representations

417619
agm ⁣(a,b)=π2I   where I=0π/21a2cos2 ⁣(x)+b2sin2 ⁣(x)dx\operatorname{agm}\!\left(a, b\right) = \frac{\pi}{2 I}\; \text{ where } I = \int_{0}^{\pi / 2} \frac{1}{\sqrt{{a}^{2} \cos^{2}\!\left(x\right) + {b}^{2} \sin^{2}\!\left(x\right)}} \, dx

Bounds and inequalities

162ecf
abagm ⁣(a,b)a+b2\sqrt{a b} \le \operatorname{agm}\!\left(a, b\right) \le \frac{a + b}{2}
23ee29
agm ⁣(a,b)agm ⁣(a,b)\left|\operatorname{agm}\!\left(a, b\right)\right| \le \left|\operatorname{agm}\!\left(\left|a\right|, \left|b\right|\right)\right|
75e692
agm ⁣(1,z)ananbn   where (an,bn)=agmn ⁣(1,z)\left|\operatorname{agm}\!\left(1, z\right) - a_{n}\right| \le \left|a_{n} - b_{n}\right|\; \text{ where } \left(a_{n}, b_{n}\right) = \operatorname{agm}_{n}\!\left(1, z\right)

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC