{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $K$ be a [[field|04C5ZBG1WT]] and let $f$ be a [[function|0EPAT51DXQ]] from a subset of $K$ to $K$.\nLet $x_0, \\dots, x_n$ be pairwise distinct points of its domain.\nThe *divided differences* of $f$ are defined by recursion on the number of points:\n\n1. $f[x_i] = f(x_i)$ for each $i$;\n2. for $k \\ge 1$ and $0 \\le i \\le n - k$,\n$$f[x_i, \\dots, x_{i+k}] = \\frac{f[x_{i+1}, \\dots, x_{i+k}] - f[x_i, \\dots, x_{i+k-1}]}{x_{i+k} - x_i}.$$\n\n## Remarks\n\nThe value $f[x_0, \\dots, x_n]$ is a symmetric function of the points: it does not depend on their order.\nIt has the closed form\n$$f[x_0, \\dots, x_n] = \\sum_{j=0}^{n} \\frac{f(x_j)}{\\prod_{k \\ne j} (x_j - x_k)}.$$\nIt is the coefficient of $x^n$ in the [[interpolation polynomial|SS1YMS2NPC]] of $f$ at $x_0, \\dots, x_n$.\nFor a real function $f$ with enough derivatives, the definition extends to repeated points by continuity; for example $f[x, x] = f'(x)$.\n\nExample: for $f(x) = x^2$ and the points $0, 1, 3$: $f[0, 1] = 1$, $f[1, 3] = \\frac{9 - 1}{2} = 4$, and $f[0, 1, 3] = \\frac{4 - 1}{3 - 0} = 1$.\nThis is the leading coefficient of $x^2$, as expected.\n\nNon-example: the recursion cannot be applied to the list $1, 1$ of repeated points, because the denominator $x_1 - x_0$ is $0$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "N5ZHV4HWDC",
    "kind": "definition",
    "msc": [
      "65D05",
      "41A05",
      "39A70"
    ],
    "name": "Divided differences",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Divided_differences"
      }
    ],
    "tag": "T942SHWSSF",
    "uses": [
      "0EPAT51DXQ",
      "04C5ZBG1WT",
      "SS1YMS2NPC"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/T942SHWSSF/",
  "links": [
    {
      "field": "defines",
      "target": "N5ZHV4HWDC"
    },
    {
      "field": "uses",
      "target": "0EPAT51DXQ"
    },
    {
      "field": "uses",
      "target": "04C5ZBG1WT"
    },
    {
      "field": "uses",
      "target": "SS1YMS2NPC"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/T942SHWSSF.md",
  "msc": [
    "65D05",
    "41A05",
    "39A70"
  ],
  "name": "Divided differences",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/T94/T942SHWSSF.md",
  "status": null,
  "tag": "T942SHWSSF",
  "uri": "m2://T942SHWSSF",
  "url": "https://tamnd.github.io/math2/wiki/divided-differences-definition/",
  "writing": {
    "tag": "T942SHWSSF",
    "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
      }
    ]
  }
}
