Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Polynomial long division

From Wikipedia, the free encyclopedia
Algorithm for division of polynomials
For a shorthand version of this method, seesynthetic division.

Inalgebra,polynomial long division is analgorithm for dividing apolynomial by another polynomial of the same or lowerdegree, a generalized version of the familiar arithmetic technique calledlong division. It can be done easily by hand, because it separates an otherwise complex division problem into smaller ones. Polynomial long division is an algorithm that implements theEuclidean division of polynomials: starting from two polynomialsA (thedividend) andB (thedivisor) produces, ifB is not zero, aquotientQ and aremainderR such that

A =BQ +R,

and eitherR = 0 or the degree ofR is lower than the degree ofB. These conditions uniquely defineQ andR; the resultR = 0 occursif and only if the polynomialA hasB as afactor. Thus long division is a means for testing whether one polynomial has another as a factor, and, if it does, for factoring it out.

Sometimes using a shorthand version calledsynthetic division is faster, with less writing and fewer calculations, especially when the divisor is a linear polynomial.

Polynomial long division is possible provided that the coefficients of the polynomials belong to the samefield, meaning that division by nonzero elements is always possible; examples of fields include therational numbers,real numbers, andcomplex numbers.

Example

[edit]

Find the quotient and the remainder of the division of(x32x24){\displaystyle (x^{3}-2x^{2}-4)}, thedividend, by(x3){\displaystyle (x-3)}, thedivisor.

The dividend is first rewritten like this:

x32x2+0x4.{\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 ofx, which in this case isx). Place the result above the bar:x3÷x=x2{\displaystyle x^{3}\div x=x^{2}}.
    x3 ) x32x2x3 ) x32x2+0x4¯{\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:x2(x3)=x33x2{\displaystyle x^{2}\cdot (x-3)=x^{3}-3x^{2}}.
    x3 ) x32x2x3 ) x32x2+0x4¯x3 ) x33x2{\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(x32x2)(x33x2)=2x2+3x2=x2{\displaystyle \left(x^{3}-2x^{2}\right)-\left(x^{3}-3x^{2}\right)=-2x^{2}+3x^{2}=x^{2}}. Then, bring down the next term from the dividend.
    x3 ) x32x2x3 ) x32x2+0x4¯x3 ) x33x2_x3 ) 0x3+x2+0x{\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.
    x2+1x+3x3 ) x32x2+0x4¯x33x2+0x4_+x2+0x4+x23x4_+3x4{\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.
    x2+1x+3x3 ) x32x2+0x4¯x33x2+0x4_+x2+0x4+x23x4_+3x4+3x9_+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 quotientq(x), and the number left over, 5, is the remainderr(x).

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

or alternatively

x32x24x3=x2+x+3q(x)+5r(x)x3{\displaystyle {\frac {x^{3}-2x^{2}-4}{x-3}}=\underbrace {x^{2}+x+3} _{q(x)}+{\frac {\overbrace {5} ^{r(x)}}{x-3}}}

Thelong division algorithm for arithmetic is very similar to the above algorithm, in which the variablex is replaced (in base 10) by the specific number 10, and with the additional restriction that all coefficients must be non-negative.

Pseudocode

[edit]

The algorithm can be represented inpseudocode as follows, where+,, and× represent polynomial arithmetic, lead is a function returning the leading term (the term of the highest degree) of a given polynomial as a function input argument, andlead(remainder) / lead(denominator) gives the polynomial obtained by dividing the two leading terms:

function numerator / denominatoris    require denominator ≠ 0    quotient ← 0    remainder ← numerator  // At each step numerator = denominator × quotient + remainderwhile remainder ≠ 0and degree(remainder) ≥ degree(denominator)do        tmp ← lead(remainder) / lead(denominator)       // Divide the leading terms        quotient ← quotient + tmp        remainder ← remainder − tmp × denominatorreturn (quotient, remainder)

This works equally well whendegree(numerator) < degree(denominator); in that case the result is just the trivial(0, numerator), the while loop is never entered.

This algorithm describes exactly theabove paper and pencil method:denominator is written on the left of the ")";quotient is written, term after term, above the horizontal line,tmp stores the last term of the quotient in each loop repetition; the region under the horizontal line is used to compute and write down the successive values ofremainder.

Euclidean division

[edit]

Main article:Euclidean division of polynomials

For every pair of polynomials (A,B) such thatB ≠ 0, polynomial division provides a quotientQ and a remainderR such that

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

and eitherR = 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 polynomialsQ andR fromA andB is calledEuclidean division (sometimesdivision transformation). Polynomial long division is thus analgorithm for Euclidean division.[1]

Applications

[edit]

Factoring polynomials

[edit]

