









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Class: Type Comp Kybrd; Subject: Office; University: Oakton Community College; Term: Spring 2002;
Typology: Study notes
1 / 16
This page cannot be seen from the preview
Don't miss anything!
by
www.neiu.edu/˜bhdayton/theq/
These notes are copyrighted by Barry Dayton, 2002. The PDF files are freely available on the web and may be copied into your hard drive or other suitable electronic storage devices. These files may be shared or distributed. Single copies may be printed for personal use but must list the website www.neiu.edu/˜bhdayton/theq/ on the title page along with this paragraph.
“Maple” and “MAPLE” represent registered trademarks of Waterloo Maple Inc.
In this chapter we discuss the special properties of polynomials with integer or rational coefficients with special attention given to factoring. Not only has this been studied extensively over the last 400 years, but the theory is useful in many modern applications such as coding theory.
The set of rational numbers, which we denote by Q, is the set of all fractions mn where m, n are integers with n > 0. Q satisfies all the field axioms C1,C2, R1 - R8 and F1 of §1.1 and so we call the set of rational numbers a field. The rational numbers also satisfy O1, O2, and O3 but not O4, but this will not be of much interest to us. The set of polynomials with rational coefficients will be denoted Q[x] and satisfies many algebraic properties similar to the real or complex polynomials. All the results of §1.4, 1.5, 1.6 and 1.8 hold for Q[x], as do most of the results of §1.7, especially Theorems 1.5.1, 1.6.1, 1.6.2, 1.7.1, 1.7.2, 1.7.3, 1.8.2 and the Euclidean Algorithm which all simply depend on the set of coefficients being a field. When we speak of factoring a polynomial in Q[x] we mean for the factors also to be rational polynomials in Q[x], thus p(x)|f (x) as polynomials in Q[x] means that f (x) = p(x) ∗ q(x) where also q(x) ∈ Q[x]. Note that Theorem 1.7.1 applied to Q[x] then says that (x − c) is a factor of p(x) if and only if c is a rational root of p(x). Likewise the definitions of irreducible and prime refer to factoring in Q[x]. Even with these restrictions, Theorems
Maple Implementation
Minimal polynomials of decimal approximations of a real number can often be found by Maple. Essentially Maple finds an interpolat- ing polynomial with integer coefficients satisfying the one condition that p(c) = 0 using the lattice algorithm as described in section 2.15. However, to make it easier they have a special routine which does the work of setting up the equations for you, especially in the case c is a complex number where real and imaginary parts need to be separated. In older versions of maple the procedure is minpoly in the polytools package, use with(polytools, minpoly); to ac- cess this procedure. The command
minpoly(c,n);
gives the polynomial of degree n with “small” integer coefficients that comes closest to satisfying p(c) = 0. Try several degrees to find the correct polynomial. In later versions of Maple this is being replaced by the procedure MinimalPolynomial in the PolynomialTools package which does the same thing.
5.2 Integer Polynomials
In this chapter we are mainly interested in polynomials with integer coefficients. The set of all such polynomials is denoted by Z[x] where Z denotes the ring of integers 0 , ± 1 , ± 2 ,.... The ring Z itself is what we have called an integral domain , i.e. Z satisfies axioms C1, C2, R1-R8 and I1, but does not satisfy F1 of §1.1. Subsequently we do have polynomial addition and multiplication in Z[x] and Theorem 1.5.1 holds. Thus Z[x] also is an integral domain. But Theorem 1.6.1, the division algorithm, holds only in the following limited sense, since it is understood that in working with Z[x] we can do only integer arithmetic:
Theorem 5.2.1 Given polynomials f (x), g(x) ∈ Z[x] with g(x) a monic polynomial then there exist unique polynomials q(x), r(x) ∈ Z[x] so that f (x) = g(x)∗q(x)+r(x) where r(x) = 0 or deg r(x) < deg g(x).
Theorem 5.2.1 is strong enough to prove analogs of Theorems 1.7.1, 1.7.2 and 1.7.3 however Theorem 1.8.2, the greatest common divisor theorem, does not hold
in the given form. For example it can be seen that the polynomials f (x) = x^3 and g(x) = x^2 − 3 have greatest common divisor 1, but there is no way to write
1 = u(x) ∗ f (x) + v(x) ∗ g(x)
where u(x), v(x) ∈ Z[x]. We will see that we have unique factorization and greatest common divisors, but we will have to take a roundabout route. When factoring, a special concern with integer polynomials is that the coefficients themselves may need to be factored. The integers 1 and − 1 are the only integers which have multiplicative inverses, we call them units. These units are ignored in factoring, other integer coefficients (or constant polynomials) do have to be considered. We will see that when working with integer polynomials, the concepts of prime and irreducible are different. We start out our consideration of factorization with the following idea.
Definition 5.2.2 Given an integer polynomial f (x) = a 0 + a 1 x + a 2 x^2 + · · · + anxn, where each aj ∈ Z, the content cf is the greatest common divisor of {a 0 , a 1 ,... , an}, i.e. ± the largest positive integer which divides all the aj. If the content cf is a unit, i.e. ± 1 , we say f (x) is primitive.
The next theorem says we can extend the notion of content to rational polynomials.
Theorem 5.2.3 Any non-zero polynomial f (x) ∈ Q[x] can be factored in the form f (x) = cf f ∗(x) where cf ∈ Q and f ∗(x) is a primitive polynomial in Z[x]. cf , also called the content of f (x) , and f ∗(x) are unique up to sign.
Proof: Let f (x) = a 0 +a 1 x+· · ·+anxn. The we can find a least common denominator
d for the fractions aj , i.e. aj = b dj where gcd{b 0 ,... , bn, d} = 1. So take cf = ed where e = gcd{b 0 ,... , bn} and f ∗(x) = b e^0 + b e^1 x + · · · + b en xn.
Theorem 5.2.4 (Gauss’ Lemma) The product of two primitive polynomials in Z[x] is primitive.
Proof: Let f (x) = a 0 + a 1 x + · · · + anxn^ and g(x) = b 0 + b 1 x + · · · + bmxm^ and assume both are primitive, in particular no prime integer divides all the aj or all the bj. Thus given any prime integer p, there is a smallest j so that p does not divide aj and a smallest k so that p does not divide bk. A calculation of the coefficient cj+k of xj+k^ in f (x)∗g(x) shows that p does not divide cj+k. Since no prime divides all the coefficients of the product, the product is primitive.
The next theorem allows us to reduce factoring problems of integer polynomials to those of rational polynomials.
Proof: g ∗ (x) = e ∗ g(x) = ( ed )c + eb 1 x + · · · + exm^ where e is the least common multiple of the denominators of the bj (assuming in lowest terms) since the polynomial g(x) is monic. Note ed is an integer. By 5.2.5 g∗(x) divides f (x), so 5.3.1 says that e|an and (^) de c divides a 0 and hence c divides a 0.
Theorem 5.3.3 Let f (x) = a 0 + a 1 x + · · · + anxn^ ∈ Z[x] with an 6 = 0_. Any rational root is of the form_ c/d where c, d ∈ Z and c|a 0 , d|an_._
Proof: Apply 5.3.2, recalling that c/d is a root if and only if x − (^) dc is a factor.
For example, the polynomial f (x) = 10x^3 − 5 x + 12 can have the possible ra- tional roots ± 1 , ± 2 , ± 3 , ± 4 , ± 6 , ± 12 , ± 1 / 2 , ± 3 / 2 , ± 1 / 5 , ± 2 / 5 , ± 3 / 5 , ± 4 / 5 , ± 6 / 5 , ± 12 / 5 , ± 1 / 10 , ± 3 / 10 but in fact has none of them. Theorem 5.3.3 is widely overused as a method for finding roots to polynomials. This theorem should be used directly only when both a 0 , an are ± 1 or one is ± 1 and the other is a prime number. In this case there are only a small number of possibilities. This theorem can be used after ap- proximate roots have been found by calculator or computer. Then one can easily check and see if any of the roots are actually rational. In the example above the one real root is approximately − 1. 218523 , which is clearly not one of the possible rational roots. It would have been a real waste of time to check each of the 32 possibilities.
While the previous two theorems are overused for finding linear factors, it is not widely known that they can be used effectively to find rational quadratic factors. If f (x) = a 0 + a 1 x + · · · + anxn, a monic rational quadratic factor of f (x) will be of the form
g(x) = x^2 +
b d
x +
c d
where c|a 0 and d|an. If z 1 , z 2 ,... , zn are the complex roots of f (x) (listed according to multiplicity) then two of them, say zj , zk will be roots of the quadratic factor g(x). But then zj ∗ zk = c/d and zj + zk = −b/d so one can fairly quickly check to see which pairs of roots can give rational factors. In particular, if zj is an imaginary root it can only pair up with its conjugate and in this case zj ∗ zj = |zj |^2 , zj + zj = 2Re(zj ). The real roots can pair up in any way.
Example 5.3.4 Consider f (x) = 3x^5 − 12 x^4 + 16x^3 − 12 x^2 + 3x + 6. One finds, say
by ones TI-85 calculator, that the approximate roots are
z 1 = .37004 + 1. 091123 i z 2 =. 37004 − 1. 091123 i z 3 = 2. 259921 z 4 = 1. 457426 z 5 = −. 457426
For two roots zj , zk to pair up to give a quadratic factor we must have zj +zk = −b/d where d = 1 or 3 and zj ∗ zk = c/d where d = 1 or 3 and c = ± 1 , ± 2 , ± 3 , or ± 6. But 2 Re(z 1 ) =. 74008 which is not of this form so z 1 , z 2 can be eliminated. Likewise z 3 + z 4 = 3. 717347 and z 3 + z 5 = 1. 802494 so these pairs are not possible. But z 4 + z 5 =. 999999 is close enough to 1 to consider and z 4 ∗ z 5 = −. 666666 is also close to the allowable 2/3. Thus g(x) = x^2 − x − 2 / 3 , or g∗(x) = 3x^2 − 3 x − 2 are likely quadratic factors of f (x). By division we check that these are indeed factors.
In theory one can also use Theorem 5.3.2 to look for cubic factors etc. however the number of combinations that may need to be checked is too large to be practical.
5.4 Eisenstein’s Irreducibility Criterion
It would be nice to have a test for irreducible integer polynomials, but there is no simple general test. We will discuss some other tests later in the chapter but for now we mention one test that sometimes works.
Theorem 5.4.1 (Eisenstein’s Irreducibility Criterion) Let f (x) = a 0 + a 1 x + · · · + anxn ∈ Z[x] and p be a prime number. If p does not divide an , but p does divide an− 1 , an− 2 ,... , a 0 and p^2 does not divide a 0 then f (x) is irreducible in Z[x].
Proof: Let f (x) satisfy Eisenstein’s criterion and suppose f (x) = g(x) ∗ h(x) where g(x), h(x) ∈ Z[x], g(x) = b 0 + b 1 x + · · · + bmxm^ and h(x) = c 0 + c 1 x + · · · + ckxk. Now a 0 = b 0 c 0 is not divisible by p^2 so one of b 0 , c 0 is not divisible by p, say b 0. But then c 0 is divisible by p, so pick the smallest index r such that cr is not divisible by p (ck cannot be divisible by p since an is not). Then ar = b 0 cr + b 1 cr− 1 + · · · + brc 0. But every term on the right is divisible by p except the first term b 0 cr and hence the right hand side is not divisible by p. Then ar is not divisible by p so r = n so deg h(x) = n and this says f (x) is irreducible.
program. It is interesting to note that whereas in high school factoring is taught as a method for finding roots, in real life it is usually done the other way around.
LET f (x) BE OUR POLYNOMIAL, deg f (x) = n.
Example 5.5.2 Let f (x) = x^5 + x^4 + x^2 + x + 2. f (x) is primitive and f (x) does not satisfy Eisenstein’s criterion for p = 2, the only prime factor of a 0 so we go to step 3. Possible rational roots are ± 1 , ± 2 but the only real root is − 1. 521380. The imaginary roots are. 760690 ±. 857874 and −. 5 ±. 866025 i. The first conjugate pair does not give a rational factor but it is easily seen that the second conjugate pair are approximate roots of x^2 + x + 1 which is a factor. Dividing this out gives the other factor x^3 − x + 2. Since we have already determined that f (x) has no linear factors this cubic must be irreducible. Thus the factorization of f (x) = (x^2 + x + 1) ∗ (x^3 − x + 2).
Exercise 5.5.1 (10 points each) Factor or prove irreducible using the methods of this section.
If the method above does not work, say the degree is greater than 5, there are good factoring algorithms implemented in software such as MAPLE or MATHEMATICA. These will be briefly discussed in the next section.
we have studied factoring over Z[x] and understand the difference between that and factoring over R[x] we might ask what should be role of factoring integer polynomials in math classes from algebra through calculus? It is integer factoring that is taught in high school algebra classes and this topic is often emphasized. Is this worthwhile? In the opinion of your author, the answer is a qualified NO. Most uses of integer factoring in elementary mathematics are inappropriate, inefficient or both. By inappropriate I mean that factoring in Z[x] is used in situations that call for factoring in R[x] , or equivalently, root finding. By inefficient I mean that there are better algorithms for accomplishing the same thing. Lets look at some of the applications of factoring in elementary math. The one that comes most readily is factoring to solve polynomial equations. Here integer factoring is both inappropriate and inefficient. Basically using integer factoring to solve equations is equivalent to guessing. There is nothing wrong with solving problems by guessing, but then why go to the trouble of mentioning factoring? In addition, as we showed in the example immediately after Theorem 5.3.3 this can be terribly inefficient. And of course, there is no reason to expect that typical problems give rational solutions. Besides, there are efficient methods for solving polynomial equations numerically, and in the case of quadratics a simple formula. Here is a problem which is typical of an elementary algebra text which illustrates why I don’t like factoring. A rectangle has length 3 inches greater than the width and area 40 square inches. Find the length. If we let x be the length then the width is x − 3 so we have the equation x(x − 3) = 40
Some re-arrangement gives the quadratic equation in standard form
x^2 − 3 x − 40 = 0
We can solve this by factoring, since the sign of the constant is negative we need two numbers whose product is 40 and difference is 3. But if we know two numbers whose product was 40 and difference was 3 we could have solved original problem immedi- ately without doing any algebra at all. What have we taught the students? That algebra is useless? Hopefully not. If the problem is changed just slightly, say the area of the rectangle is 50 sq. in. we now have a problem that requires the algebra to solve. But, of course, this
given are actually factors. This will usually work well, but in some cases not, so failure by this method is not conclusive proof that the original polynomial is irreducible. Most computer methods, however, first factor over fields of modular arithmetic. The mod function r = b mod m finds the remainder r when integer b is divided by positive integer m using the division algorithm for integers. If one fixes a prime number p then addition and multiplication can be defined on the set Zp = { 0 , 1 , 2 ,... , p − 1 } by
a + b = (a + b) mod p a ∗ b = (ab) mod p The resulting algebraic system actually satisfies the field axioms of section 1.1. There are some technical details that must be dealt with, for example polynomials can- not be viewed as functions, but basically the ring Zp[x] behaves similarly to the ring of polynomials over any field we have studied, including a unique factorization theorem. A more thorough discussion of this is contained in earlier versions of these notes, which may still be available from my website. In Zp[x] factorization is a finite process that can be done efficiently by computer. The two main algorithms used are the distinct-degree algorithm and Berlekamp’s al- gorithm. The distinct degree algorithm, discussed in earlier editions of these notes, uses the somewhat bizarre fact, not proved in the notes, that the polynomial xp
d − x has every irreducible polynomial of degree d as a factor. Thus, in principle, all one needs to do is take the greatest common divisor of the polynomial of degree n to be factored with these polynomials for d ≤ n/ 2. The actual algorithm uses other strange facts about modular polynomials to make this efficient. Berlekamp’s algorithm is more complicated, using linear algebra as well as number theory. Berlekamp’s algorithm is usually reserved for the case where p is large and the polynomial has few factors.
Maple Implementation Maple implements both the distinct-degree and Berlekamp’s al- gorithm. Enter a polynomial f with variable x, in the usual manner, but with integer coefficients, select a prime p and then use DistDeg(f,x) mod p; or Berlekamp(f,x) mod p; Note that DistDeg will return pairs [g, d] where g is a not- necessarily irreducible factor which is a product of irreducibles of degree d. Berlekamp will attempt to return a complete factorization.
One use of factoring over Zp[x] is that one can often obtain proofs that a given polynomial in Z[x] is irreducible. For example if f is irreducible in Zp[x] for some then it must have already been irreducible in Z[x]. The converse is not true, but by trying various primes p one can find a suitable one or argue indirectly if the factorizations over different p are incompatible. Maple, and other factoring software, use information gathered from factorization over Zp[x] to give clues on factoring in Z[x]. For example, Maple uses distinct-degree factorization as part of its factor algorithm. In general Maple is successful at factor- ing most “reasonable” integer polynomials.
Maple Implementation
To factor an integer or rational polynomial simply use
factor(f)
Note that you do not specify the variable as Maple will factor anything in sight, separating, if possible, the different variables.
5.7 Comparison of factoring algorithms
As mentioned in §2.2 the two concerns we have about algorithms are accuracy and efficiency. For factoring, accuracy is not a concern – one can test supposed factors and they work or don’t work. Efficiency is a concern in factoring. For both integers and polynomials there are simple algorithms that will work, the problem is to find algorithms that work quickly. For example, in factoring an integer N one procedure, we will call this ”straight factoring” is to divide N first by 2 and then by each odd integer 3 , 5 , 7 , 9 ,... up to
looking for factors. With a computer or programmable calculator this is as quick as almost any algorithm for small integers, say integers less than 1,000,000. However for each two digits added to N the time taken will be multiplied by
100 = 10. Thus if our computer takes 5 seconds to factor a 6 digit number by the straight factor method it will take 100 years to factor a 30 digit number by this method! We want an algorithm which will give us an answer today, not 100 years from today. In calculating the time to be taken by a factoring method we use as the “size” of an integer its number of digits. For a polynomial with integer coefficients we use the degree and the number of digits in the coefficients. Since it takes longer to add, multiply and divide longer integers, this has to be considered in calculating the efficiency. The efficiency, or complexity of an algorithm will then be a function of its size.
digit integer directly would not be easy (try it!). For example, straight factor on my TI-85 took over 23 minutes. The point is, of course, that the coefficient of x in the quadratic gives me enough extra information to make my job much easier.