Misplaced Pages

Polynomial long division: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 13:34, 14 March 2009 editWtmitchell (talk | contribs)Administrators146,820 editsm Reverted edits by 119.153.69.241 to last revision by 147.26.111.112 (HG)← Previous edit Latest revision as of 03:53, 3 December 2024 edit undoDeffun (talk | contribs)3 edits note t is a polynomial and has degree deg(r)-deg(d) +1, also a form of polynomial division is required to calculate t. 
(262 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Short description|Algorithm for division of polynomials}}
In ], '''polynomial long division''' is an ] for dividing a ] by another polynomial of the same or lower ], a generalised version of the familiar arithmetic technique called ]. It can be done easily by hand, because it separates an otherwise complex division problem into smaller ones.
{{For|a shorthand version of this method|synthetic division}}
In ], '''polynomial long division''' is an ] for dividing a ] by another polynomial of the same or lower ], a generalized version of the familiar arithmetic technique called ]. It can be done easily by hand, because it separates an otherwise complex division problem into smaller ones. Sometimes using a shorthand version called ] is faster, with less writing and fewer calculations. Another abbreviated method is polynomial short division (Blomqvist's method).


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 Polynomial long division is an algorithm that implements the ], which starting from two polynomials ''A'' (the ''dividend'') and ''B'' (the ''divisor'') produces, if ''B'' is not zero, a '']'' ''Q'' and a ''remainder'' ''R'' such that
:''A'' = ''BQ'' + ''R'',
:<math>\frac{f(x)}{g(x)}=q(x) + \frac{r(x)}{g(x)}</math>
and either ''R'' = 0 or the degree of ''R'' is lower than the degree of ''B''. These conditions uniquely define ''Q'' and ''R'', which means that ''Q'' and ''R'' do not depend on the method used to compute them.
with ''r''(''x'') having smaller degree than ''g''(''x'').


The result ''R'' = 0 occurs ] the polynomial ''A'' has ''B'' as a ]. Thus long division is a means for testing whether one polynomial has another as a factor, and, if it does, for factoring it out. For example, if a ] ''r'' of ''A'' is known, it can be factored out by dividing ''A'' by (''x''&nbsp;–&nbsp;''r'').
Synthetic division will find 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:
:<math>g(x)\overline{\vert f(x)}</math>.
All terms with exponents less than the largest one must be written out explicitly, even if their ]s are zero.


=== Example === ==Example==


=== Polynomial long division ===
Find:
Find the quotient and the remainder of the division of <math>(x^3 - 2x^2 - 4)</math>, the ''dividend'', by <math>(x-3) </math>, the ''divisor''.
:<math>\frac{x^3 - 12x^2 - 42}{x-3}</math>


The dividend is first rewritten like this:
The problem is written like this (note that, as explained above, the ''x'' term is included explicitly, regardless of the coefficient):


:<math>x-3\overline{\vert x^3 - 12x^2 + 0x - 42}</math> :<math>x^3 - 2x^2 + 0x - 4.</math>


The quotient and remainder can then be determined as follows: The quotient and remainder can then be determined as follows:


<ol> <ol>
<li>
<li>Divide the first term of the numerator by the highest term of the denominator. Place the result above the bar (''x''<sup>3</sup> &divide; ''x'' = ''x''<sup>3</sup>&middot; ''x''<sup>&minus;1</sup> = ''x''<sup>3</sup><sup>&minus;1</sup> = ''x''<sup>2</sup>).
Divide the first term of the dividend by the highest term of the divisor (meaning the one with the highest power of ''x'', which in this case is ''x''). Place the result above the bar (''x''<sup>3</sup> ÷ ''x'' = ''x''<sup>2</sup>).
:<math> :<math>
\begin{matrix} \begin{array}{l}
{\color{White} x-3\ )\ x^3 - 2}x^2\\
x^2\\
\qquad\qquad\quad x-3\overline{\vert x^3 - 12x^2 + 0x - 42} x-3\ \overline{)\ x^3 - 2x^2 + 0x - 4}
\end{matrix} \end{array}
</math></li> </math>
</li>
<li>

