{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $R$ be a [[commutative ring|0GYGHKX834]] and let $f, g \\in R[x]$, where $g$ has [[degree|0DPF6WRZW6]] $m$ and its [[leading coefficient|0P05RJC5XA]] $u$ is a unit of $R$.\nPolynomial long division of $f$ by $g$ is the following procedure.\n\n1. Start with $q = 0$ and $r = f$.\n2. While $r \\ne 0$ and $\\deg r \\ge m$, let $c$ be the leading coefficient of $r$ and $d = \\deg r$, and replace $q$ by $q + u^{-1} c x^{d - m}$ and $r$ by $r - u^{-1} c x^{d - m} g$.\n3. When $r = 0$ or $\\deg r \u003c m$, stop and return the quotient $q$ and the remainder $r$.\n\n## Remarks\n\nEach pass of step 2 removes the leading term of $r$, so $\\deg r$ drops and the procedure stops.\nThe equation $f = q g + r$ holds at every step, so the output is the unique pair of the [[division algorithm for polynomials|0MES3KS0ZC]].\nExample: divide $f = x^3 - 2x^2 - 4$ by $g = x - 3$ in $\\Z[x]$.\nThe steps add $x^2$, then $x$, then $3$ to the quotient, and the remainder is $5$.\nCheck: $(x - 3)(x^2 + x + 3) + 5 = x^3 - 2x^2 - 9 + 5 = x^3 - 2x^2 - 4$.\nNon-example: in $\\Z[x]$ the procedure does not apply to $g = 2x$, because the leading coefficient $2$ is not a unit, and the first step for $f = x$ would need the coefficient $\\frac{1}{2}$.\nDivision by a monic $g = x - a$ is often written in a compact table, called synthetic division; it is [[Horner's method|FYBQ3Z52Z7]].\n\n## Explanations\n\n### L1 human\n\nLong division of polynomials repeats one move: kill the highest term of what is left.\nIt stops when what is left has smaller degree than the divisor.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "D6D0SR1FK3",
    "kind": "definition",
    "msc": [
      "13F20",
      "68W30"
    ],
    "name": "Polynomial long division",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Polynomial_long_division"
      }
    ],
    "tag": "FTAK2F0TR3",
    "uses": [
      "0GYGHKX834",
      "0Q9EZS90GY",
      "0DPF6WRZW6",
      "0P05RJC5XA",
      "0MES3KS0ZC"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/FTAK2F0TR3/",
  "links": [
    {
      "field": "defines",
      "target": "D6D0SR1FK3"
    },
    {
      "field": "uses",
      "target": "0GYGHKX834"
    },
    {
      "field": "uses",
      "target": "0Q9EZS90GY"
    },
    {
      "field": "uses",
      "target": "0DPF6WRZW6"
    },
    {
      "field": "uses",
      "target": "0P05RJC5XA"
    },
    {
      "field": "uses",
      "target": "0MES3KS0ZC"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/FTAK2F0TR3.md",
  "msc": [
    "13F20",
    "68W30"
  ],
  "name": "Polynomial long division",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/FTA/FTAK2F0TR3.md",
  "status": null,
  "tag": "FTAK2F0TR3",
  "uri": "m2://FTAK2F0TR3",
  "url": "https://math2.tamnd.com/wiki/polynomial-long-division-definition/",
  "writing": {
    "tag": "FTAK2F0TR3",
    "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
      }
    ]
  }
}
