The division algorithm is an algorithm for dividing numbers and obtaining a decimal or a quotient remainder. It may also be applied to polynomials. There is no such thing as a decimal polynomial, so we find the quotient and remainder.

Suppose we want to find the quotient and remainder whenis divided by represented byOur first step is eliminate theterm by subtractingfrom shown as

To eliminate theterm multiplybyand subtract:

Finally we must eliminate the 4x term by subtracting 4(x+2).

The quotient is thenand the remainder is 7 so