# Talk:Arithmetic–geometric mean

WikiProject Mathematics (Rated C-class, Mid-importance)
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
 C Class
 Mid Importance
Field: Analysis
WikiProject Statistics (Rated C-class, Low-importance)

This article is within the scope of the WikiProject Statistics, a collaborative effort to improve the coverage of statistics on Wikipedia. If you would like to participate, please visit the project page or join the discussion.

C  This article has been rated as C-Class on the quality scale.
Low  This article has been rated as Low-importance on the importance scale.

## Untitled

What is the arithmetic-geometric mean of 1 and 2? AxelBoldt

To answer this, I added a Scheme implementation of the algorithm. (agmean 1 2 .000000001) => 1.4567910310469068 -- Damian Yerrick

Here is an alternative implementation in Scheme that is conceptually similar but is simpler (I checked this in Guile and it works):

(define (agm a b epsilon)
;; Determine if two numbers are already very close together
(define (ratio-diff a b) (abs (/ (- a b) b)))
;; Actually do the computation
(define (loop a b)
;; If they're already really close together, just return the arithmetic mean
(if (< (ratio-diff a b) epsilon)
(/ (+ a b) 2)
(loop (sqrt (* a b)) (/ (+ a b) 2)))) ; otherwise, do another step
;; Error checking

(if (or (not (real? a))
(not (real? b))
(<= a 0)
(<= b 0))
(error 'agm "~s and ~s must both be positive real numbers" a b)
(loop a b)))


## What's it used for?

It's easy enough to find a use for an arithmetic mean, and a use for a geometric mean, but when do you use an arithmetic-geometric mean? — Daniel 20:52, 1 July 2007 (UTC)

I am personally not familiar with any application of the agm as is (and I guess I would be if there was anything very important). It seems to me like more of a mathematical trivia (there is nothing bad with that, of course). However, it is equivalent to a certain elliptic integral, which itself is useful in evaluating some integrals. -- Meni Rosenfeld (talk) 09:11, 2 July 2007 (UTC)
It is a remarkable computing method. The Springer OEM article is considerably more helpful than ours, and some of its most important sources, like Abramowitz & Stegun, are available online. --KSmrqT 10:49, 2 July 2007 (UTC)
It converges quadratically and inspired the fastest known method for computing the digits of π. I've added the Borwein – Borwein book to the list of references. Arcfrk 06:16, 22 July 2007 (UTC)

I've added an engineering application. Tijfo098 (talk) 03:16, 19 September 2012 (UTC)

## Generalization

Doesn't the AGM property hold for any (finite?) set of numbers? Not just two, as represented in the article?Akshayaj 20:20, 2 July 2007 (UTC)

What do you mean by "the AGM property"? If you mean the inequality of arithmetic and geometric means (which AFAIK is only loosely related to the topic of this article), then yes, the arithmetic mean of any set of positive numbers is at least their geometric mean (and equal iff all numbers are the same). -- Meni Rosenfeld (talk) 21:11, 2 July 2007 (UTC)
So, does this mean there ought to be some generalization of the AGM to more than 2 arguments? Would one simply take a_1 and g_1 as the normal means of an arbitrary list of real numbers and then proceed as for two arguments? Nosuchforever (talk) 21:06, 2 April 2012 (UTC)

## Source code listings?

I found source code implementations in three languages on this page. Having three variations does not give encyclopedic value, and I personally hardly find much value in having an implementation at all on the page (after all, the defining equation is in there already, and is for practical purposes identical to the source code). Therefore, I was bold and removed all three of them (instead of choosing one to keep).

The source codes in question are stored in the previous version: http://en.wikipedia.org/w/index.php?title=Arithmetic-geometric_mean&oldid=289728680

Remember, Wikipedia is not a source code repository, WP:NOT. --Berland (talk) 13:20, 14 May 2009 (UTC)

## New long proof section

The new long proof section by Shlav seems to be not very useful, as encyclopedic content goes. Do we really need it? If we do, can we at least cite a source so we can verify it? Dicklyon (talk) 04:03, 4 June 2012 (UTC)

There are many mathematical proofs inside the Wikipedia so I think there is no problem to keep this one. I'll add reference to the source of the proof. Shlav(talk)

I vote for removing the proof -- while I think it's important to have proofs widely available, I think formal proofs are not appropriate for wikipedia in general, and this one in particular doesn't add much value.146.186.131.40 (talk) 13:37, 17 August 2012 (UTC)

I agree that the lengthy proof has minimal encyclopedic value and should be removed, it would be appropriate for a monograph rather than Wikipedia.—Emil J. 13:56, 20 November 2012 (UTC)

I agree, this proof is overdone. What people need are more identities and here's a couple I derived but since I am not of the class that gets recognition, someone else will need to independently come up with them (or they exist already but there are so few good sources so that is why I made a "blog" page that goes into some of this) so they may get posted on wiki for massive consumption:

AGM(1,sqrt(1-x))=AGM(1-sqrt(x),1+sqrt(x)) AGM(1,z)=AGM(2/(1+z),2z/(1+z))/(2/(1+z)) Numbertruth (talk) 08:22, 22 December 2012 (UTC)

Numbertruth's identities for the AGM are easily derived. Applying one round of AGM to AGM(1-sqrt(x), 1+sqrt(x)) gives AGM(1, sqrt(1-x)). The second is just an application of the scaling rule AGM(rx, ry) = r AGM(x, y). I recommend against including these in the article. cffk (talk) 12:02, 17 July 2013 (UTC)

I replaced the long proof with a much shorter (and clearer!) one. cffk (talk) 18:37, 15 July 2013 (UTC)

## AGM method

Does anyone think there needs a separate article for the "AGM method"? It overlaps substantially with the contents of this one. Arguably, that one is slightly better written. Tijfo098 (talk) 03:21, 19 September 2012 (UTC)

I recommend combining these articles. cffk (talk) 19:59, 15 July 2013 (UTC)
I think they should be combined too. Bubba73 You talkin' to me? 02:53, 11 October 2013 (UTC)
I think they should be merged but possibly with "AGM method" as the title. The AGM (not method) article does not provide any motivation, context or history and as far as I know the AGM method is the reason why the AGM was defined, but I could be wrong on that. MATThematical (talk) 06:41, 6 April 2014 (UTC)