5. Factoring by the QF method 5.0 Preliminaries 5.1 The QF view of factorability 5.2 Illustration of the QF view of factorability 5.3 The QF approach to factorization 5.4 Alternative factorization by the QF method 5.5 Illustration of the QF approach to factorization 5.6 Mathematical foundation of the QF method 5.7 Implementation of the QF method 5.8 The Trinomial Factorability Theorem For a trinomial with integer coefficients, the fact that the discriminant is a perfect square is equivalent to the rationality of the trinomial s zeros, which constitutes the mathematical foundation of the QF method studied in this chapter. Based on this Factorability Theorem, the QF method is implemented in Section 5.7 in the form of a precisely formulated algorithm that is formally independent of the Factor-by-grouping Theorem. Although logically and formally distinct from the VN method, the QF approach to factorization is shown in Section 5.4 to be computationally equivalent to the VN approach. In Section 5.8, the four factorability theorems in Chapters 2 through 5 are combined into a comprehensive characterization of trinomial factorability, which constitutes the mathematical foundation of all four methods for factoring trinomials over the integers. 5.0 Preliminaries 5.1 The QF view of factorability 5.2 Illustration of the QF view of factorability 5.3 The QF approach to factorization 5.4 Alternative factorization by the QF method 5.5 Illustration of the QF approach to factorization
5.6 Mathematical foundation of the QF method We saw in Section 5.1 that if a quadratic trinomial f with integer coefficients is factorable over the integers, then its zeros are rational numbers. In Section 5.3 we saw that, conversely, the existence of such rational zeros is a sufficient condition for the factorability of the trinomial f. Furthermore, we also saw that if one of the zeros of f is rational, then both zeros are rational, which is the case if and only if f can be factored over the rationals. Together, these statements yield the following characterization of trinomial factorability, which constitutes the mathematical foundation of the QF method. QF Factorability Theorem Let f = ax 2 +bx+c be a quadratic trinomial with integer coefficients. Then the following four statements are equivalent: [1] The trinomial f is factorable over the integers. [2] The trinomial f has rational zeros. In other words, there exist rational numbers x 1 and x 2 such that RZ.1 f(x 1 ) = ax 1 2 +bx 1 +c = 0 RZ.2 f(x 2 ) = ax 2 2 +bx 2 +c = 0 [3] The trinomial f has at least one rational zero. In other words, there exists a rational number x 1 satisfying Condition RZ.1. [4] The trinomial f is factorable over the rationals. In other words, there exist rational numbers d, e, m and n such that ax 2 +bx+c = (dx+m)(ex+n)! Statement [2] is called the Factorability Criterion of the QF method.! Conditions RZ.1 and RZ.2 are called the QF factorability conditions. # According to the Factorability Theorem for the VN method in Section 4.5, a trinomial with integer coefficients is factorable over the integers if and only if its discriminant is a perfect square. This, together with the Factorability Theorem for the QF method above, yields the following criterion for a trinomial with integer coefficients to have rational zeros. Rational Factorability Theorem for trinomials Let f = ax 2 +bx+c be a quadratic trinomial with integer coefficients. Then the following two statements are equivalent: [1] The trinomial f has rational zeros. In other words, there exist rational numbers x 1 and x 2 such that RZ.1 f(x ) = ax 2 +bx +c = 0 1 1 1 2 RZ.2 f(x 2 ) = ax 2 +bx 2 +c = 0 [2] The discrimina nt of f is a perfect square. In other words, there exists an integer z such that PSD z 2 = b 2 4ac
# We just saw that this theorem is a consequence of the factorability theorems for the VN and QF methods. It can be proved directly as follows. To prove that [1] implies [2], assume that the trinomial f has rational roots x 1 and x 2. Then, by Vieta s Theorem, we have b = a(x 1 +x 2 ) c = a(x 1 x 2 ) Computing the discriminant of f, we find b 2 4ac = a 2 (x 1 +x 2 ) 2 4a 2 (x 1 x 2 ) = a 2 [(x 1 +x 2 ) 2 4x 1 x 2 ] = a 2 [x 1 2 +2x 1 x 2 + x 2 2 4x 1 x 2 ] = a 2 [x 1 2 2x 1 x 2 + x 2 2 ] = a 2 (x 1 x 2 ) 2 which shows that it is a non-negative real number, and, therefore, has a non-negative square root z such that: (19) D = b 2 4ac = z 2 Now, express the rational zero x 1 as a fraction in lowest terms: (20) x 1 = r 1 /s 1 with GCF(r 1,s 1 ) = 1 Then, by the Rational Zeros Theorem, the denominator s 1 is a factor of a, i.e., there exists an integer v 1 such that (21) a = s 1 v 1 Since x 1 is a zero of f, it must be given by one of the quadratic formulas, say, x 1 = ( b+z)/(2a) Solving for z in this equation, we have z = b+2ax 1 = b+2a(r 1 /s 1 ) By (20) = b+2(s 1 v 1 )(r 1 /s 1 ) By (21) = b+2v 1 r 1 which shows that z is indeed an integer. Therefore, by (19), the discriminant D is a perfect square. To prove that [2] implies [1], assume that the discriminant D is a perfect square, with principal square root z, where z is an integer. Then the zeros of f, given by the quadratic formulas are clearly rational numbers. x 1 = ( b z)/2a x 2 = ( b+z)/2a # The Rational Factorability Theorem above can be used to prove a generalization of the familiar fact that the square root of 2 is irrational. More specifically, we will show that the square root of a positive integer n is irrational unless n is a perfect square. Perfect Square Roots Theorem Let n be a positive integer. Then the following two statements are equivalent: [1] The square root of n is a rational number. [2] The square root of n is an integer. In other words, n is a perfect square, i.e., there exists a positive integer k such that n = k 2.
# Implication [2] [1] is trivial since if [2] holds, then we have n = k which shows that the square root of n is an integer, hence, a fortiori, a rational number. To prove the converse implication, assume that condition [1] holds. Then, since the square roots ± n of n are clearly the zeros of the trinomial f = x 2 n it follows from [1] that f has rational roots. Therefore, by the Rational Factorability Theorem above, its discriminant is a perfect square, say, D = 4n D = 4n = m 2 for some positive integer m. This shows that m 2 is an even number, hence, since an integer and its square always have the same parity, m itself is an even number, say, m = 2k Therefore, we have 4n = m 2 whence = (2k) 2 = 4k 2 n = k 2 which shows that n is a perfect square (and that its square root is, in fact, an integer). # Implication [1] [2] states that if a positive integer has a rational square root, then that integer must be a perfect square. The contrapositive of this implication states that if a positive integer is not a perfect square, then its square root is irrational. Thus, the square root of every positive integer lying strictly between any two consecutive perfect squares is irrational. For instance, the square roots of are all irrational. 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17,18,19,20,21,22,23,24, 26,27,28,29,30,31,32,33,34,35 # This implication [1] [2] is also a direct consequence of the Rational Zeros Theorem. To see this, assume that [1] holds, and express the rational root of n as a fraction in lowest terms: (20) n = r/s with GCF(r,s) = 1 Then, since n is clearly a zero of the trinomial f = x 2 n by the Rational Zeros Theorem, the denominator s is a factor of the quadratic coefficient of f, i.e., there exists an integer v such that (21) sv = 1 This forces s to be equal to 1, so that the square root n = r is an integer. # In this connection, notice that a similar argument, based on the general version of the Rational Zeros Theorem for polynomials of arbitrary degree, can be used to show that, for any positive integer p > 1, the p-th root of a positive integer n is irrational unless n is a perfect p-th power.
Perfect Integral Roots Theorem Let n be a positive integer. Then, for any positive integer p > 1, the following two statements are equivalent: [1] The p-th root of n is a rational number. [2] The p-th root of n is an integer. In other words, n is a perfect p-th power, i.e., there is a positive integer k such that n = k p. # Implication [1] [2] states that if a positive integer has a rational p-th root, then that integer must be a perfect p-th power. The contrapositive of this implication states that if a positive integer is not a perfect p-th power, then its p-th root is irrational.