<li>Multiply the denominator by the result you just obtained (the first term of the eventual quotient). Write the result under the first two terms of the numerator (''x''<sup>2</sup>&nbsp;&middot;&nbsp;(''x''&nbsp;&minus;&nbsp;3) = ''x''<sup>3</sup>&nbsp;&minus;&nbsp;3''x''<sup>2</sup>). Multiply the divisor by the result just obtained (the first term of the eventual quotient). Write the result under the first two terms of the dividend ({{math|1=''x''<sup>2</sup> · (''x''3) = ''x''<sup>3</sup>3''x''<sup>2</sup>}}).
:<math> :<math>
\begin{matrix} \begin{array}{l}
{\color{White} x-3\ )\ x^3 - 2}x^2\\
x^2\\
\qquad\qquad\quad x-3\overline{\vert x^3 - 12x^2 + 0x - 42}\\ x-3\ \overline{)\ x^3 - 2x^2 + 0x - 4}\\
\qquad\;\; x^3 - 3x^2 {\color{White} x-3\ )\ } x^3 - 3x^2
\end{matrix} \end{array}
</math></li> </math>
</li>
<li>

<li>Subtract the product you 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. ((''x''<sup>3</sup>&nbsp;&minus;&nbsp;12''x''<sup>2</sup>)&nbsp;&minus;&nbsp;(''x''<sup>3</sup>&nbsp;&minus;&nbsp;3''x''<sup>2</sup>) = &minus;12''x''<sup>2</sup>&nbsp;+&nbsp;3''x''<sup>2</sup> = &minus;9''x''<sup>2</sup>) Then, "bring down" the next term from the numerator. Subtract the product just obtained from the appropriate terms of the original dividend (being careful that subtracting something having a minus sign is equivalent to adding something having a plus sign), and write the result underneath {{math|({{math|1=''x''<sup>3</sup> − 2''x''<sup>2</sup>)(''x''<sup>3</sup>3''x''<sup>2</sup>) = −2''x''<sup>2</sup> + 3''x''<sup>2</sup> = ''x''<sup>2</sup>}}}}
Then, "bring down" the next term from the dividend.


:<math> :<math>
\begin{matrix} \begin{array}{l}
{\color{White} x-3\ )\ x^3 - 2}x^2\\
x^2\\
\qquad\qquad\quad x-3\overline{\vert x^3 - 12x^2 + 0x - 42}\\ x-3\ \overline{)\ x^3 - 2x^2 + 0x - 4}\\
\qquad\;\; \underline{x^3 - 3x^2}\\ {\color{White} x-3\ )\ } \underline{x^3 - 3x^2}\\
{\color{White} x-3\ )\ 0x^3} + {\color{White}}x^2 + 0x
\qquad\qquad\qquad\quad\; -9x^2 + 0x
\end{matrix} \end{array}
</math></li> </math>
</li>
<li>

<li>Repeat the previous three steps, except this time use the two terms that you have just written as the numerator. Repeat the previous three steps, except this time use the two terms that have just been written as the dividend.
:<math> :<math>
\begin{matrix} \begin{array}{r}
x^2 + {\color{White}1}x {\color{White} {} + 3}\\
\; x^2 - 9x\\
\qquad\quad x-3\overline{\vert x^3 - 12x^2 + 0x - 42}\\ x-3\ \overline{)\ x^3 - 2x^2 + 0x - 4}\\
\;\; \underline{\;\;x^3 - \;\;3x^2}\\ \underline{x^3 - 3x^2 {\color{White} {} + 0x - 4}}\\
+x^2 + 0x {\color{White} {} - 4}\\
\qquad\qquad\quad\; -9x^2 + 0x\\
\qquad\qquad\quad\; \underline{-9x^2 + 27x}\\ \underline{+x^2 - 3x {\color{White} {} - 4}}\\
+3x - 4\\
\qquad\qquad\qquad\qquad\qquad -27x - 42
\end{matrix} \end{array}
</math></li> </math>
</li>
<li>

<li>Repeat step 4. This time, there is nothing to "pull down". Repeat step 4. This time, there is nothing to "bring down".
:<math> :<math>
\begin{matrix} \begin{array}{r}
x^2 + {\color{White}1}x + 3\\
\qquad\quad\;\, x^2 \; - 9x \quad - 27\\
\qquad\quad x-3\overline{\vert x^3 - 12x^2 + 0x - 42}\\ x-3\ \overline{)\ x^3 - 2x^2 + 0x - 4}\\
\;\; \underline{\;\;x^3 - \;\;3x^2}\\ \underline{x^3 - 3x^2 {\color{White} {} + 0x - 4}}\\
+x^2 + 0x {\color{White} {} - 4}\\
\qquad\qquad\quad\; -9x^2 + 0x\\
\qquad\qquad\quad\; \underline{-9x^2 + 27x}\\ \underline{+x^2 - 3x {\color{White} {} - 4}}\\
+3x - 4\\
\qquad\qquad\qquad\qquad\qquad -27x - 42\\
\qquad\qquad\qquad\qquad\qquad \underline{-27x + 81}\\ \underline{+3x - 9}\\
+5
\qquad\qquad\qquad\qquad\qquad\qquad\;\; -123
\end{matrix} \end{array}
</math></li> </math>
</li>
</ol> </ol>


