# Polynomial long division: Wikis

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

# Encyclopedia

In algebra, polynomial long division is an algorithm for dividing a polynomial by another polynomial of the same or lower degree, a generalised version of the familiar arithmetic technique called long division. It can be done easily by hand, because it separates an otherwise complex division problem into smaller ones.

For any polynomials f(x) and g(x), with g(x) not identical to zero, there exist unique polynomials q(x) and r(x) such that

f(x) = q(x)g(x) + r(x)

with r(x) having smaller degree than g(x).

Polynomial long division finds the quotient q(x) and remainder r(x) given a numerator f(x) and nonzero denominator g(x). The problem is written down like a regular (non-algebraic) long division problem:

$g(x)\overline{) f(x)}.$

All terms with exponents less than the largest one must be written out explicitly, even if their coefficients are zero.

## Example

Find

$\frac{x^3 - 12x^2 - 42}{x-3}.$

The problem is written like this:

$x-3\overline{) x^3 - 12x^2 + 0x - 42}.$

The quotient and remainder can then be determined as follows:

1. Divide the first term of the numerator by the highest term of the denominator. Place the result above the bar (x3 ÷ x = x3· x−1 = x3−1 = x2).
$\begin{matrix} x^2\ \qquad\qquad\quad x-3\overline{) x^3 - 12x^2 + 0x - 42} \end{matrix}$
2. Multiply the denominator by the result just obtained (the first term of the eventual quotient). Write the result under the first two terms of the numerator (x2 · (x − 3) = x3 − 3x2).
$\begin{matrix} x^2\ \qquad\qquad\quad x-3\overline{) x^3 - 12x^2 + 0x - 42}\ \qquad\;\; x^3 - 3x^2 \end{matrix}$
3. Subtract the product just obtained from the appropriate terms of the original numerator, and write the result underneath. This can be tricky at times, because of the sign. ((x3 − 12x2) − (x3 − 3x2) = −12x2 + 3x2 = −9x2) Then, "bring down" the next term from the numerator.
$\begin{matrix} x^2\ \qquad\qquad\quad x-3\overline{) x^3 - 12x^2 + 0x - 42}\ \qquad\;\; \underline{x^3 - 3x^2}\ \qquad\qquad\qquad\quad\; -9x^2 + 0x \end{matrix}$
4. Repeat the previous three steps, except this time use the two terms that have just been written as the numerator.
$\begin{matrix} \; x^2 - 9x\ \qquad\quad x-3\overline{) x^3 - 12x^2 + 0x - 42}\ \;\; \underline{\;\;x^3 - \;\;3x^2}\ \qquad\qquad\quad\; -9x^2 + 0x\ \qquad\qquad\quad\; \underline{-9x^2 + 27x}\ \qquad\qquad\qquad\qquad\qquad -27x - 42 \end{matrix}$
5. Repeat step 4. This time, there is nothing to "pull down".
$\begin{matrix} \qquad\quad\;\, x^2 \; - 9x \quad - 27\ \qquad\quad x-3\overline{) x^3 - 12x^2 + 0x - 42}\ \;\; \underline{\;\;x^3 - \;\;3x^2}\ \qquad\qquad\quad\; -9x^2 + 0x\ \qquad\qquad\quad\; \underline{-9x^2 + 27x}\ \qquad\qquad\qquad\qquad\qquad -27x - 42\ \qquad\qquad\qquad\qquad\qquad \underline{-27x + 81}\ \qquad\qquad\qquad\qquad\qquad\qquad\;\; -123 \end{matrix}$

The polynomial above the bar is the quotient, and the number left over (−123) is the remainder.

$\frac{x^3 - 12x^2 - 42}{x-3} = x^2 - 9x - 27 - \frac{123}{x-3}$

The long division algorithm learned in elementary arithmetic classes can be viewed as a special case of the above algorithm.