{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $y$ be the exact solution of an [[initial value problem|0FXDW992DS]] $y' = f(t, y)$, $y(t_0) = y_0$, and let $t_n = t_0 + nh$.\nConsider a [[one-step method|558XADG64M]] $y_{n+1} = y_n + h \\, \\Phi(t_n, y_n, h)$ with increment function $\\Phi$.\nThe *local truncation error* at step $n + 1$ is\n$$\\tau_{n+1} = y(t_{n+1}) - y(t_n) - h \\, \\Phi\\big(t_n, y(t_n), h\\big),$$\nthe error of one step started from the exact value $y(t_n)$.\nThe method is *consistent of order* $p$ if $\\tau_{n+1} = O(h^{p+1})$ as $h \\to 0$, uniformly in $n$, for every sufficiently smooth $f$.\n\n## Remarks\n\nFor an implicit method or a linear multistep method $\\sum_{j=0}^{k} \\alpha_j y_{n+j} = h \\sum_{j=0}^{k} \\beta_j f(t_{n+j}, y_{n+j})$, one inserts the exact solution in the same way: $\\tau_{n+k} = \\sum_j \\alpha_j y(t_{n+j}) - h \\sum_j \\beta_j y'(t_{n+j})$.\nSome books divide by $h$ and call $\\tau_{n+1}/h$ the truncation error; then order $p$ means $O(h^p)$.\nExample: for the Euler method, $\\Phi(t, y, h) = f(t, y)$, and Taylor's theorem gives $\\tau_{n+1} = y(t_n + h) - y(t_n) - h y'(t_n) = \\frac{h^2}{2} y''(\\xi_n)$, so the method is consistent of order $1$.\nNon-example: $\\Phi(t, y, h) = 2 f(t, y)$ is not consistent, since $\\tau_{n+1} = -h y'(t_n) + O(h^2)$ is not even $O(h^2)$.\nIf $\\Phi$ is [[Lipschitz|0AW1E6YTJY]] in $y$ with constant $L \u003e 0$ and $\\abs{\\tau_n} \\le C h^{p+1}$ for all $n$, and if the method starts from $y_0 = y(t_0)$, then the global error satisfies $\\abs{y(t_n) - y_n} \\le \\frac{C h^p}{L}\\big(e^{L(t_n - t_0)} - 1\\big)$.\n\n## Explanations\n\n### L1 human\n\nThe local truncation error asks: if the method starts a step at the exact answer, how wrong is it one step later?\nA method of order $p$ makes an error of size about $h^{p+1}$ per step.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "T220HF0562",
    "kind": "definition",
    "msc": [
      "65L70",
      "65L05",
      "65L06"
    ],
    "name": "Local truncation error",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Truncation_error_(numerical_integration)"
      }
    ],
    "tag": "YY6P3RSDWC",
    "uses": [
      "558XADG64M",
      "0FXDW992DS",
      "0AW1E6YTJY",
      "0TGV80E6A4"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/YY6P3RSDWC/",
  "links": [
    {
      "field": "defines",
      "target": "T220HF0562"
    },
    {
      "field": "uses",
      "target": "558XADG64M"
    },
    {
      "field": "uses",
      "target": "0FXDW992DS"
    },
    {
      "field": "uses",
      "target": "0AW1E6YTJY"
    },
    {
      "field": "uses",
      "target": "0TGV80E6A4"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/YY6P3RSDWC.md",
  "msc": [
    "65L70",
    "65L05",
    "65L06"
  ],
  "name": "Local truncation error",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YY6/YY6P3RSDWC.md",
  "status": null,
  "tag": "YY6P3RSDWC",
  "uri": "m2://YY6P3RSDWC",
  "url": "https://tamnd.github.io/math2/wiki/local-truncation-error-definition/",
  "writing": {
    "tag": "YY6P3RSDWC",
    "kind": "definition",
    "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
      }
    ]
  }
}