The polynomial above the bar is the quotient, and the number left over (&minus;123) is the remainder. The polynomial above the bar is the quotient ''q''(''x''), and the number left over (5) is the remainder ''r''(''x'').


:<math>\frac{x^3 - 12x^2 - 42}{x-3} = x^2 - 9x - 27 - \frac{123}{x-3}</math> :<math>{x^3 - 2x^2 - 4} = (x-3)\,\underbrace{(x^2 + x + 3)}_{q(x)} +\underbrace{5}_{r(x)}</math>


The ] algorithm learned in elementary arithmetic classes can be viewed as a special case of the above algorithm. The ] algorithm for arithmetic is very similar to the above algorithm, in which the variable ''x'' is replaced (in base 10) by the specific number 10.


=== Polynomial short division===
== Synthetic division ==
Blomqvist's method<ref>Archived at {{cbignore}} and the {{cbignore}}: {{Citation|title=Blomqvist's division: the simplest method for solving divisions?|url=https://www.youtube.com/watch?v=Ad16hxs809I|language=en|access-date=2019-12-10}}{{cbignore}}</ref> is an abbreviated version of the long division above. This pen-and-paper method uses the same algorithm as polynomial long division, but ] is used to determine remainders. This requires less writing, and can therefore be a faster method once mastered.
{{main|Ruffini's rule}}


The division is at first written in a similar way as long multiplication with the dividend at the top, and the divisor below it. The quotient is to be written below the bar from left to right.
] is a method of performing polynomial long division without having to maintain long records of the process of long division as above, though the processes are still the same. It, however, only deals with division by ] linear polynomials -- that is, binomials of the form (''x''-''b''), where ''b'' is any rational number.


:<math>\begin{matrix} \qquad \qquad x^3-2x^2+{0x}-4 \\ \underline{ \div \quad \qquad \qquad \qquad \qquad x-3 }\end{matrix}</math>
The change of sign of ''b'' when divding by (''x''&nbsp;+&nbsp;''b'') (i.e. &minus;''b'' is written to the left of the bar rather than ''b'') allows us to do additions rather than subtractions that are found in regular long division. This reduces the chance for error when the division is done by hand.


Divide the first term of the dividend by the highest term of the divisor (''x''<sup>3</sup> ÷ ''x'' = ''x''<sup>2</sup>). Place the result below the bar. ''x''<sup>3</sup> has been divided leaving no remainder, and can therefore be marked as used by crossing it out. The result ''x''<sup>2</sup> is then multiplied by the second term in the divisor −3 = −3''x''<sup>2</sup>. Determine the partial remainder by subtracting −2''x''<sup>2</sup> − (−3''x''<sup>2</sup>) = ''x''<sup>2</sup>. Mark −2''x''<sup>2</sup> as used and place the new remainder ''x''<sup>2</sup> above it.
Synthetic division is also called ] and was described by ] in 1809.


:<math>\begin{matrix} \qquad x^2 \\ \qquad \quad \bcancel{x^3}+\bcancel{-2x^2}+{0x}-4 \\ \underline{ \div \qquad \qquad \qquad \qquad \qquad x-3 }\\x^2 \qquad \qquad \end{matrix}
Performing the same example as before:
</math>
:<math>x-3\overline{\vert x^3 - 12x^2 + 0x - 42}</math>


Divide the highest term of the remainder by the highest term of the divisor (''x''<sup>2</sup> ÷ ''x'' = ''x''). Place the result (+x) below the bar. ''x''<sup>2</sup> has been divided leaving no remainder, and can therefore be marked as used. The result ''x'' is then multiplied by the second term in the divisor −3 = −3''x''. Determine the partial remainder by subtracting 0''x'' − (−3''x'') = 3''x''. Mark 0''x'' as used and place the new remainder 3''x'' above it.
We concern ourselves basically with the coefficients.
We write
:<math>\begin{matrix}
3 & | & 1 & -12& 0 & -42
\end{matrix}</math>


:<math>\begin{matrix} \qquad \qquad \quad\bcancel{x^2} \quad3x\\ \qquad \quad \bcancel{x^3}+\bcancel{-2x^2}+\bcancel{0x}-4 \\ \underline{ \div \qquad \qquad \qquad \qquad \qquad x-3 }\\x^2 +x \qquad \end{matrix}
Note the change of sign from &minus;3 to 3, the sign doesn't actually change, the value you are using (3 in this case) is the value that x would have to be in order for the polynomial to equal 0. "Drop" the first coefficient after the bar to the third row.
:<math>\begin{matrix} </math>
3 & | & 1 & -12& 0 & -42 \\
& | & & & & \\
& | & 1 & & & \\
\end{matrix}</math>


