HOME

TheInfoList



OR:

In
algebra Algebra () is one of the broad areas of mathematics. Roughly speaking, algebra is the study of mathematical symbols and the rules for manipulating these symbols in formulas; it is a unifying thread of almost all of mathematics. Elementary ...
, synthetic division is a method for manually performing
Euclidean division of polynomials In algebra, the greatest common divisor (frequently abbreviated as GCD) of two polynomials is a polynomial, of the highest possible degree, that is a factor of both the two original polynomials. This concept is analogous to the greatest common ...
, with less writing and fewer calculations than
long division In arithmetic, long division is a standard division algorithm suitable for dividing multi-digit Hindu-Arabic numerals (Positional notation) that is simple enough to perform by hand. It breaks down a division problem into a series of easier steps ...
. It is mostly taught for division by
linear Linearity is the property of a mathematical relationship ('' function'') that can be graphically represented as a straight line. Linearity is closely related to '' proportionality''. Examples in physics include rectilinear motion, the linear ...
monic polynomials (known as the Ruffini's rule), but the method can be generalized to division by any
polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
. The advantages of synthetic division are that it allows one to calculate without writing variables, it uses few calculations, and it takes significantly less space on paper than long division. Also, the subtractions in long division are converted to additions by switching the signs at the very beginning, helping to prevent sign errors.


Regular synthetic division

The first example is synthetic division with only a monic linear denominator x-a. :\frac The
numerator A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
can be written as p(x) = x^3 - 12x^2 + 0x - 42 . The zero of the denominator g(x) is 3. The coefficients of p(x) are arranged as follows, with the zero of g(x) on the left: :\begin \begin \\ 3 \\ \end & \begin \ 1 & -12 & 0 & -42 \\ & & & \\ \hline \end \end The after the bar is "dropped" to the last row. :\begin \begin \\ 3 \\ \\ \end & \begin \color1 & -12 & 0 & -42 \\ & & & \\ \hline \color1 & & & \\ \end \end The is multiplied by the before the bar, and placed in the . :\begin \begin \\ \color3 \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & \color3 & & \\ \hline \color1 & & & \\ \end \end An is performed in the next column. :\begin \begin \\ 3 \\ \\ \end & \begin 1 & \color-12 & 0 & -42 \\ & \color3 & & \\ \hline 1 & \color-9 & & \\ \end \end The previous two steps are repeated and the following is obtained: :\begin \begin \\ 3 \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & 3 & -27 & -81 \\ \hline 1 & -9 & -27 & -123 \end \end Here, the last term (-123) is the remainder while the rest correspond to the coefficients of the quotient. The terms are written with increasing degree from right to left beginning with degree zero for the remainder and the result. : \begin 1x^2 & -9x & -27 & -123 \end Hence the quotient and remainder are: :q(x) = x^2 - 9x - 27 :r(x) = -123


Evaluating polynomials by the remainder theorem

The above form of synthetic division is useful in the context of the
polynomial remainder theorem In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
for evaluating
univariate In mathematics, a univariate object is an expression, equation, function or polynomial involving only one variable. Objects involving more than one variable are multivariate. In some cases the distinction between the univariate and multivariate ...
polynomials. To summarize, the value of p(x) at a is equal to the
remainder In mathematics, the remainder is the amount "left over" after performing some computation. In arithmetic, the remainder is the integer "left over" after dividing one integer by another to produce an integer quotient ( integer division). In algeb ...
of the division of p(x) by x-a. The advantage of calculating the value this way is that it requires just over half as many multiplication steps as naive evaluation. An alternative evaluation strategy is
Horner's method In mathematics and computer science, Horner's method (or Horner's scheme) is an algorithm for polynomial evaluation. Although named after William George Horner, this method is much older, as it has been attributed to Joseph-Louis Lagrange by Horn ...
.


Expanded synthetic division

This method generalizes to division by any
monic polynomial In algebra, a monic polynomial is a single-variable polynomial (that is, a univariate polynomial) in which the leading coefficient (the nonzero coefficient of highest degree) is equal to 1. Therefore, a monic polynomial has the form: :x^n+c_x^+\ ...
with only a slight modification with changes in bold. Using the same steps as before, perform the following division: :\frac We concern ourselves only with the coefficients. Write the coefficients of the polynomial to be divided at the top. : \begin \ 1 & -12 & 0 & -42 \end Negate the coefficients of the divisor. : \begin -1x^2 &-1x &+3 \end Write in every coefficient but the first one on the left in an upward right diagonal (see next diagram). :\begin \begin \\ &3 \\ -1& \\ \end & \begin \ 1 & -12 & 0 & -42 \\ & & & \\ & & & \\ \hline \end \end Note the change of sign from 1 to −1 and from −3 to 3 . "Drop" the first coefficient after the bar to the last row. :\begin \begin \\ &3 \\ -1& \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & & & \\ & & & \\ \hline 1 & & & \\ \end \end Multiply the dropped number by the diagonal before the bar, and place the resulting entries diagonally to the right from the dropped entry. :\begin \begin \\ &3 \\ -1& \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & & 3 & \\ & -1 & & \\ \hline 1 & & & \\ \end \end Perform an addition in the next column. :\begin \begin \\ &3 \\ -1& \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & & 3 & \\ & -1 & & \\ \hline 1 & -13 & & \\ \end \end Repeat the previous two steps until you would go past the entries at the top with the next diagonal. :\begin \begin \\ &3 \\ -1& \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & & 3 & -39 \\ & -1 & 13 & \\ \hline 1 & -13 & 16 & \\ \end \end Then simply add up any remaining columns. :\begin \begin \\ &3 \\ -1& \\ \\ \end & \begin 1 & -12 & 0 & -42 \\ & & 3 & -39 \\ & -1 & 13 & \\ \hline 1 & -13 & 16 & -81 \\ \end \end Count the terms to the left of the bar. Since there are two, the remainder has degree one and this is the two right-most terms under the bar. Mark the separation with a vertical bar. : \begin 1 & -13 & 16 & -81 \end The terms are written with increasing degree from right to left beginning with degree zero for both the remainder and the result. : \begin 1x & -13 & 16x & -81 \end The result of our division is: :\frac = x - 13 + \frac


For non-monic divisors

With a little prodding, the expanded technique may be generalised even further to work for any polynomial, not just monics. The usual way of doing this would be to divide the divisor g(x) with its leading coefficient (call it ''a''): :h(x) = \frac then using synthetic division with h(x) as the divisor, and then dividing the quotient by ''a'' to get the quotient of the original division (the remainder stays the same). But this often produces unsightly fractions which get removed later, and is thus more prone to error. It is possible to do it without first reducing the coefficients of g(x). As can be observed by first performing long division with such a non-monic divisor, the coefficients of f(x) are divided by the leading coefficient of g(x) after "dropping", and before multiplying. Let's illustrate by performing the following division: :\frac A slightly modified table is used: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & & \\ & & & \\ \hline & & & \\ & & & \\ \end \end Note the extra row at the bottom. This is used to write values found by dividing the "dropped" values by the leading coefficient of g(x) (in this case, indicated by the ''/3''; note that, unlike the rest of the coefficients of g(x), the sign of this number is not changed). Next, the first coefficient of f(x) is dropped as usual: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & & \\ & & & \\ \hline 6 & & & \\ & & & \\ \end \end and then the dropped value is divided by 3 and placed in the row below: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & & \\ & & & \\ \hline 6 & & & \\ 2 & & & \\ \end \end Next, the new (divided) value is used to fill the top rows with multiples of 2 and 1, as in the expanded technique: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & 2 & \\ & 4 & & \\ \hline 6 & & & \\ 2 & & & \\ \end \end The 5 is dropped next, with the obligatory adding of the 4 below it, and the answer is divided again: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & 2 & \\ & 4 & & \\ \hline 6 & 9 & & \\ 2 & 3 & & \\ \end \end Then the 3 is used to fill the top rows: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & 2 & 3 \\ & 4 & 6 & \\ \hline 6 & 9 & & \\ 2 & 3 & & \\ \end \end At this point, if, after getting the third sum, we were to try and use it to fill the top rows, we would "fall off" the right side, thus the third sum is the first coefficient of the remainder, as in regular synthetic division. But the values of the remainder are not divided by the leading coefficient of the divisor: :\begin \begin \\ &1& \\ 2&& \\ \\&&/3 \\ \end \begin 6 & 5 & 0 & -7 \\ & & 2 & 3 \\ & 4 & 6 & \\ \hline 6 & 9 & 8 & -4 \\ 2 & 3 & & \\ \end \end 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: : \begin 2x & +3 & 8x & -4 \end and the result is :\frac = 2x + 3 + \frac


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. Consider the following division: :\dfrac 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: :\begin \begin \\ \\ \\ \\ b_3 & b_2 & b_1 & b_0 \\ \\ &&&&/b_4 \\ \end \begin & & & & q_0 b_3 & & & \\ & & & q_1 b_3 & q_1 b_2 & q_0 b_2 & & \\ & & q_2 b_3 & q_2 b_2 & q_2 b_1 & q_1 b_1 & q_0 b_1 & \\ & q_3 b_3 & q_3 b_2 & q_3 b_1 & q_3 b_0 & q_2 b_0 & q_1 b_0 & q_0 b_0 \\ a_7 & a_6 & a_5 & a_4 & a_3 & a_2 & a_1 & a_0 \\ \hline a_7 & q_2' & q_1' & q_0' & r_3 & r_2 & r_1 & r_0 \\ q_3 & q_2 & q_1 & q_0 & & & & \\ \end \end The following describes how to perform the algorithm; this algorithm includes steps for dividing non-monic divisors:


Python implementation

The following snippet implements Expanded Synthetic Division in Python for arbitrary univariate polynomials: def expanded_synthetic_division(dividend, divisor): """Fast polynomial division by using Expanded Synthetic Division. Also works with non-monic polynomials. Dividend and divisor are both polynomials, which are here simply lists of coefficients. E.g.: x**2 + 3*x + 5 will be represented as
, 3, 5 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
""" out = list(dividend) # Copy the dividend normalizer = divisor for i in range(len(dividend) - len(divisor) + 1): # For general polynomial division (when polynomials are non-monic), # we need to normalize by dividing the coefficient with the divisor's first coefficient out /= normalizer coef = out if coef != 0: # Useless to multiply if coef is 0 # In synthetic division, we always skip the first coefficient of the divisor, # because it is only used to normalize the dividend coefficients for j in range(1, len(divisor)): out + j+= -divisor * coef # The resulting out contains both the quotient and the remainder, # the remainder being the size of the divisor (the remainder # has necessarily the same degree as the divisor since it is # what we couldn't divide from the dividend), so we compute the index # where this separation is, and return the quotient and remainder. separator = 1 - len(divisor) return out separator out eparator: # Return quotient, remainder.


See also

*
Euclidean domain In mathematics, more specifically in ring theory, a Euclidean domain (also called a Euclidean ring) is an integral domain that can be endowed with a Euclidean function which allows a suitable generalization of the Euclidean division of integers ...
*
Greatest common divisor of two polynomials In algebra, the greatest common divisor (frequently abbreviated as GCD) of two polynomials is a polynomial, of the highest possible degree, that is a factorization, factor of both the two original polynomials. This concept is analogous to the gre ...
*
Gröbner basis In mathematics, and more specifically in computer algebra, computational algebraic geometry, and computational commutative algebra, a Gröbner basis is a particular kind of generating set of an ideal in a polynomial ring over a field . A Gröbn ...
*
Horner scheme In mathematics and computer science, Horner's method (or Horner's scheme) is an algorithm for polynomial evaluation. Although named after William George Horner, this method is much older, as it has been attributed to Joseph-Louis Lagrange by Hor ...
*
Polynomial remainder theorem In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
* Ruffini's rule


References

* *


External links

* *{{MathWorld , title=Ruffini's Rule , id=RuffinisRule , author=Stover, Christopher , author-link=Christopher Stover Computer algebra Division (mathematics) Polynomials