long division

24
Long division From Wikipedia, the free encyclopedia

Upload: man

Post on 17-Aug-2015

28 views

Category:

Documents


12 download

DESCRIPTION

1. From Wikipedia, the free encyclopedia2. Lexicographical order

TRANSCRIPT

Long divisionFrom Wikipedia, the free encyclopediaContents1 Long division 11.1 Place in education. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2.1 Basic procedure for long division of n m. . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Example with multi-digit divisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.3 Mixed mode long division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.4 Non-decimal radix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.5 Interpretation of decimal results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Notation in non-English-speaking countries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3.1 Latin America . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3.2 Europe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 Generalizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4.1 Rational numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4.2 Polynomials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.7 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Polynomial long division 72.1 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Pseudo-code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3 Euclidean division. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4 Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.1 Factoring polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.2 Finding tangents to polynomial functions. . . . . . . . . . . . . . . . . . . . . . . . . . . 92.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Polynomial remainder theorem 113.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12iii CONTENTS3.3 Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Synthetic division 134.1 Regular synthetic division. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 Expanded synthetic division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2.1 For non-monic divisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.2.2 Compact Expanded Synthetic Division. . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.2.3 Python implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.3 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.5 Text and image sources, contributors, and licenses . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5.3 Content license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Chapter 1Long divisionThis article is about elementary handwritten division. For mathematical denition and properties, see Division (math-ematics) and Euclidean division. For software algorithms, see Division algorithm. For other uses, see Long division(disambiguation).In arithmetic, long division is a standard division algorithm suitable for dividing multidigit numbers that is simpleenough to performby hand. It breaks down a division probleminto a series of easier steps. As in all division problems,one number, called the dividend, is divided by another, called the divisor, producing a result called the quotient. Itenables computations involving arbitrarily large numbers to be performed by following a series of simple steps.[1] Theabbreviated form of long division is called short division, which is almost always used instead of long division whenthe divisor has only one digit.Chunking (also known as the partial quotients method or the hangman method) is aless-ecient form of long division which may be easier to understand.1.1 Place in educationInexpensive calculators and computers have become the most common way to solve division problems, eliminatinga traditional mathematical exercise, and decreasing the educational opportunity to show how to do so by paper andpencil techniques. (Internally, those devices use one of a variety of division algorithms). In the United States, longdivision has been especially targeted for de-emphasis, or even elimination from the school curriculum, by reformmathematics, though traditionally introduced in the 4th or 5th grades.1.2 MethodIn English-speaking countries, long division does not use the slash (/) or obelus () signs, instead displaying thedividend, divisor, and (once it is found) quotient in a tableau.The process is begun by dividing the left-most digit of the dividend by the divisor. The quotient (rounded down to aninteger) becomes the rst digit of the result, and the remainder is calculated (this step is notated as a subtraction). Thisremainder carries forward when the process is repeated on the following digit of the dividend (notated as 'bringingdown' the next digit to the remainder). When all digits have been processed and no remainder is left, the process iscomplete.An example is shown below, representing the division of 500 by 4 (with a result of 125).125 (Explanations) 4)500 4 (4 1 = 4) 10 (5 - 4 = 1) 8 (4 2 = 8) 20 (10 - 8 = 2) 20 (4 5 = 20) 0 (20 - 20 = 0) Inthe above example, the rst step is to nd the shortest sequence of digits starting from the left end of the dividend,500, that the divisor 4 goes into at least once; this shortest sequence in this example is simply the rst digit, 5. Thelargest number that the divisor 4 can be multiplied by without exceeding 5 is 1, so the digit 1 is put above the 5 tostart constructing the quotient. Next, the 1 is multiplied by the divisor 4, to obtain the largest whole number (4 inthis case) that is a multiple of the divisor 4 without exceeding the 5; this product of 1 times 4 is 4, so 4 is placedunderneath the 5. Next the 4 under the 5 is subtracted from the 5 to get the remainder, 1, which is placed under the4 under the 5. This remainder 1 is necessarily smaller than the divisor 4. Next the rst as-yet unused digit in the12 CHAPTER 1. LONG DIVISIONAn example of long division performed without a calculator.dividend, in this case the rst digit 0 after the 5, is copied directly underneath itself and next to the remainder 1, toform the number 10. At this point the process is repeated enough times to reach a stopping point: The largest numberby which the divisor 4 can be multiplied without exceeding 10 is 2, so 2 is written above the 0 that is next to the 5 that is, directly above the last digit in the 10. Then the latest entry to the quotient, 2, is multiplied by the divisor 4to get 8, which is the largest multiple of 4 that does not exceed 10; so 8 is written below 10, and the subtraction 10minus 8 is performed to get the remainder 2, which is placed below the 8.This remainder 2 is necessarily smallerthan the divisor 4. The next digit of the dividend (the last 0 in 500) is copied directly below itself and next to theremainder 2, to form 20. Then the largest number by which the divisor 4 can be multiplied without exceeding 20is ascertained; this number is 5, so 5 is placed above the last dividend digit that was brought down (i.e., above therightmost 0 in 500).Then this new quotient digit 5 is multiplied by the divisor 4 to get 20, which is written at thebottom below the existing 20. Then 20 is subtracted from 20, yielding 0, which is written below the 20. We knowwe are done now because two things are true: there are no more digits to bring down from the dividend, and the lastsubtraction result was 0.If the last remainder when we ran out of dividend digits had been something other than 0, there would have been twopossible courses of action. (1) We could just stop there and say that the dividend divided by the divisor is the quotientwritten at the top with the remainder written at the bottom; equivalently we could write the answer as the quotientfollowed by a fraction that is the remainder divided by the divisor. Or, (2) we could extend the dividend by writingit as, say, 500.000... and continue the process (using a decimal point in the quotient directly above the decimal pointin the dividend), in order to get a decimal answer, as in the following example.31.75 4)127.00 12 (12 4 = 3) 07 (0 remainder, bring down next gure) 4 (7 4 = 1 r 3 ) 3.0 (0 is added in orderto make 3 divisible by 4; the 0 is accounted for by adding a decimal point in the quotient.) 2.8 (7 4 = 28) 20 (anadditional zero is brought down) 20 (5 4 = 20) 0In this example, the decimal part of the result is calculated by continuing the process beyond the units digit, bringingdown zeros as being the decimal part of the dividend.This example also illustrates that, at the beginning of the process, a step that produces a zero can be omitted. Sincethe rst digit 1 is less than the divisor 4, the rst step is instead performed on the rst two digits 12. Similarly, if the1.2. METHOD 3divisor were 13, one would perform the rst step on 127 rather than 12 or 1.1.2.1 Basic procedure for long division of n m1. Find the location of all decimal points in the dividend n and divisor m.2. If necessary, simplify the long division problem by moving the decimals of the divisor and dividend by thesame number of decimal places, to the right, (or to the left) so that the decimal of the divisor is to the right ofthe last digit.3. When doing long division, keep the numbers lined up straight from top to bottom under the tableau.4. After each step, be sure the remainder for that step is less than the divisor. If it is not, there are three possibleproblems: the multiplication is wrong, the subtraction is wrong, or a greater quotient is needed.5. In the end, the remainder, r, is added to the growing quotient as a fraction, r/m.1.2.2 Example with multi-digit divisorA divisor of any number of digits can be used. In this example, 37 is to be divided into 1260257. First the problemis set up as follows:37)1260257Digits of the number 1260257 are taken until a number greater than or equal to 37 occurs. So 1 and 12 are less than37, but 126 is greater. Next, the greatest multiple of 37 less than or equal to 126 is computed. So 3 37 = 111 126. The multiple 111 is written underneath the 126 and the 3 is written on the top where thesolution will appear:3 37)1260257 111Note carefully which place-value column these digits are written into. The 3 in the quotient goes in the same column(ten-thousands place) as the 6 in the dividend 1260257, which is the same column as the last digit of 111.The 111 is then subtracted from the line above, ignoring all digits to the right:3 37)1260257 111 15Now the digit from the next smaller place value of the dividend is copied down appended to the result 15:3 37)1260257 111 150The process repeats: the greatest multiple of 37 less than or equal to 150 is subtracted. This is 148 = 4 37, so a 4is added to the solution line. Then the result of the subtraction is extended by another digit taken from the dividend:34 37)1260257 111 150 148 22The greatest multiple of 37 less than or equal to 22 is 0 37 = 0. Subtracting 0 from 22 gives 22, we often don'twrite the subtraction step. Instead, we simply take another digit from the dividend:340 37)1260257 111 150 148 225The process is repeated until 37 divides the last line exactly:4 CHAPTER 1. LONG DIVISION34061 37)1260257 111 150 148 225 222 371.2.3 Mixed mode long divisionFor non-decimal currencies (such as the British sd system before 1971) and measures (such as avoirdupois) mixedmode division must be used. Consider dividing 50 miles 600 yards into 37 pieces:m - yd - ft - in 1 - 634 1 9 r. 15 37) 50 - 600 - 0 - 0 37 22880 66 348 13 23480 66 348 17600 222 37 333 5280128 29 15 22880 111 348 == ===== 170 === 148 22 66 ==Each of the four columns is worked in turn. Starting with the miles: 50/37 = 1 remainder 13. No further division ispossible, so perform a long multiplication by 1,760 to convert miles to yards, the result is 22,880 yards. Carry thisto the top of the yards column and add it to the 600 yards in the dividend giving 23,480. Long division of 23,480 /37 now proceeds as normal yielding 634 with remainder 22. The remainder is multiplied by 3 to get feet and carriedup to the feet column. Long division of the feet gives 1 remainder 29 which is then multiplied by twelve to get 348inches. Long division continues with the nal remainder of 15 inches being shown on the result line.1.2.4 Non-decimal radixThe same method and layout is used for binary, octal and hexadecimal. An address range of 0xf412df divided into0x12 parts is:0d8f45 r. 5 12 ) f412df ea a1 90 112 10e 4d 48 5f 5a 5Binary is of course trivial because each digit in the result can only be 1 or 0:1110 r. 11 1101) 10111001 1101 10100 1101 1110 1101 111.2.5 Interpretation of decimal resultsWhen the quotient is not an integer and the division process is extended beyond the decimal point, one of two thingscan happen. (1) The process can terminate, which means that a remainder of 0 is reached; or (2) a remainder couldbe reached that is identical to a previous remainder that occurred after the decimal points were written. In the lattercase, continuing the process would be pointless, because from that point onward the same sequence of digits wouldappear in the quotient over and over. So a bar is drawn over the repeating sequence to indicate that it repeats forever.1.3 Notation in non-English-speaking countriesChina, Japan and India use the same notation as English-speakers. Elsewhere, the same general principles are used,but the gures are often arranged dierently.1.3.1 Latin AmericaIn Latin America (except Argentina, Mexico, Colombia, Venezuela, Uruguay and Brazil), the calculation is almostexactly the same, but is written down dierently as shown below with the same two examples used above.Usuallythe quotient is written under a bar drawn under the divisor. A long vertical line is sometimes drawn to the right ofthe calculations.500 4 = 125 (Explanations) 4 (4 1 = 4) 10 (5 - 4 = 1) 8 (4 2 = 8) 20 (10 - 8 = 2) 20 (4 5 = 20) 0 (20 - 20 = 0)and127 4 = 31.75 124 30 (a 0 is added in order to make 3 divisible by 4; the 0 is accounted for by adding a decimalpoint in the quotient) 28 (7 4 = 28) 20 (an additional zero is added) 20 (5 4 = 20) 0In Mexico, the US notation is used, except that only the result of the subtraction is annotated and the calculation isdone mentally, as shown below:125 (Explanations) 4)500 10 (5 - 4 = 1) 20 (10 - 8 = 2) 0 (20 - 20 = 0)1.4. GENERALIZATIONS 5In Brazil, Venezuela, Uruguay, Quebec and Colombia, the European notation (see below) is used, except that thequotient is not separated by a vertical line, as shown below:127|4 124 31,75 30 28 20 20 0Same procedure applies in Mexico, only the result of the subtraction is annotated and the calculation is done mentally.1.3.2 EuropeIn Spain, Italy, France, Portugal, Lithuania, Romania, Turkey, Greece, Belgium, and Russia, the divisor is to the rightof the dividend, and separated by a vertical bar. The division also occurs in the column, but the quotient (result) iswritten below the divider, and separated by the horizontal line. The same method is used in Iran.127|4 124|31,75 30 28 20 20 0In France, a long vertical bar separates the dividend and subsequent subtractions from the quotient and divisor, as inthe example below of 6359 divided by 17, which is 374 with a remainder of 1.Decimal numbers are not divided directly, the dividend and divisor are multiplied by a power of ten so that the divisioninvolves two whole numbers. Therefore, if one were dividing 12,7 by 0,4 (commas being used instead of decimalpoints), the dividend and divisor would rst be changed to 127 and 4, and then the division would proceed as above.In Germany, the notation of a normal equation is used for dividend, divisor and quotient (cf.rst section of LatinAmerican countries above, where its done virtually the same way):127 : 4 = 31,75 12 07 4 30 28 20 20 0The same notation is adopted in Denmark, Norway, Macedonia, Poland, Croatia, Slovenia, Hungary, Czech Republic,Slovakia, Vietnam and in Serbia.In the Netherlands, the following notation is used:12 / 135 \ 11,25 12 15 12 30 24 60 60 01.4 Generalizations1.4.1 Rational numbersLong division of integers can easily be extended to include non-integer dividends, as long as they are rational. Thisis because every rational number has a recurring decimal expansion. The procedure can also be extended to includedivisors which have a nite or terminating decimal expansion (i.e. decimal fractions). In this case the procedureinvolves multiplying the divisor and dividend by the appropriate power of ten so that the new divisor is an integer taking advantage of the fact that a b = (ca) (cb) and then proceeding as above.1.4.2 PolynomialsAgeneralised version of this method called polynomial long division is also used for dividing polynomials (sometimesusing a shorthand version called synthetic division).1.5 See alsoArbitrary-precision arithmeticEgyptian multiplication and divisionElementary arithmeticFourier divisionPolynomial long division6 CHAPTER 1. LONG DIVISIONShifting nth root algorithm for nding square root or any nth root of a numberShort division1.6 References[1] Weisstein, Eric W., Long Division, MathWorld.1.7 External linksLong Division Algorithm Long Division and Euclids LemmaChapter 2Polynomial long divisionIn algebra, polynomial long division is an algorithm for dividing a polynomial by another polynomial of the same orlower degree, a generalised version of the familiar arithmetic technique called long division. It can be done easily byhand, because it separates an otherwise complex division problem into smaller ones.Sometimes using a shorthandversion called synthetic division is faster, with less writing and fewer calculations.Polynomial long division is an algorithm that implements the Euclidean division of polynomials, which starting fromtwo polynomials A (the dividend) and B (the divisor) produces, if B is not zero, a quotient Q and a remainder R suchthatA = BQ + R,and either R = 0 or the degree of R is lower than the degree of B. These conditions dene uniquely Q and R, whichmeans that Q and R do not depend on the method used to compute them.2.1 ExampleFind the quotient and the remainder of the division of x3 2x2 4, the dividend, by x 3, the divisor.The dividend is rst rewritten like this:x3 2x2+ 0x 4.The quotient and remainder can then be determined as follows:1. Divide the rst term of the dividend by the highest term of the divisor (meaning the one with the highest powerof x, which in this case is x). Place the result above the bar (x3 x = x2).x2x 3)x3 2x2+ 0x 42. Multiply the divisor by the result just obtained (the rst term of the eventual quotient). Write the result underthe rst two terms of the dividend (x2 (x 3) = x3 3x2).x2x 3)x3 2x2+ 0x 4x3 3x23. Subtract the product just obtained from the appropriate terms of the original dividend (being careful thatsubtracting something having a minus sign is equivalent to adding something having a plus sign), and write the78 CHAPTER 2. POLYNOMIAL LONG DIVISIONresult underneath ((x3 2x2) (x3 3x2) = 2x2+ 3x2= x2). Then, bring down the next term from thedividend.x2x 3)x3 2x2+ 0x 4x3 3x2+x2+ 0x4. Repeat the previous three steps, except this time use the two terms that have just been written as the dividend.x2+ xx 3)x3 2x2+ 0x 4x3 3x2+x2+ 0x+x2 3x+3x 45. Repeat step 4. This time, there is nothing to pull down.x2+x+ 3x 3)x3 2x2+ 0x 4x3 3x2+x2+ 0x+x2 3x+3x 4+3x 9+5The polynomial above the bar is the quotient q(x), and the number left over ( 5) is the remainder r(x).x3 2x2 4 = (x 3)(x2+ x + 3)

