{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $f \\colon [t_0, T] \\times \\R^d \\to \\R^d$ be of class $C^2$, and consider the [[initial value problem|0FXDW992DS]] $y' = f(t, y)$, $y(t_0) = y_0$ with exact solution $y$.\nThe *explicit midpoint method* with step $h \u003e 0$ is\n$$y_{n+1} = y_n + h \\, f\\Big(t_n + \\frac{h}{2}, \\; y_n + \\frac{h}{2} f(t_n, y_n)\\Big).$$\nIts [[local truncation error|T220HF0562]] is $O(h^3)$, so it is a Runge–Kutta method of order $2$.\n\n## Remarks\n\nProof idea: by [[Taylor's theorem|03QHBVW4TT]], $y(t + h) = y + h f + \\frac{h^2}{2}(f_t + f_y f) + O(h^3)$, with $f$ and its partial derivatives taken at $(t, y(t))$.\nExpanding the increment gives $h f\\big(t + \\frac h2, y + \\frac h2 f\\big) = h f + \\frac{h^2}{2}(f_t + f_y f) + O(h^3)$, and the two expansions agree up to $h^2$.\nIn Butcher form it has $c = (0, \\tfrac12)$, $a_{21} = \\tfrac12$ and $b = (0, 1)$.\nExample: for $y' = \\lambda y$ it gives $y_{n+1} = \\big(1 + z + \\frac{z^2}{2}\\big) y_n$ with $z = h\\lambda$, the Taylor polynomial of $e^z$ of degree $2$.\nThe *implicit midpoint method* $y_{n+1} = y_n + h f\\big(t_n + \\frac h2, \\frac{y_n + y_{n+1}}{2}\\big)$ also has order $2$; it is the one-stage Gauss–Legendre method.\n\n## Explanations\n\n### L1 human\n\nThe Euler method follows the slope at the start of the step all the way to the end.\nThe midpoint method first uses that slope to walk half a step, measures the slope there, and then makes the whole step with this better slope.\nThis costs two slope evaluations per step but makes the error shrink like $h^2$ instead of $h$.\n\n### L2 human\n\nThe explicit midpoint method is one of the simplest second-order [[Runge–Kutta methods|7DBPJKYC6C]], together with [[Heun's method|RJEK60G28F]].\nBoth satisfy the order conditions $\\sum b_i = 1$ and $\\sum b_i c_i = \\frac12$, and they differ in the choice of the second stage.\nThe implicit midpoint method is symplectic and preserves quadratic invariants, which makes it useful for Hamiltonian systems.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "7DBPJKYC6C"
    ],
    "kind": "statement",
    "msc": [
      "65L06",
      "65L05"
    ],
    "name": "Midpoint method",
    "role": "proposition",
    "same_as": {
      "wikidata": "Q17103851",
      "wikipedia": "Midpoint method"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Midpoint_method"
      }
    ],
    "tag": "WHK8D383YT",
    "uses": [
      "7DBPJKYC6C",
      "0FXDW992DS",
      "T220HF0562",
      "03QHBVW4TT"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/WHK8D383YT/",
  "links": [
    {
      "field": "about",
      "target": "7DBPJKYC6C"
    },
    {
      "field": "uses",
      "target": "7DBPJKYC6C"
    },
    {
      "field": "uses",
      "target": "0FXDW992DS"
    },
    {
      "field": "uses",
      "target": "T220HF0562"
    },
    {
      "field": "uses",
      "target": "03QHBVW4TT"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/WHK8D383YT.md",
  "msc": [
    "65L06",
    "65L05"
  ],
  "name": "Midpoint method",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/WHK/WHK8D383YT.md",
  "status": null,
  "tag": "WHK8D383YT",
  "uri": "m2://WHK8D383YT",
  "url": "https://tamnd.github.io/math2/wiki/midpoint-method/",
  "writing": {
    "tag": "WHK8D383YT",
    "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
      }
    ]
  }
}