Divide the highest term of the remainder by the highest term of the divisor (3x ÷ ''x'' = 3). Place the result (+3) below the bar. 3x has been divided leaving no remainder, and can therefore be marked as used. The result 3 is then multiplied by the second term in the divisor −3 = −9. Determine the partial remainder by subtracting −4 − (−9) = 5. Mark −4 as used and place the new remainder 5 above it.
Multiply the dropped number by the number before the bar, and place it in the next column.
:<math>\begin{matrix}
3 & | & 1 & -12& 0 & -42 \\
& | & & 3 & & \\
& | & 1 & & & \\
\end{matrix}</math>


:<math>\begin{matrix} \quad \qquad \qquad \qquad\bcancel{x^2} \quad \bcancel{3x} \quad5\\
Perform an addition in that column.
\qquad \quad \bcancel{x^3}+\bcancel{-2x^2}+\bcancel{0x}\bcancel{-4} \\
:<math>\begin{matrix}
\underline{ \div \qquad \qquad \qquad \qquad \qquad x-3 }\\
3 & | & 1 & -12& 0 & -42 \\
x^2 +x +3\qquad \end{matrix}
& | & & 3 & & \\
</math>
& | & 1 & -9 & & \\
\end{matrix}</math>


The polynomial below the bar is the quotient ''q''(''x''), and the number left over (5) is the remainder ''r''(''x'').
Repeat the previous two steps, the following is obtained
:<math>\begin{matrix}
3 & | & 1 & -12& 0 & -42 \\
& | & & 3 & -27 & -81 \\
& | & 1 & -9 & -27 & -123 \\
\end{matrix}</math>


==Pseudocode==
All the numbers on the last row besides the farthest right correspond to coefficients in the quotient; the last number indicates a remainder. The terms are written with increasing degree from right to left, starting to the left of the remainder with degree 0.


The algorithm can be represented in ] as follows, where +, −, and × represent polynomial arithmetic, and lead(r) / lead(d) represents the polynomial obtained by dividing the two leading terms:
The result of our division is:
:<math>\frac{x^3 - 12x^2 - 42}{x - 3} = x^2 - 9x - 27 - \frac{123}{x - 3}</math>


'''function''' n / d '''is'''
== Higher degree synthetic division ==
require d ≠ 0
The technique of synthetic division described above works only with linear denominators. A similar shortcut method exists for dividing by a quadratic or higher degree monic polynomial.
q ← 0
r ← n // At each step n = d × q + r
'''while''' r ≠ 0 '''and''' degree(r) ≥ degree(d) '''do'''
t ← lead(r) / lead(d) // Divide the leading terms
q ← q + t
r ← r − t × d
'''return''' (q, r)


This works equally well when degree(''n'') < degree(''d''); in that case the result is just the trivial (0, ''n'').
For instance, let's try to perform the following division:
:<math>\frac{x^3 - 12x^2 - 42}{x^2 + x - 3}</math>


This algorithm describes exactly the above paper and pencil method: {{var|d}} is written on the left of the ")"; {{var|q}} is written, term after term, above the horizontal line, the last term being the value of {{var|t}}; the region under the horizontal line is used to compute and write down the successive values of {{var|r}}.
Create the table as with ordinary synthetic division, using the negative coefficients of the denominator following the leading term. We write


== Euclidean division ==
:<math>\begin{matrix}
{{anchor|Division transformation}}
-1 & 3 & | & 1 & -12& 0 & -42
{{main|Euclidean division of polynomials}}
\end{matrix}</math>
For every pair of polynomials (''A'', ''B'') such that ''B'' ≠ 0, polynomial division provides a ''quotient'' ''Q'' and a ''remainder'' ''R'' such that
:<math>A=BQ+R,</math>
and either ''R''=0 or degree(''R'') < degree(''B''). Moreover (''Q'', ''R'') is the unique pair of polynomials having this property.


The process of getting the uniquely defined polynomials ''Q'' and ''R'' from ''A'' and ''B'' is called ''Euclidean division'' (sometimes ''division transformation''). Polynomial long division is thus an ] for Euclidean division.<ref>{{cite book|author=S. Barnard|title=Higher Algebra|year=2008|publisher=READ BOOKS|isbn=978-1-4437-3086-0|page=24}}</ref>
Next, underline the leading coefficient of the right-hand side, multiply it by the left-hand coefficients and write the products beneath the next columns on the right.


