{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $K$ be a [[field|0QA8CHH8MG]] and let $k \\ge 1$ be an integer.\nLet $a_0, a_1, \\dots, a_k$ and $b$ be sequences in $K$, indexed by $n \\in \\N$, with $a_k(n) \\ne 0$ for all $n$.\nThe *linear difference equation* with these coefficients is the equation\n$$a_k(n)\\, u_{n+k} + a_{k-1}(n)\\, u_{n+k-1} + \\dots + a_0(n)\\, u_n = b(n) \\qquad (n \\ge 0)$$\nfor an unknown sequence $(u_n)_{n \\ge 0}$ in $K$.\nIt is *homogeneous* if $b(n) = 0$ for all $n$, and *inhomogeneous* otherwise.\nIt has *constant coefficients* if each $a_i$ is a constant sequence.\n\n## Remarks\n\nSince $a_k(n) \\ne 0$, the equation can be solved for $u_{n+k}$, so it is a [[recurrence relation|07TZV87Y0T]] of order at most $k$.\nExample: $u_{n+1} - (n+1) u_n = 0$ is a homogeneous linear difference equation with $k = 1$, $a_1 = 1$ and $a_0(n) = -(n+1)$; with $u_0 = 1$ its solution is $u_n = n!$.\nNon-example: $u_{n+1} = u_n^2$ is not linear, because the unknown appears squared; the sequences $u = (1, 1, 1, \\dots)$ and $2u = (2, 2, 2, \\dots)$ show that multiples of solutions need not be solutions.\nIn terms of the [[shift operator|91QMF4R1CY]] $E$, the equation reads $L u = b$ with $L = a_k E^k + \\dots + a_0$, a linear operator on sequences.\nThe constant coefficient case is the [[linear recurrence with constant coefficients|081THG13JZ]].\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "AA7XRZ4VAG",
    "kind": "definition",
    "msc": [
      "39A06"
    ],
    "name": "Linear difference equation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Linear_recurrence_with_constant_coefficients"
      }
    ],
    "tag": "5115KV924G",
    "uses": [
      "07TZV87Y0T",
      "0QA8CHH8MG"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/5115KV924G/",
  "links": [
    {
      "field": "defines",
      "target": "AA7XRZ4VAG"
    },
    {
      "field": "uses",
      "target": "07TZV87Y0T"
    },
    {
      "field": "uses",
      "target": "0QA8CHH8MG"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/5115KV924G.md",
  "msc": [
    "39A06"
  ],
  "name": "Linear difference equation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/511/5115KV924G.md",
  "status": null,
  "tag": "5115KV924G",
  "uri": "m2://5115KV924G",
  "url": "https://tamnd.github.io/math2/wiki/linear-difference-equation-definition/",
  "writing": {
    "tag": "5115KV924G",
    "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
      }
    ]
  }
}