q(x)+ 5

r(x)The long division algorithm for arithmetic is very similar to the above algorithm, in which the variable x is replacedby the specic number 10.2.2 Pseudo-codeThe algorithm can be represented in pseudo-code as follows, where +, -, and represent polynomial arithmetic, and/ represents simple division of two terms:function n / d: require d 0 (q, r) (0, n) # At each step n = d q + r while r 0 AND degree(r) degree(d): t lead(r)/lead(d) # Divide the leading terms (q, r) (q + t, r - (t * d)) return (q, r)Note that 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 isused to compute and write down the successive values of r.2.3 Euclidean divisionMain article: Euclidean division of polynomialsFor every pair of polynomials (A, B) such that B 0, polynomial division provides a quotient Q and a remainder Rsuch that2.4. APPLICATIONS 9A = 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 dened polynomials Q and R from A and B is called Euclidean division (some-times division transformation). Polynomial long division is thus an algorithm for Euclidean division.[1]2.4 Applications2.4.1 Factoring polynomialsSometimes 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 (x - r)(Q(x)) where Q(x) is a polynomial of degree n1. Q(x) is simply the quotient obtained from thedivision process; since r is known to be a root of P(x), it is known that the remainder must be zero.Likewise, if more than one root is known, a linear factor (x r) in one of them (r) can be divided out to obtain Q(x),and then a linear term in another root, s, can be divided out of Q(x), etc. Alternatively, they can all be divided out atonce: for example the linear factors x r and x s can be multiplied together to obtain the quadratic factor x2 (r +s)x + rs, which can then be divided into the original polynomial P(x) to obtain a quotient of degree n 2.In this way, sometimes all the roots of a polynomial of degree greater than four can be obtained, even though thatis not always possible.For example, if the rational root theorem can be used to obtain a single (rational) root of aquintic polynomial, it can be factored out to obtain a quartic (fourth degree) quotient; the explicit formula for theroots of a quartic polynomial can then be used to nd the other four roots of the quintic.2.4.2 Finding tangents to polynomial functionsPolynomial long division can be used to nd the equation of the line that is tangent to the graph of the function denedby the polynomial P(x) at a particular point x = r.[2] If R(x) is the remainder of the division of P(x) by (x r )2, thenthe 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 notr is a root of the polynomial.ExampleFind the equation of the line that is tangent to the following curve at x = 1 :y= x3 12x2 42.Begin by dividing the polynomial by (x 1)2= x2 2x + 1 :x 10x2 2x + 1)x3 12x2+ 0x 42x3 2x2+ x10x2x 4210x2+ 20x 1021x 32The tangent line is y= 21x 32.2.5 See alsoPolynomial remainder theoremSynthetic division, a more concise method of performing polynomial long divisionRunis rule10 CHAPTER 2. POLYNOMIAL LONG DIVISIONEuclidean domainGrbner basisGreatest common divisor of two polynomials2.6 Notes[1] S. Barnard (2008). Higher Algebra. READ BOOKS. p. 24. ISBN 1-4437-3086-6.[2] Strickland-Constable, Charles, A simple method for nding tangents to polynomial graphs, Mathematical Gazette 89,November 2005: 466-467.Roe,Spencer and Taylor (2014) http://leicesteripsc.com/index.php?title=Group_3#ReferencesChapter 3Polynomial remainder theoremNot to be confused with Bzouts theorem.In algebra, the polynomial remainder theorem or little Bzouts theorem[1] is an application of Euclidean divisionof polynomials. It states that the remainder of the division of a polynomial f(x) by a linear polynomial xa is equalto f(a). In particular, x a is a divisor of f(x) if and only if f(a) = 0. [2]3.1 Examples3.1.1 Example 1Let f(x)=x3 12x2 42. Polynomial division of f(x)by x 3gives the quotient x2 9x 27and theremainder 123 . Therefore, f(3) = 123 .3.1.2 Example 2Show that the polynomial remainder theorem holds for an arbitrary second degree polynomial f(x) = ax2+bx +cby using algebraic manipulation:f(x)x r=ax2+ bx + cx r=ax2 arx + arx + bx + cx r=ax(x r) + (b + ar)x + cx r= ax +(b + ar)(x r) + c + r(b + ar)x r= ax + b + ar +c + r(b + ar)x r= ax + b + ar +ar2+ br + cx rMultiplying both sides by (x r) givesf(x) = ax2+ bx + c = (ax + b + ar)(x r) + ar2+ br + cSince R = ar2+ br + c is our remainder, we have indeed shown that f(r) = R .1112 CHAPTER 3. POLYNOMIAL REMAINDER THEOREM3.2 ProofThe polynomial remainder theorem follows from the denition of Euclidean division, which, given two polynomialsf(x) (the dividend) and g(x) (the divisor), asserts the existence and the unicity of a quotient q(x) and a remainder r(x)such thatf(x) = q(x)g(x) + r(x) and r(x) = 0 or deg(r) < deg(g) .If we take g(x) = xa as the divisor, either r = 0 or its degree is zero; in both cases, r is a constant that is independentof x; that isf(x) = q(x)(x a) + r .Setting x = a in this formula, we obtain:f(a) = r .3.3 ApplicationsThe polynomial remainder theorem may be used to evaluatef(a) by calculating the remainder, r . Althoughpolynomial long division is more dicult than evaluating the function itself, synthetic division is computationallyeasier.Thus, the function may be more cheaply evaluated using synthetic division and the polynomial remaindertheorem.The factor theorem is another application of the remainder theorem: if the remainder is zero, then the linear divisoris a factor. Repeated application of the factor theorem may be used to factorize the polynomial.[3]3.4 References[1] Piotr Rudnicki (2004). Little Bzout Theorem (Factor Theorem)" (PDF). Formalized Mathematics 12 (1): 4958.[2] Larson, Ron (2014), College Algebra, Cengage Learning[3] Larson, Ron (2011), Precalculus with Limits, Cengage LearningChapter 4Synthetic divisionIn algebra, synthetic division is a method of performing polynomial long division, with less writing and fewer cal-culations. It is mostly taught for division by binomials of the formx a,but the method generalizes to division by any monic polynomial, and to any polynomial.The advantages of synthetic division are that it allows one to calculate without writing variables, it uses few calcu-lations, and it takes signicantly less space on paper than long division. Also, the subtractions in long division areconverted to additions by switching the signs at the very beginning, preventing sign errors.Synthetic division for linear denominators is also called division through Runis rule.4.1 Regular synthetic divisionThe rst example is synthetic division with only a monic linear denominator x a .x3 12x2 42x 3Write the coecients of the polynomial that is to be divided at the top (the zero is for the unseen 0x).1 12 0 42Negate the coecients of the divisor.1x +3Write in every coecient of the divisor but the rst one on the left.31 12 0 42Note the change of sign from 3 to 3. Drop the rst coecient after the bar to the last row.31 12 0 4211314 CHAPTER 4. SYNTHETIC DIVISIONMultiply the dropped number by the number before the bar, and place it in the next column.31 12 0 4231Perform an addition in the next column.31 12 0 4231 9Repeat the previous two steps and the following is obtained:31 12 0 423 27 811 9 27 123Count the terms to the left of the bar. Since there is only one, the remainder has degree zero. Mark the separationwith a vertical bar.1 9 27 123The terms are written with increasing degree from right to left beginning with degree zero for both the remainder andthe result.1x29x 27 123The result of our division is:x3 12x2 42x 3= x2 9x 27 123x 3Evaluating Polynomials by the Remainder TheoremThe above form of synthetic division is useful in the context of the Polynomial remainder theorem for evaluatingunivariate polynomials. To summarize, the value of p(x) at a is equal to the remainder ofp(x)(xa) . The advantage ofcalculating the value this way is that it requires just over half as many multiplication steps as naive evaluation.Analternative evaluation strategy is Horners method.4.2 Expanded synthetic divisionThis method generalizes to division by any monic polynomial with only a slight modication with changes in bold.Using the same steps as before, lets try to perform the following division:x3 12x2 42x2+ x 3We concern ourselves only with the coecients. Write the coecients of the polynomial to be divided at the top.1 12 0 424.2. EXPANDED SYNTHETIC DIVISION 15Negate the coecients of the divisor.1x21x +3Write in every coecient but the rst one on the left in an upward right diagonal (see next diagram).311 12 0 42Note the change of sign from 1 to 1 and from 3 to 3 . Drop the rst coecient after the bar to the last row.311 12 0 421Multiply the dropped number by the diagonal before the bar, and place the resulting entries diagonally to the rightfrom the dropped entry.311 12 0 42311Perform an addition in the next column.311 12 0 42311 13Repeat the previous two steps until you would go past the entries at the top with the next diagonal.311 12 0 423 391 131 13 16Then simply add up any remaining columns.311 12 0 423 391 131 13 16 81Count the terms to the left of the bar. Since there are two, the remainder has degree one. Mark the separation witha vertical bar.1 13 16 81The terms are written with increasing degree from right to left beginning with degree zero for both the remainder andthe result.16 CHAPTER 4. SYNTHETIC DIVISION1x 13 16x 81The result of our division is:x3 12x2 42x2+ x 3= x 13 +16x 81x2+ x 34.2.1 For non-monic divisorsWith a little prodding, the expanded technique may be generalised even further to work for any polynomial, not justmonics. The usual way of doing this would be to divide the divisor g(x) with its leading coecient (call it a):h(x) =g(x)athen using synthetic division with h(x) as the divisor, and then dividing the quotient by a to get the quotient of theoriginal 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 rst dividing the coecients of g(x) by a.As can be observed by rst performing long division with such a non-monic divisor, the coecients off(x) aredivided by the leading coecient of g(x) after dropping, and before multiplying.Lets illustrate by performing the following division:6x3+ 5x2 73x2 2x 1A slightly modied table is used:12/36 5 0 7Note the extra row at the bottom. This is used to write values found by dividing the dropped values by the leadingcoecient of g(x) (in this case, indicated by the /3; note that, unlike the rest of the coecients of g(x) , the sign ofthis number is not changed).Next, the rst coecient of f(x) is dropped as usual:12/36 5 0 76and then the dropped value is divided by 3 and placed in the row below:12/36 5 0 7624.2. EXPANDED SYNTHETIC DIVISION 17Next, the new (divided) value is used to ll the top rows with multiples of 2 and 1, as in the expanded technique:12/36 5 0 72462The 5 is dropped next, with the obligatory adding of the 4 below it, and the answer is divided again:12/36 5 0 7246 92 3Then the 3 is used to ll the top rows:12/36 5 0 72 34 66 92 3At this point, if, after getting the third sum, we were to try and use it to ll the top rows, we would fall o the rightside, thus the third sum is the rst coecient of the remainder, as in regular synthetic division. But the values of theremainder are not divided by the leading coecient of the divisor:12/36 5 0 72 34 66 9 8 42 3Now we can read o the coecients of the answer. As in expanded synthetic division, the last two values (2 isthe degree of the divisor) are the coecients of the remainder, and the remaining values are the coecients of thequotient:2x +3 8x 4and the result is6x3+ 5x2 73x2 2x 1= 2x + 3 +8x 43x2 2x 14.2.2 Compact Expanded Synthetic DivisionHowever, the diagonal format above becomes less space-ecient when the degree of the divisor exceeds half of thedegree of the dividend. It is easy to see that we have complete freedom to write each product in any row, as long asit is in the correct column. So the algorithm can be compactied by a greedy strategy, as illustrated in the divisionbelow.ax7+ bx6+ cx5+ dx4+ ex3+ fx2+ gx + hix4 jx3 kx2 lx m= nx3+ ox2+ px + q +rx3+ sx2+ tx + uix4 jx3 kx2 lx m18 CHAPTER 4. SYNTHETIC DIVISIONj k l mqjpj pk qkoj ok ol pl qlnj nk nl nm om pm qma b c d e f g ha o0p0q0r s t un o p qThe following describes how to perform the algorithm; this algorithm includes steps for dividing non-monic divisors:1. Write the coecients of the dividend on a bar a b c d e f g h2. Ignoring the rst (leading) coecient of the divisor, negate each coecients and place them on the left-handside of the bar. j k l m a b c d e f g h3. From the number of coecients placed on the left side of the bar, count the number of dividend coecientsabove the bar, starting from the rightmost column. Then place a vertical bar to the left, and as well as therow below, of that column. This vertical bar marks the separation between the quotient and the remainder.j k l m a b c d e f g h4. Drop the rst coecient of the dividend below the bar.j k l m a b c d e f g ha5. Divide the previously dropped/summed number by the leading coecient of the divisor and place it onthe row below (this doesn't need to be done if the leading coecient is 1). In this case n =ai .Multiply the previously dropped/summed number (or the divided dropped/summed number) to eachnegated divisor coecients on the left (starting with the left most); skip if the dropped/summed numberis zero. Place each product on top of the subsequent columns.j k l mnj nk nl nma b c d e f g han6. Perform an column-wise addition on the next column.j k l mnj nk nl nma b c d e f g ha o0n7. Repeat the previous two steps. Stop when you performed the previous two steps on the number just before thevertical bar.Let o =o0i.j k l moj ok olnj nk nl nm oma b c d e f g ha o0p0n oLet p =p0i.j k l mpj pkoj ok ol plnj nk nl nm om pma b c d e f g ha o0p0q0n o pLet q=q0i.4.3. SEE ALSO 19j k l mqjpj pk qkoj ok ol pl qlnj nk nl nm om pm qma b c d e f g ha o0p0q0rn o p q8. Perform the remaining column-wise additions on the subsequent columns (calculating the remainder).j k l mqjpj pk qkoj ok ol pl qlnj nk nl nm om pm qma b c d e f g ha o0p0q0r s t un o p q9. The bottommost results below the horizontal bar are coecients of the polynomials, the remainder and thequotient. Where the coecients of the quotient is to the left of the vertical bar separation, and the coe-cients of the remainder to the right. These coecients would be interpreted with increasing degree from rightto left beginning with degree zero for both the remainder and the quotient. We interpret the results to get:ax7+ bx6+ cx5+ dx4+ ex3+ fx2+ gx + hix4 jx3 kx2 lx m= nx3+ ox2+ px + q +rx3+ sx2+ tx + uix4 jx3 kx2 lx m4.2.3 Python implementationThe following snippet implements the Extended Synthetic Division for non-monic polynomials (which also supportsmonic polynomials of course since it is a generalization):def extended_synthetic_division(dividend, divisor): '''Fast polynomial division by using Extended Synthetic Division.Also works with non-monic polynomials.''' # dividend and divisor are both polynomials, which are here simply listsof coecients. Eg: x^2 + 3x + 5 will be represented as [1, 3, 5] out = list(dividend) # Copy the dividend normalizer= divisor[0] for i in xrange(len(dividend)-(len(divisor)1)): out[i] /= normalizer # for general polynomial division(when polynomials are non-monic), # we need to normalize by dividing the coecient with the divisors rst coe-cient coef = out[i] if coef != 0: # useless to multiply if coef is 0 for j in xrange(1, len(divisor)): # in synthetic division,we always skip the rst coecient of the divisior, # because it is only used to normalize the dividend coecientsout[i + j] += -divisor[j] * coef # The resulting out contains both the quotient and the remainder, the remainder beingthe size of the divisor (the remainder # has necessarily the same degree as the divisor since it is what we couldn'tdivide from the dividend), so we compute the index # where this separation is, and return the quotient and remainder.separator = -(len(divisor)1) return out[:separator], out[separator:] # return quotient, remainder.4.3 See alsoPolynomial remainder theoremEuclidean domainGrbner basisGreatest common divisor of two polynomialsHorner scheme4.4 ReferencesLianghuo Fan (2003). A Generalization of Synthetic Division and A General Theorem of Division of Poly-nomials (PDF). Mathematical Medley 30 (1): 3037.20 CHAPTER 4. SYNTHETIC DIVISIONLi Zhou (2009). Short Division of Polynomials. College Mathematics Journal 40 (1): 4446. doi:10.4169/193113409x469721.4.5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES 214.5 Text and image sources, contributors, and licenses4.5.1 Text LongdivisionSource: https://en.wikipedia.org/wiki/Long_division?oldid=672498508Contributors: Tarquin, Michael Hardy, Shoe-cream, AugPi, Charles Matthews, Dcoetzee, Dysprosia, Furrykef, Saltine, Indefatigable, .mau., Friedo, Chris Roy, Isopropyl, Giftlite,Smjg, Wolfkeeper, Ottergoose, CryptoDerk, Beland, Doops, Oscar, Mike Rosoft, Discospinster, NrDg, Paul August, Rgdboer, Liberatus,Bobo192, Boredzo, Arthena, Gpvos, BlastOButter42, SilentGuy, Linas, Oliphaunt, Knuckles, Ryajinor, Josh Parris, Salix alba, Bubba73,MarnetteD, Ropez, McAusten, Wongm, RobotE, PiAndWhippedCream, Charles Gaudette, BazookaJoe, Sissyneck, MathsIsFun, Smack-Bot, Kopaka649, Janmarthedal, Psiphiorg, Kurykh, SchftyThree, Octahedron80, PaulGuyot~enwiki, MarkSutton, Dicklyon, Bquinn23,Cytocon, Xanthoxyl, Sopoforic, Cydebot, Sytelus, Strom, Dr.enh, Thijs!bot, Epbr123, Konradek, Nick Number, Eleuther, Jorgis, JustusR, Jongtu, Mr Mo~enwiki, Znkp, Belg4mit, VoABot II, SEREGA784, DeviFoxx, Bcherkas, Seberle, R'n'B, AstroHurricane001, Simp-sonDG, Your mind17, Eliz81, KylieTastic, Useight, RJASE1, Legoland12342, Whatfg, Pleasantville, Anonymous Dissident, Jimwrightbe,DanielAjoy, Bachcell, Garde, Faganp, Faradayplank, Johnanth, Kortaggio, XDanielx, Martarius, ClueBot, Rootwhisk, Neverake, MuroBot, Thingg, Aitias, Count Truthstein, Arslion, WikHead, SilvonenBot, Alexius08, Addbot, SpellingBot, CanadianLinuxUser, MrOllie,Awanta, Tassedethe, Ehrenkater, Tide rolls, PV=nRT, Popov OA, Yobot, Fraggle81, Mattbrewster, AnomieBOT, SlavMFM, Dougofborg,FrescoBot, Pinethicket, Elockid, Eagles247, Mahrud, X5657, Callanecc, Dinamik-bot, Duoduoduo, Anna.iademarco, Weedwhacker128,Agvardha, Stefanbs, Dourouc05, Your Lord and Master, Wsedano, D.Lazard, Jguy, Scientic29, Piockec, RockMagnetist, DASHB-otAV, ClueBot NG, Widr, LOGINLOGINOGIN, Martin of Sheeld, Frze, Ugncreative Usergname, Quinncray, Cwobeel, Mogism,Lugia2453, Graphium, Ponchoponcho12, Andychap2000, Jim wales jr, ProprioMe OW and Anonymous: 186 Polynomial long division Source: https://en.wikipedia.org/wiki/Polynomial_long_division?oldid=673955332 Contributors: Miguel~enwiki,Michael Hardy, Eric119, Samw, Dino, Dysprosia, Saltine, Chris Roy, Giftlite, Tom harrison, Doops, Watcher, Andreas Kaufmann, Fly-highplato, Cow2001, Habbit, Arthena, Ahruman, Wtmitchell, Oleg Alexandrov, Linas, Mindmatrix, Oliphaunt, Ryan Reich, Happy-Camper, FlaBot, Mathbot, CiaPan, Arthur Rubin, Adammw, Gesslein, Allens, Brentt, SmackBot, Pokipsy76, Nbarth, Vanished user9i39j3, Cydebot, Thijs!bot, Java13690, Pemboid, Escarbot, Jj137, Yurimxpxman, Io Katai, Magioladitis, Bcherkas, Antonkast, Lolu-engo, J.delanoy, It Is Me Here, Wbrito, IWhisky, Anonymous Dissident, Strikethree, Falcon8765, Spinningspark, Dolphin51, ClueBot,Chirag Patil, Hope296, Torchame, Addbot, Ashanda, MrOllie, LaaknorBot, CuteHappyBrute, Lightbot, PV=nRT, Jim1138, Grou-choBot, Erik9bot, Owendelong, T3h 1337 b0y, Dashed, Rakeshk123, Duoduoduo, DarkdrakeX, EmausBot, Immunize, Phiarc, ZroBot,Tisdav, D.Lazard, ClueBot NG, Frietjes, Helpful Pixie Bot, Walrus068, Jackbrear, Robbstarzz, MC-CPO, Larsborn, Epicgenius, Loraof,Nhabedi and Anonymous: 79 Polynomial remaindertheoremSource: https://en.wikipedia.org/wiki/Polynomial_remainder_theorem?oldid=672723379Contribu-tors: Michael Hardy, Samw, Silversh, Charles Matthews, Giftlite, MSGJ, Fangz, Kenny TM~~enwiki, YUL89YYZ, Dirac1933, Maxal,Bgwhite, YurikBot, KSmrq, Gesslein, BeteNoir, Oli Filth, Lambiam, Nonagonal Spider, Glrx, Corwin., Rommels, VolkovBot, Ge-ometry guy, XMxWx, SieBot, ClueBot, Jusdafax, Aakaalaar93, El bot de la dieta, Mifter, Addbot, Luckas-bot, Bluerasberry, Grou-choBot, Erik9bot, FrescoBot, LucienBOT, Louperibot, Citation bot 1, Pithecanthropus4152, Weedwhacker128, RjwilmsiBot, EmausBot,Slawekb, D.Lazard, ClueBot NG, Kadirovrust, Northamerica1000, Brad7777, Liam987, Brirush, A4b3c2d1e0f, Ginsuloft, JaconaFrere,Misha511 and Anonymous: 34 Syntheticdivision Source: https://en.wikipedia.org/wiki/Synthetic_division?oldid=668961542 Contributors: Michael Hardy, CharlesMatthews, Dysprosia, Saltine, Giftlite, Habbit, Mindmatrix, Will Orrick, Rjwilmsi, X1011, Maxal, DVdm, JamesLee, Silverhill, HLwiKi,Stifynsemons, Zyxoas, FilipeS, Cydebot, Seaphoto, Wootery, Magioladitis, JJ Harrison, Anonymous Dissident, Icktoofay, Addbot, Lil-Helpa, Dithridge, D'ohBot, Dashed, RjwilmsiBot, Ehzone, 999ers, ClueBot NG, Gareth Grith-Jones, Wcherowi, Snotbot, Frietjes,MC-CPO, GFauxPas, Lrq3000, Yangelectric, Patelsach and Anonymous: 264.5.2 Images File:LongDivisionAnimated.gif Source: https://upload.wikimedia.org/wikipedia/commons/f/f2/LongDivisionAnimated.gif License: CCBY-SA 3.0 Contributors: Own work Original artist: Xanthoxyl File:Long_division.JPG Source: https://upload.wikimedia.org/wikipedia/commons/3/3e/Long_division.JPG License: CC BY-SA 4.0Contributors: Own work Original artist: Martin of Sheeld File:Text_document_with_red_question_mark.svg Source: https://upload.wikimedia.org/wikipedia/commons/a/a4/Text_document_with_red_question_mark.svg License:Public domain Contributors:Created by bdesham with Inkscape; based upon Text-x-generic.svgfrom the Tango project. Original artist: Benjamin D. Esham (bdesham)4.5.3 Content license Creative Commons Attribution-Share Alike 3.0