==Applications==
:<math>\begin{matrix}
-1 & 3 & | & \underline{1} & -12& 0 & -42 \\
& & | & & -1& 3 & \\
\end{matrix}</math>


===Factoring polynomials===
Now perform an addition:


Sometimes one or more roots of a polynomial are known, perhaps having been found using the ]. If one root ''r'' of a polynomial ''P''(''x'') of degree ''n'' is known then polynomial long division can be used to factor ''P''(''x'') into the form {{nowrap|(''x'' − ''r'')''Q''(''x'')}} where ''Q''(''x'') is a polynomial of degree ''n'' − 1. ''Q''(''x'') is simply the quotient obtained from the division process; since ''r'' is known to be a root of ''P''(''x''), it is known that the remainder must be zero.
:<math>\begin{matrix}
-1 & 3 & | & \underline{1} & -12& 0 & -42 \\
& & | & & -1& 3 & \\
& & | & & -13& 3 & -42 \\
\end{matrix}</math>


Likewise, if several roots ''r'', ''s'', . . . of ''P''(''x'') are known, a linear factor {{nowrap|(''x'' − ''r'')}} can be divided out to obtain ''Q''(''x''), and then {{nowrap|(''x'' − ''s'')}} can be divided out of ''Q''(''x''), etc. Alternatively, the quadratic factor <math>(x-r)(x-s)=x^2-(r{+}s)x+rs</math> can be divided out of ''P''(''x'') to obtain a quotient of degree {{nowrap|''n'' − 2.}}
Repeat the preceding two steps upon the bottom row of the right-hand side.
:<math>\begin{matrix}
-1 & 3 & | & \underline{1} & -12& 0 & -42 \\
& & | & & -1& 3 & \\
& & | & & \underline{-13}& 3 & -42 \\
& & | & & & 13 & -39 \\
& & | & & & 16 & -81 \\
\end{matrix}</math>


This method is especially useful for cubic polynomials, and sometimes all the roots of a higher-degree polynomial can be obtained. For example, if the rational root theorem produces a single (rational) root of a ], it can be factored out to obtain a quartic (fourth degree) quotient; the explicit formula for the roots of a ] can then be used to find the other four roots of the quintic. There is, however, no general way to solve a quintic by purely algebraic methods, see ].
The underlined numbers correspond to the coefficients of the quotient, the remaining numbers in the bottom row correspond to the coefficients of the remainder. The terms are written with increasing degree from right to left, with the last terms of the quotient and remainder each having degree 0.


===Finding tangents to polynomial functions===
The result of our division is

:<math>\frac{x^3 - 12x^2 - 42}{x^2 + x - 3} = x - 13 + \frac{16x - 81}{x^2 + x - 3}.</math>
Polynomial long division can be used to find the equation of the line that is ] to the ] defined by the polynomial ''P''(''x'') at a particular point {{nowrap|''x'' {{=}} ''r''.}}<ref>Strickland-Constable, Charles, "A simple method for finding tangents to polynomial graphs", '']'' 89, November 2005: 466-467.</ref> If ''R''(''x'') is the remainder of the division of ''P''(''x'') by {{nowrap|(''x'' – ''r'')<sup>2</sup>,}} then the equation of the tangent line at {{nowrap|''x'' {{=}} ''r''}} to the graph of the function {{nowrap|''y'' {{=}} ''P''(''x'')}} is {{nowrap|''y'' {{=}} ''R''(''x''),}} regardless of whether or not ''r'' is a root of the polynomial.

====Example====
Find the equation of the line that is tangent to the following curve
<math>y = (x^3 - 12x^2 - 42) </math>
:at: <math>x = 1 </math>
Begin by dividing the polynomial by:
<math> (x-1)^2=(x^2-2x+1)</math>

: <math>
\begin{array}{r}
x - 10\\
x^2-2x+1\ \overline{)\ x^3 - 12x^2 + 0x - 42}\\
\underline{x^3 - {\color{White}0}2x^2 + {\color{White}1}x} {\color{White} {} - 42}\\
-10x^2 - {\color{White}01}x - 42\\
\underline{-10x^2 + 20x - 10}\\
-21x - 32
\end{array}
</math>
The tangent line is
<math> y=(-21x-32)</math>

===Cyclic redundancy check===

A ] uses the remainder of polynomial division to detect errors in transmitted messages.


==See also== ==See also==
*] *]
*], a more concise method of performing Euclidean polynomial division
*]
*]
*] *]
* ] *]

