Talk:Arithmetic-geometric mean

From Wikipedia, the free encyclopedia

WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, which collaborates on articles related to mathematics.
Mathematics rating: Start Class Mid Priority  Field: Analysis

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)))

[edit] 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)

[edit] 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)