Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Now we can read off the coefficients of the answer.

As in expanded synthetic division, the last two values (2 is


the degree of the divisor) are the coefficients of the remainder, and the remaining values are the coefficients of
the quotient:

and the result is

Compact Expanded Synthetic Division

However, the diagonal format above becomes less space-efficient when the degree of the divisor exceeds half
of the degree of the dividend. It is easy to see that we have complete freedom to write each product in any row,
as long as it is in the correct column. So the algorithm can be compactified by a greedy strategy, as
illustrated in the division below.

The following describes how to perform the algorithm; this algorithm includes steps for dividing non-monic
divisors:

1. Write the coefficients of the dividend on a bar


2. Ignoring the first (leading) coefficient of the divisor, negate each coefficients and place them on the left-hand
side of the bar.
3. From the number of coefficients placed on the left side of the bar, count the number of dividend coefficients
above the bar, starting from the rightmost column. Then place a vertical bar to the left, and as well as the
row below, of that column. This vertical bar marks the separation between the quotient and the remainder.

4. Drop the first coefficient of the dividend below the bar.

5. Divide the previously dropped/summed number by the leading coefficient of the divisor and place it on
the row below (this doesn't need to be done if the leading coefficient is 1). In this case .

Multiply the previously dropped/summed number (or the divided dropped/summed number) to each
negated divisor coefficients on the left (starting with the left most); skip if the dropped/summed number
is zero. Place each product on top of the subsequent columns.
6. Perform an column-wise addition on the next column.

7. Repeat the previous two steps. Stop when you performed the previous two steps on the number just before

the vertical bar. Let . Let .

Let .

8. Perform the remaining column-wise additions on the subsequent columns (calculating the remainder).

9. The bottommost results below the horizontal bar are coefficients of the polynomials, the remainder and the
quotient. Where the coefficients of the quotient is to the left of the vertical bar separation, and the
coefficients of the remainder to the right. These coefficients would be interpreted with increasing degree
from right to left beginning with degree zero for both the remainder and the quotient. We interpret the results
to get:

Python implementation

You might also like