* Step By Step Long Polynomial Division
==References==
{{reflist}}

{{Polynomials}}


] ]
] ]
] ]

]
]
]
]
]
]
]
]
]

Latest revision as of 03:53, 3 December 2024

Algorithm for division of polynomials For a shorthand version of this method, see synthetic division.

In algebra, polynomial long division is an algorithm for dividing a polynomial by another polynomial of the same or lower degree, a generalized 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. Sometimes using a shorthand version called synthetic division is faster, with less writing and fewer calculations. Another abbreviated method is polynomial short division (Blomqvist's method).

Polynomial long division is an algorithm that implements the Euclidean division of polynomials, which starting from two polynomials A (the dividend) and B (the divisor) produces, if B is not zero, a quotient Q and a remainder R such that

A = BQ + R,

and either R = 0 or the degree of R is lower than the degree of B. These conditions uniquely define Q and R, which means that Q and R do not depend on the method used to compute them.

The result R = 0 occurs if and only if the polynomial A has B as a factor. Thus long division is a means for testing whether one polynomial has another as a factor, and, if it does, for factoring it out. For example, if a root r of A is known, it can be factored out by dividing A by (x – r).

Example

Polynomial long division

Find the quotient and the remainder of the division of ( x 3 2 x 2 4 ) {\displaystyle (x^{3}-2x^{2}-4)} , the dividend, by ( x 3 ) {\displaystyle (x-3)} , the divisor.

The dividend is first rewritten like this:

x 3 2 x 2 + 0 x 4. {\displaystyle x^{3}-2x^{2}+0x-4.}

The quotient and remainder can then be determined as follows:

  1. Divide the first term of the dividend by the highest term of the divisor (meaning the one with the highest power of x, which in this case is x). Place the result above the bar (x ÷ x = x).
    x 3   )   x 3 2 x 2 x 3   )   x 3 2 x 2 + 0 x 4 ¯ {\displaystyle {\begin{array}{l}{\color {White}x-3\ )\ x^{3}-2}x^{2}\\x-3\ {\overline {)\ x^{3}-2x^{2}+0x-4}}\end{array}}}
  2. Multiply the divisor by the result just obtained (the first term of the eventual quotient). Write the result under the first two terms of the dividend (x · (x − 3) = x − 3x).
    x 3   )   x 3 2 x 2 x 3   )   x 3 2 x 2 + 0 x 4 ¯ x 3   )   x 3 3 x 2 {\displaystyle {\begin{array}{l}{\color {White}x-3\ )\ x^{3}-2}x^{2}\\x-3\ {\overline {)\ x^{3}-2x^{2}+0x-4}}\\{\color {White}x-3\ )\ }x^{3}-3x^{2}\end{array}}}
  3. Subtract the product just obtained from the appropriate terms of the original dividend (being careful that subtracting something having a minus sign is equivalent to adding something having a plus sign), and write the result underneath (x − 2x) − (x − 3x) = −2x + 3x = x Then, "bring down" the next term from the dividend.
    x 3   )   x 3 2 x 2 x 3   )   x 3 2 x 2 + 0 x 4 ¯ x 3   )   x 3 3 x 2 _ x 3   )   0 x 3 + x 2 + 0 x {\displaystyle {\begin{array}{l}{\color {White}x-3\ )\ x^{3}-2}x^{2}\\x-3\ {\overline {)\ x^{3}-2x^{2}+0x-4}}\\{\color {White}x-3\ )\ }{\underline {x^{3}-3x^{2}}}\\{\color {White}x-3\ )\ 0x^{3}}+{\color {White}}x^{2}+0x\end{array}}}
  4. Repeat the previous three steps, except this time use the two terms that have just been written as the dividend.
    x 2 + 1 x + 3 x 3   )   x 3 2 x 2 + 0 x 4 ¯ x 3 3 x 2 + 0 x 4 _ + x 2 + 0 x 4 + x 2 3 x 4 _ + 3 x 4 {\displaystyle {\begin{array}{r}x^{2}+{\color {White}1}x{\color {White}{}+3}\\x-3\ {\overline {)\ x^{3}-2x^{2}+0x-4}}\\{\underline {x^{3}-3x^{2}{\color {White}{}+0x-4}}}\\+x^{2}+0x{\color {White}{}-4}\\{\underline {+x^{2}-3x{\color {White}{}-4}}}\\+3x-4\\\end{array}}}
  5. Repeat step 4. This time, there is nothing to "bring down".
    x 2 + 1 x + 3 x 3   )   x 3 2 x 2 + 0 x 4 ¯ x 3 3 x 2 + 0 x 4 _ + x 2 + 0 x 4 + x 2 3 x 4 _ + 3 x 4 + 3 x 9 _ + 5 {\displaystyle {\begin{array}{r}x^{2}+{\color {White}1}x+3\\x-3\ {\overline {)\ x^{3}-2x^{2}+0x-4}}\\{\underline {x^{3}-3x^{2}{\color {White}{}+0x-4}}}\\+x^{2}+0x{\color {White}{}-4}\\{\underline {+x^{2}-3x{\color {White}{}-4}}}\\+3x-4\\{\underline {+3x-9}}\\+5\end{array}}}

