{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $f \\colon [x_0, x_2] \\to \\R$ be continuous with $f(x_0) f(x_2) \u003c 0$, and let $x_1 = (x_0 + x_2)/2$.\n*Ridders' method* computes\n$$x_3 = x_1 + (x_1 - x_0) \\, \\frac{\\sgn\\big(f(x_0) - f(x_2)\\big) \\, f(x_1)}{\\sqrt{f(x_1)^2 - f(x_0) f(x_2)}}.$$\nThen the following hold.\n\n1. The square root is real and positive, and $x_3$ lies in the open interval $(x_0, x_2)$.\n2. If $f(x_1) = 0$, then $x_3 = x_1$.\n3. If $f(x_3) \\ne 0$, then $f$ changes sign between $x_3$ and some point of $\\set{x_0, x_1, x_2}$. The method keeps the shortest such interval as the next bracket.\n\n## Remarks\n\nClaim 1: since $f(x_0) f(x_2) \u003c 0$, the radicand is larger than $f(x_1)^2$, so the fraction has absolute value less than $1$ and $\\abs{x_3 - x_1} \u003c x_1 - x_0$.\nClaim 3: $f(x_3)$ has the sign opposite to $f(x_0)$ or to $f(x_2)$, unless it is $0$.\nSo the bracket shrinks at each step and a zero stays inside it, by the [[intermediate value theorem|00KAFBR32E]].\nThe formula comes from a trick: choose $Q$ so that the three points of $h(x) = f(x) e^{Qx}$ at $x_0, x_1, x_2$ lie on a line, then apply [[regula falsi|462AEY7MWF]] to $h$.\nFor $f(x) = x - c$ on $[0, 2]$ with $0 \u003c c \u003c 2$, the radicand is $1$ and the formula gives $x_3 = c$ at once.\nFor a smooth $f$ with a simple zero, the [[convergence|YWZQC5E54B]] is quadratic per step, and each step costs two evaluations of $f$.\n\n## Explanations\n\n### L1 human\n\nRidders' method starts like bisection by evaluating $f$ at the midpoint.\nThen it bends the function by an exponential factor so that the three values fall on a straight line, and it takes the zero of that line.\nThe new point always stays inside the current interval, so the root is never lost.\n\n### L2 human\n\nThe method is as safe as bisection but usually much faster.\nIt needs no derivatives, and it is a simple alternative to Brent's method when a bracket is known.\nIts cost is two function values per step, so its order per function evaluation is $\\sqrt{2}$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "TR4CNS5PMJ"
    ],
    "kind": "statement",
    "msc": [
      "65H05"
    ],
    "name": "Ridders' method",
    "role": "proposition",
    "same_as": {
      "wikidata": "Q1864934",
      "wikipedia": "Ridders' method"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Ridders%27_method"
      }
    ],
    "tag": "VM1C9D8MX9",
    "uses": [
      "00KAFBR32E",
      "462AEY7MWF",
      "YWZQC5E54B"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/VM1C9D8MX9/",
  "links": [
    {
      "field": "about",
      "target": "TR4CNS5PMJ"
    },
    {
      "field": "uses",
      "target": "00KAFBR32E"
    },
    {
      "field": "uses",
      "target": "462AEY7MWF"
    },
    {
      "field": "uses",
      "target": "YWZQC5E54B"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/VM1C9D8MX9.md",
  "msc": [
    "65H05"
  ],
  "name": "Ridders' method",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/VM1/VM1C9D8MX9.md",
  "status": null,
  "tag": "VM1C9D8MX9",
  "uri": "m2://VM1C9D8MX9",
  "url": "https://tamnd.github.io/math2/wiki/ridders-method/",
  "writing": {
    "tag": "VM1C9D8MX9",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
