Sub topic 2
Factoring four-term polynomials by grouping
This chapter assumes you can add, subtract, and multiply integers, apply the distributive property, multiply binomials, and use the terms coefficient, degree, and monomial. It covers four methods: grouping, factoring x^2 + bx + c, the ac method for ax^2 + bx + c, and difference of squares.
Factoring four-term polynomials by grouping
Split the four terms into two pairs. Factor the greatest common factor (GCF) out of each pair. If both pairs leave the same binomial, factor that binomial out.
from sympy import symbols, factor, expand
x = symbols('x')
expr = x**3 + 3*x**2 + 2*x + 6
print(factor(expr)) # (x + 3)*(x**2 + 2)
print(expand((x + 3)*(x**2 + 2)) == expr) # TrueFactoring x^2 + bx + c
Find two integers m and n with m·n = c and m + n = b. Then x^2 + bx + c = (x + m)(x + n). For example, x^2 + 5x + 6 = (x + 2)(x + 3), because 2·3 = 6 and 2 + 3 = 5.
Factoring ax^2 + bx + c with the ac method
Multiply a and c. Find two numbers that multiply to ac and add to b. Split the middle term with them, then factor by grouping. For 2x^2 + 7x + 3, ac = 6, and 1 and 6 work. So 2x^2 + x + 6x + 3 = x(2x + 1) + 3(2x + 1) = (2x + 1)(x + 3).
Difference of squares
The pattern a^2 - b^2 = (a - b)(a + b) factors any difference of two perfect squares. For example, x^2 - 49 = (x - 7)(x + 7). A sum of squares, such as x^2 + 49, does not factor over the integers.
Exercise
Factor x^3 + 2x^2 + 3x + 6 by grouping.
Show answer
(x + 2)(x^2 + 3). Check: x^2(x + 2) + 3(x + 2) = x^3 + 2x^2 + 3x + 6.