The polynomial above the bar is the quotient q(x), and the number left over (5) is the remainder r(x).

x 3 2 x 2 4 = ( x 3 ) ( x 2 + x + 3 ) q ( x ) + 5 r ( x ) {\displaystyle {x^{3}-2x^{2}-4}=(x-3)\,\underbrace {(x^{2}+x+3)} _{q(x)}+\underbrace {5} _{r(x)}}

The long division algorithm for arithmetic is very similar to the above algorithm, in which the variable x is replaced (in base 10) by the specific number 10.

Polynomial short division

Blomqvist's method is an abbreviated version of the long division above. This pen-and-paper method uses the same algorithm as polynomial long division, but mental calculation is used to determine remainders. This requires less writing, and can therefore be a faster method once mastered.

The division is at first written in a similar way as long multiplication with the dividend at the top, and the divisor below it. The quotient is to be written below the bar from left to right.

x 3 2 x 2 + 0 x 4 ÷ x 3 _ {\displaystyle {\begin{matrix}\qquad \qquad x^{3}-2x^{2}+{0x}-4\\{\underline {\div \quad \qquad \qquad \qquad \qquad x-3}}\end{matrix}}}

Divide the first term of the dividend by the highest term of the divisor (x ÷ x = x). Place the result below the bar. x has been divided leaving no remainder, and can therefore be marked as used by crossing it out. The result x is then multiplied by the second term in the divisor −3 = −3x. Determine the partial remainder by subtracting −2x − (−3x) = x. Mark −2x as used and place the new remainder x above it.

x 2 x 3 + 2 x 2 + 0 x 4 ÷ x 3 _ x 2 {\displaystyle {\begin{matrix}\qquad x^{2}\\\qquad \quad {\bcancel {x^{3}}}+{\bcancel {-2x^{2}}}+{0x}-4\\{\underline {\div \qquad \qquad \qquad \qquad \qquad x-3}}\\x^{2}\qquad \qquad \end{matrix}}}

Divide the highest term of the remainder by the highest term of the divisor (x ÷ x = x). Place the result (+x) below the bar. x has been divided leaving no remainder, and can therefore be marked as used. The result x is then multiplied by the second term in the divisor −3 = −3x. Determine the partial remainder by subtracting 0x − (−3x) = 3x. Mark 0x as used and place the new remainder 3x above it.

x 2 3 x x 3 + 2 x 2 + 0 x 4 ÷ x 3 _ x 2 + x {\displaystyle {\begin{matrix}\qquad \qquad \quad {\bcancel {x^{2}}}\quad 3x\\\qquad \quad {\bcancel {x^{3}}}+{\bcancel {-2x^{2}}}+{\bcancel {0x}}-4\\{\underline {\div \qquad \qquad \qquad \qquad \qquad x-3}}\\x^{2}+x\qquad \end{matrix}}}

Divide the highest term of the remainder by the highest term of the divisor (3x ÷ x = 3). Place the result (+3) below the bar. 3x has been divided leaving no remainder, and can therefore be marked as used. The result 3 is then multiplied by the second term in the divisor −3 = −9. Determine the partial remainder by subtracting −4 − (−9) = 5. Mark −4 as used and place the new remainder 5 above it.

x 2 3 x 5 x 3 + 2 x 2 + 0 x 4 ÷ x 3 _ x 2 + x + 3 {\displaystyle {\begin{matrix}\quad \qquad \qquad \qquad {\bcancel {x^{2}}}\quad {\bcancel {3x}}\quad 5\\\qquad \quad {\bcancel {x^{3}}}+{\bcancel {-2x^{2}}}+{\bcancel {0x}}{\bcancel {-4}}\\{\underline {\div \qquad \qquad \qquad \qquad \qquad x-3}}\\x^{2}+x+3\qquad \end{matrix}}}

The polynomial below the bar is the quotient q(x), and the number left over (5) is the remainder r(x).

Pseudocode

The algorithm can be represented in pseudocode as follows, where +, −, and × represent polynomial arithmetic, and lead(r) / lead(d) represents the polynomial obtained by dividing the two leading terms:

