{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $n \\ge 0$ and let $x_0, \\ldots, x_{2n}$ be $2n + 1$ real numbers that are pairwise distinct modulo $2\\pi$.\nLet $y_0, \\ldots, y_{2n}$ be complex numbers.\nThe *trigonometric interpolation polynomial* for these data is the unique [[trigonometric polynomial|J3NJQ5FZJ5]]\n$$p(x) = \\sum_{k=-n}^{n} c_k e^{ikx}$$\nof degree at most $n$ such that $p(x_j) = y_j$ for $j = 0, \\ldots, 2n$.\n*Trigonometric interpolation* is the construction of $p$ from the data.\n\n## Remarks\n\nExistence and uniqueness: the conditions form a square linear system in $c_{-n}, \\ldots, c_n$.\nLet $p$ have degree at most $n$ and vanish at all $x_j$.\nWith $z = e^{ix}$, the function $z^n p$ is an ordinary polynomial of degree at most $2n$ in $z$.\nIt has the $2n + 1$ distinct roots $e^{ix_j}$, so $p = 0$.\nHence the system has a unique solution.\nIf all $y_j$ are real, then $c_{-k} = \\overline{c_k}$ and $p$ is real-valued.\n\nFor equally spaced nodes $x_j = 2\\pi j / (2n+1)$, the coefficients are\n$$c_k = \\frac{1}{2n+1} \\sum_{j=0}^{2n} y_j e^{-ik x_j},$$\na [[discrete Fourier transform|TST0GH66A5]] of the data.\n\nExample: $n = 1$, nodes $0, 2\\pi/3, 4\\pi/3$ and values $1, 0, 0$.\nThe formula gives $c_0 = c_1 = c_{-1} = 1/3$, so $p(x) = \\frac{1}{3} + \\frac{2}{3} \\cos x$.\nCheck: $p(0) = 1$ and $p(2\\pi/3) = p(4\\pi/3) = \\frac{1}{3} - \\frac{1}{3} = 0$.\n\nNon-example: the nodes $0$ and $2\\pi$ are equal modulo $2\\pi$, so they are not allowed.\nThe data $p(0) = 1$, $p(2\\pi) = 0$ cannot be met by any $2\\pi$-periodic function.\n\nWith an even number $2n$ of nodes one uses trigonometric polynomials of degree $n$ with a constraint on the top frequency, such as a cosine term only.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "SVABG134WE",
    "kind": "definition",
    "msc": [
      "42A15",
      "65T40"
    ],
    "name": "Trigonometric interpolation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Trigonometric_interpolation"
      }
    ],
    "tag": "765P54K9BR",
    "uses": [
      "J3NJQ5FZJ5"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/765P54K9BR/",
  "links": [
    {
      "field": "defines",
      "target": "SVABG134WE"
    },
    {
      "field": "uses",
      "target": "J3NJQ5FZJ5"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/765P54K9BR.md",
  "msc": [
    "42A15",
    "65T40"
  ],
  "name": "Trigonometric interpolation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/765/765P54K9BR.md",
  "status": null,
  "tag": "765P54K9BR",
  "uri": "m2://765P54K9BR",
  "url": "https://tamnd.github.io/math2/wiki/trigonometric-interpolation-definition/",
  "writing": {
    "tag": "765P54K9BR",
    "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
      }
    ]
  }
}