Sometimes one or more roots of a polynomial are known, perhaps having been found using therational root theorem. If one rootr of a polynomialP(x) of degreen is known then polynomial long division can be used to factorP(x) into the form(xr)Q(x) whereQ(x) is a polynomial of degreen − 1.Q(x) is simply the quotient obtained from the division process; sincer is known to be a root ofP(x), it is known that the remainder must be zero.

Likewise, if several rootsr,s, . . . ofP(x) are known, a linear factor(xr) can be divided out to obtainQ(x), and then(xs) can be divided out ofQ(x), etc.[a] Alternatively, the quadratic factor(xr)(xs)=x2(r+s)x+rs{\displaystyle (x-r)(x-s)=x^{2}-(r{+}s)x+rs} can be divided out ofP(x) to obtain a quotient of degreen − 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 aquintic polynomial (degree five), it can be factored out to obtain a quartic (fourth degree) quotient; the explicit formula for the roots of aquartic 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, seeAbel–Ruffini theorem.

Finding tangents to polynomial functions

[edit]

Polynomial long division can be used to find the equation of the line that istangent to thegraph of the function defined by the polynomialP(x) at a particular pointx =r.[2] IfR(x) is the remainder of the division ofP(x) by(xr)2, then the equation of the tangent line atx =r to the graph of the functiony =P(x) isy =R(x), regardless of whether or notr is a root of the polynomial.

Example

[edit]

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

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

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

x10x22x+1 ) x312x2+0x42¯x302x2+1x_4210x201x4210x2+20x10_21x32{\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 isy=(21x32){\displaystyle y=(-21x-32)}

Cyclic redundancy check

[edit]

Acyclic redundancy check uses the remainder of polynomial division to detect errors in transmitted messages.[citation needed]

Synthetic division

[edit]
Main article:Synthetic division

When the divisor is amonic polynomial of degree 1, the method of synthetic division is an alternative to long division that requires less writing and fewer calculations. To divide a polynomialf(x)=anxn+an1xn1++a1x+a0{\displaystyle f(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\ldots +a_{1}x+a_{0}} by the monic linear polynomialxc{\displaystyle x-c} using synthetic division, one writes a three-row array with the coefficients off(x){\displaystyle f(x)} in the top row. The leading coefficientan{\displaystyle a_{n}} drops to the bottom row, and its product withc{\displaystyle c} is written in the second row below the second coefficientan1{\displaystyle a_{n-1}}. These two are added, their sum placed in the third row, and its product withc{\displaystyle c} written in the second row belowan2{\displaystyle a_{n-2}}; and so on. For example, the table generated for the division ofx312x2+24{\displaystyle x^{3}-12x^{2}+24} byx3{\displaystyle x-3} is generated in the following steps: from the initial arrangement3 112024{\displaystyle {\begin{array}{cc}{\begin{array}{r}\\3\\\end{array}}&{\begin{array}{|rrrr}\ 1&-12&0&24\\&&&\\\hline \end{array}}\end{array}}}the first step produces311202431{\displaystyle {\begin{array}{cc}{\begin{array}{r}\\3\\\\\end{array}}&{\begin{array}{|rrrr}1&-12&0&24\\&3&&\\\hline 1&&&\\\end{array}}\end{array}}}The subsequent addition and multiplication steps result in311202432719{\displaystyle {\begin{array}{cc}{\begin{array}{r}\\3\\\\\end{array}}&{\begin{array}{|rrrr}1&-12&0&24\\&3&-27&\\\hline 1&-9&&\\\end{array}}\end{array}}}Repeating the process results in the final table311202432781192757{\displaystyle {\begin{array}{cc}{\begin{array}{r}\\3\\\\\end{array}}&{\begin{array}{|rrrr}1&-12&0&24\\&3&-27&-81\\\hline 1&-9&-27&-57\\\end{array}}\end{array}}}which records the divisionx312x2+24=(x3)(x29x27)57{\displaystyle x^{3}-12x^{2}+24=(x-3)(x^{2}-9x-27)-57}.

See also

[edit]

References

[edit]
  1. ^S. Barnard (2008).Higher Algebra. READ BOOKS. p. 24.ISBN 978-1-4437-3086-0.
  2. ^Strickland-Constable, Charles, "A simple method for finding tangents to polynomial graphs",Mathematical Gazette 89, November 2005: 466-467.

Note

[edit]
  1. ^Because s is a root of P(x), P(s) = (s - r)Q(s) = 0, so s is a root of Q(x) (assuming that r and s are not equal). Thus, Q(x) can be factored such as Q(x) = (x - s)Q'(x) where Q'(x) is the quotient of dividing Q(x) by (x - s).
Bydegree
By properties
Tools and algorithms
Retrieved from "https://en.wikipedia.org/w/index.php?title=Polynomial_long_division&oldid=1336431110"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp