{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nConsider the explicit six-stage [[Butcher tableau|RH8BD7PW5F]] with two weight rows\n$$\\begin{array}{c|cccccc}\n0 \\\\\n\\frac14 \u0026 \\frac14 \\\\\n\\frac38 \u0026 \\frac{3}{32} \u0026 \\frac{9}{32} \\\\\n\\frac{12}{13} \u0026 \\frac{1932}{2197} \u0026 -\\frac{7200}{2197} \u0026 \\frac{7296}{2197} \\\\\n1 \u0026 \\frac{439}{216} \u0026 -8 \u0026 \\frac{3680}{513} \u0026 -\\frac{845}{4104} \\\\\n\\frac12 \u0026 -\\frac{8}{27} \u0026 2 \u0026 -\\frac{3544}{2565} \u0026 \\frac{1859}{4104} \u0026 -\\frac{11}{40} \\\\\n\\hline\nb^{T} \u0026 \\frac{25}{216} \u0026 0 \u0026 \\frac{1408}{2565} \u0026 \\frac{2197}{4104} \u0026 -\\frac15 \u0026 0 \\\\\n\\hat b^{T} \u0026 \\frac{16}{135} \u0026 0 \u0026 \\frac{6656}{12825} \u0026 \\frac{28561}{56430} \u0026 -\\frac{9}{50} \u0026 \\frac{2}{55}\n\\end{array}$$\nThen:\n\n1. the [[Runge–Kutta method|7DBPJKYC6C]] with weights $b$ has order $4$, and the one with weights $\\hat b$ has order $5$;\n2. both use the same six stages $K_1, \\ldots, K_6$, so a step gives $y_{n+1} = y_n + h \\sum_i b_i K_i$ and $\\hat y_{n+1} = y_n + h \\sum_i \\hat b_i K_i$ for six evaluations of $f$;\n3. the difference $\\hat y_{n+1} - y_{n+1}$ equals the [[local truncation error|T220HF0562]] of the fourth-order step up to a term $O(h^6)$, for $f$ smooth enough.\n\n## Remarks\n\nClause 1 is checked against Butcher's order conditions.\nThere are $8$ conditions for the trees with at most $4$ vertices, for $b$, and $17$ for the trees with at most $5$ vertices, for $\\hat b$.\nFor instance $\\sum b_i = \\sum \\hat b_i = 1$ and $\\sum \\hat b_i c_i^4 = \\frac15$.\nClause 3 follows from clause 1: the local errors of the two steps are $O(h^5)$ and $O(h^6)$, so their difference is the first one up to $O(h^6)$.\nThe estimate drives [[adaptive step size|6MREWBZR7R]] control: a step is accepted when the estimate is below the tolerance, and the next step is scaled by about $(\\mathrm{tol}/\\mathrm{err})^{1/5}$.\nErwin Fehlberg proposed such embedded pairs in 1969; in his original use the fourth-order value is propagated, while many codes propagate the fifth-order value.\n\n## Explanations\n\n### L1 human\n\nTo choose good step sizes, a solver must know how large its error is.\nThe Fehlberg method computes two answers of different accuracy from the same six slope evaluations.\nTheir difference estimates the error at almost no extra cost, and the step is then made longer or shorter.\n\n### L2 human\n\nThis is the classic example of an embedded Runge–Kutta pair, often called RKF45.\nIt was largely replaced in modern software by the [[Dormand–Prince method|CDMXAH4A7G]], whose coefficients are tuned to make the error of the fifth-order solution small and which reuses the last stage.\nThe idea of embedding, two weight vectors on one set of stages, is the basis of nearly all explicit adaptive ODE solvers.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "7DBPJKYC6C"
    ],
    "kind": "statement",
    "msc": [
      "65L06",
      "65L05",
      "65L50"
    ],
    "name": "Runge–Kutta–Fehlberg method",
    "role": "proposition",
    "same_as": {
      "wikidata": "Q7379856",
      "wikipedia": "Runge–Kutta–Fehlberg method"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta%E2%80%93Fehlberg_method"
      }
    ],
    "tag": "6D73FFD9DC",
    "uses": [
      "7DBPJKYC6C",
      "RH8BD7PW5F",
      "T220HF0562",
      "6MREWBZR7R"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/6D73FFD9DC/",
  "links": [
    {
      "field": "about",
      "target": "7DBPJKYC6C"
    },
    {
      "field": "uses",
      "target": "7DBPJKYC6C"
    },
    {
      "field": "uses",
      "target": "RH8BD7PW5F"
    },
    {
      "field": "uses",
      "target": "T220HF0562"
    },
    {
      "field": "uses",
      "target": "6MREWBZR7R"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/6D73FFD9DC.md",
  "msc": [
    "65L06",
    "65L05",
    "65L50"
  ],
  "name": "Runge–Kutta–Fehlberg method",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/6D7/6D73FFD9DC.md",
  "status": null,
  "tag": "6D73FFD9DC",
  "uri": "m2://6D73FFD9DC",
  "url": "https://tamnd.github.io/math2/wiki/runge-kutta-fehlberg-method/",
  "writing": {
    "tag": "6D73FFD9DC",
    "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
      }
    ]
  }
}
