{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $a, b \u003e 0$.\nDefine sequences by $a_0 = a$, $b_0 = b$ and\n$$a_{n+1} = \\frac{a_n + b_n}{2}, \\qquad b_{n+1} = \\sqrt{a_n b_n}.$$\nThen:\n\n1. Both sequences [[converge|05M5SWSZZD]] to the same limit $M(a, b) \u003e 0$, the *arithmetic–geometric mean* of $a$ and $b$.\n2. $$\\int_0^{\\pi/2} \\frac{d\\theta}{\\sqrt{a^2\\cos^2\\theta + b^2\\sin^2\\theta}} = \\frac{\\pi}{2 M(a, b)}.$$\n3. For $0 \\le k \u003c 1$ and $k' = \\sqrt{1 - k^2}$, the [[complete elliptic integral of the first kind|RM54CPPE12]] satisfies $K(k) = \\dfrac{\\pi}{2 M(1, k')}$.\n\n## Remarks\n\nProof idea: by the [[inequality of arithmetic and geometric means|0DRF0F3XC9]], $b_n \\le b_{n+1} \\le a_{n+1} \\le a_n$ for $n \\ge 1$, so both sequences are monotone and bounded.\nSince $b_{n+1} \\ge b_n$, one gets $a_{n+1} - b_{n+1} \\le a_{n+1} - b_n = (a_n - b_n)/2$, so the difference tends to $0$ and the two limits agree.\nFor part 2, call the integral $I(a, b)$; a change of variables found by Gauss shows that $I(a, b) = I(a_1, b_1)$.\nHence $I(a, b) = I(a_n, b_n)$ for all $n$, and letting $n \\to \\infty$ gives $I(M, M) = \\pi / (2M)$.\nPart 3 is part 2 with $a = 1$ and $b = k'$, since $\\cos^2\\theta + k'^2\\sin^2\\theta = 1 - k^2\\sin^2\\theta$.\n\nExample: $M(1, \\sqrt2) \\approx 1.19814$, and $1/M(1, \\sqrt 2)$ is Gauss's constant, equal to $\\varpi/\\pi$ where $\\varpi$ is the [[lemniscate constant|V5A2S8QYQQ]].\n\n## Explanations\n\n### L1 human\n\nStart with two positive numbers, and replace them by their average and their geometric mean, again and again.\nThe two numbers squeeze together very fast, and their common limit is the arithmetic–geometric mean.\nThe surprise is that this simple process computes an elliptic integral, which has no elementary formula.\n\n### L2 human\n\nThe convergence is quadratic: once $a_n$ and $b_n$ are close, the number of correct digits roughly doubles at each step, because $a_{n+1} - b_{n+1} = (\\sqrt{a_n} - \\sqrt{b_n})^2/2$.\nThis makes the formula $K(k) = \\pi/(2M(1, k'))$ the standard way to evaluate $K$ numerically.\nIts invariance step $I(a, b) = I(a_1, b_1)$ is a form of [[Landen's transformation|A0V7ZAEQBW]].\nCombined with [[Legendre's relation|8GSKDNZ4TK]] it gives the Gauss–Legendre algorithm for $\\pi$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "RM54CPPE12"
    ],
    "kind": "statement",
    "msc": [
      "33E05",
      "26E60",
      "65D20"
    ],
    "name": "Arithmetic–geometric mean and elliptic integrals",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Arithmetic%E2%80%93geometric_mean"
      }
    ],
    "tag": "E0V3N93DX8",
    "uses": [
      "0DRF0F3XC9",
      "05M5SWSZZD",
      "RM54CPPE12"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/E0V3N93DX8/",
  "links": [
    {
      "field": "about",
      "target": "RM54CPPE12"
    },
    {
      "field": "uses",
      "target": "0DRF0F3XC9"
    },
    {
      "field": "uses",
      "target": "05M5SWSZZD"
    },
    {
      "field": "uses",
      "target": "RM54CPPE12"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/E0V3N93DX8.md",
  "msc": [
    "33E05",
    "26E60",
    "65D20"
  ],
  "name": "Arithmetic–geometric mean and elliptic integrals",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/E0V/E0V3N93DX8.md",
  "status": null,
  "tag": "E0V3N93DX8",
  "uri": "m2://E0V3N93DX8",
  "url": "https://tamnd.github.io/math2/wiki/arithmetic-geometric-mean-and-elliptic-integrals/",
  "writing": {
    "tag": "E0V3N93DX8",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
