{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $K$ be a field and let $d \\ge 1$ be an integer.\nLet $a_0, \\dots, a_{d-1} \\colon \\N \\to K$ and $g \\colon \\N \\to K$ be [[sequences|0G9EKM0E15]].\nA linear recurrence of order $d$ is the [[recurrence relation|07TZV87Y0T]]\n$$u_{n+d} + a_{d-1}(n)\\, u_{n+d-1} + \\cdots + a_0(n)\\, u_n = g(n) \\qquad (n \\in \\N)$$\nfor a sequence $u \\colon \\N \\to K$.\nThe sequence $g$ is its right-hand side.\n\n1. The recurrence is *homogeneous* if $g(n) = 0$ for all $n$.\n2. The recurrence is *inhomogeneous* if $g(n) \\ne 0$ for some $n$.\n3. The *associated homogeneous recurrence* is the one with the same $a_0, \\dots, a_{d-1}$ and with $g$ replaced by $0$.\n\n## Remarks\n\nExample: $u_{n+1} - 2 u_n = 1$ is inhomogeneous of order $1$, with $a_0(n) = -2$ and $g(n) = 1$.\nIts associated homogeneous recurrence is $u_{n+1} - 2 u_n = 0$, whose solutions are $c\\, 2^n$.\nNon-example: $u_{n+1} = u_n^2 + 1$ is not a linear recurrence at all, since the term $u_n^2$ is not linear in $u_n$; so it is neither homogeneous nor inhomogeneous in this sense.\nWhen all $a_i$ are constant, the homogeneous case is a [[linear recurrence with constant coefficients|081THG13JZ]].\nOther names are homogeneous and nonhomogeneous linear difference equations.\nThe difference of two solutions of the inhomogeneous recurrence solves the associated homogeneous one.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "8Y28JQB0Q5",
    "kind": "definition",
    "msc": [
      "39A06",
      "39A05"
    ],
    "name": "Homogeneous and inhomogeneous linear recurrences",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Linear_recurrence_with_constant_coefficients"
      }
    ],
    "tag": "SVGN0QKE2C",
    "uses": [
      "07TZV87Y0T",
      "0G9EKM0E15"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/SVGN0QKE2C/",
  "links": [
    {
      "field": "defines",
      "target": "8Y28JQB0Q5"
    },
    {
      "field": "uses",
      "target": "07TZV87Y0T"
    },
    {
      "field": "uses",
      "target": "0G9EKM0E15"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/SVGN0QKE2C.md",
  "msc": [
    "39A06",
    "39A05"
  ],
  "name": "Homogeneous and inhomogeneous linear recurrences",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/SVG/SVGN0QKE2C.md",
  "status": null,
  "tag": "SVGN0QKE2C",
  "uri": "m2://SVGN0QKE2C",
  "url": "https://tamnd.github.io/math2/wiki/homogeneous-and-inhomogeneous-linear-recurrences-definition/",
  "writing": {
    "tag": "SVGN0QKE2C",
    "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
      }
    ]
  }
}