function n / d is
    require d ≠ 0
    q ← 0
    r ← n             // At each step n = d × q + r
    while r ≠ 0 and degree(r) ≥ degree(d) do
        t ← lead(r) / lead(d)       // Divide the leading terms
        q ← q + t
        r ← r − t × d
    return (q, r)

This works equally well when degree(n) < degree(d); in that case the result is just the trivial (0, n).

This algorithm describes exactly the above paper and pencil method: d is written on the left of the ")"; q is written, term after term, above the horizontal line, the last term being the value of t; the region under the horizontal line is used to compute and write down the successive values of r.

Euclidean division

Main article: Euclidean division of polynomials

For every pair of polynomials (A, B) such that B ≠ 0, polynomial division provides a quotient Q and a remainder R such that

A = B Q + R , {\displaystyle A=BQ+R,}

and either R=0 or degree(R) < degree(B). Moreover (Q, R) is the unique pair of polynomials having this property.

The process of getting the uniquely defined polynomials Q and R from A and B is called Euclidean division (sometimes division transformation). Polynomial long division is thus an algorithm for Euclidean division.

Applications

Factoring polynomials

Sometimes one or more roots of a polynomial are known, perhaps having been found using the rational root theorem. If one root r of a polynomial P(x) of degree n is known then polynomial long division can be used to factor P(x) into the form (xr)Q(x) where Q(x) is a polynomial of degree n − 1. Q(x) is simply the quotient obtained from the division process; since r is known to be a root of P(x), it is known that the remainder must be zero.

Likewise, if several roots r, s, . . . of P(x) are known, a linear factor (xr) can be divided out to obtain Q(x), and then (xs) can be divided out of Q(x), etc. Alternatively, the quadratic factor ( x r ) ( x s ) = x 2 ( r + s ) x + r s {\displaystyle (x-r)(x-s)=x^{2}-(r{+}s)x+rs} can be divided out of P(x) to obtain a quotient of degree n − 2.

This method is especially useful for cubic polynomials, and sometimes all the roots of a higher-degree polynomial can be obtained. For example, if the rational root theorem produces a single (rational) root of a quintic polynomial, it can be factored out to obtain a quartic (fourth degree) quotient; the explicit formula for the roots of a quartic polynomial can then be used to find the other four roots of the quintic. There is, however, no general way to solve a quintic by purely algebraic methods, see Abel–Ruffini theorem.

Finding tangents to polynomial functions

Polynomial long division can be used to find the equation of the line that is tangent to the graph of the function defined by the polynomial P(x) at a particular point x = r. If R(x) is the remainder of the division of P(x) by (xr), then the equation of the tangent line at x = r to the graph of the function y = P(x) is y = R(x), regardless of whether or not r is a root of the polynomial.

Example

Find the equation of the line that is tangent to the following curve y = ( x 3 12 x 2 42 ) {\displaystyle y=(x^{3}-12x^{2}-42)}

at: x = 1 {\displaystyle x=1}

Begin by dividing the polynomial by: ( x 1 ) 2 = ( x 2 2 x + 1 ) {\displaystyle (x-1)^{2}=(x^{2}-2x+1)}

x 10 x 2 2 x + 1   )   x 3 12 x 2 + 0 x 42 ¯ x 3 0 2 x 2 + 1 x _ 42 10 x 2 01 x 42 10 x 2 + 20 x 10 _ 21 x 32 {\displaystyle {\begin{array}{r}x-10\\x^{2}-2x+1\ {\overline {)\ x^{3}-12x^{2}+0x-42}}\\{\underline {x^{3}-{\color {White}0}2x^{2}+{\color {White}1}x}}{\color {White}{}-42}\\-10x^{2}-{\color {White}01}x-42\\{\underline {-10x^{2}+20x-10}}\\-21x-32\end{array}}}

The tangent line is y = ( 21 x 32 ) {\displaystyle y=(-21x-32)}

Cyclic redundancy check

A cyclic redundancy check uses the remainder of polynomial division to detect errors in transmitted messages.

See also

References

  1. Archived at Ghostarchive and the Wayback Machine: Blomqvist's division: the simplest method for solving divisions?, retrieved 2019-12-10
  2. S. Barnard (2008). Higher Algebra. READ BOOKS. p. 24. ISBN 978-1-4437-3086-0.
  3. Strickland-Constable, Charles, "A simple method for finding tangents to polynomial graphs", Mathematical Gazette 89, November 2005: 466-467.
Polynomials and polynomial functions
By degree
By properties
Tools and algorithms
Categories: