Sub topic 4
Factoring Four-Term Polynomials by Grouping
What this chapter covers and what it assumes
This chapter assumes you can already do the following:
- Multiply binomials and use the distributive property.
- Find the greatest common factor (GCF) of two terms and factor it out of a polynomial, as in the previous two chapters.
- Handle negative coefficients and exponent rules without hesitation.
Here you will learn to factor a polynomial with four terms by splitting it into two pairs, pulling a GCF out of each pair, and then pulling out a common binomial. You will also learn to spot the cases where grouping fails.
The idea: a common factor that is itself a binomial
Factoring out a GCF reverses the distributive property. For example, 3x^2(2x + 3) multiplies out to 6x^3 + 9x^2.
Grouping uses the same property, but the common factor is a binomial instead of a monomial. Compare these two statements:
a(x + 3) + b(x + 3) = (a + b)(x + 3)Both terms on the left contain the factor (x + 3). It can be pulled out exactly as if it were a single variable. Grouping is the process of manufacturing that situation from a four-term polynomial that does not obviously have a common factor.
A first worked example
Factor x^3 + 3x^2 + 2x + 6. No single factor (other than 1) divides all four terms, so a plain GCF does not help.
x^3 + 3x^2 + 2x + 6
= (x^3 + 3x^2) + (2x + 6) group into two pairs
= x^2(x + 3) + 2(x + 3) factor the GCF out of each pair
= (x + 3)(x^2 + 2) factor out the common binomialCheck by multiplying:
(x + 3)(x^2 + 2) = x^3 + 2x + 3x^2 + 6 = x^3 + 3x^2 + 2x + 6The check matches the original, so the factorization is correct.
The key moment is the second line. After you factor each pair, the two binomials in parentheses must be identical. Here both are (x + 3). If they differ, something is off: you made an arithmetic slip, the terms need a different arrangement, or grouping does not apply.
The procedure
In words:
- Factor out any GCF shared by all four terms.
- Split the remaining terms into two pairs, first two and last two.
- Factor the GCF out of each pair.
- If the binomials match, factor them out as a common factor.
- Multiply back to check.
Why it works
Write the general pattern with symbols:
ac + ad + bc + bd
= a(c + d) + b(c + d)
= (a + b)(c + d)This is FOIL run backward. Multiplying (a + b)(c + d) produces four terms: ac, ad, bc and bd. Grouping recovers the two binomials from those four terms. This explains the main limit of the method. Grouping succeeds only when the four terms really came from multiplying two binomials, or from a related product with a common factor.
Handling negative signs
Negative signs cause most grouping errors. Consider x^3 - 2x^2 - 3x + 6.
x^3 - 2x^2 - 3x + 6
= (x^3 - 2x^2) + (-3x + 6)
= x^2(x - 2) - 3(x - 2)
= (x - 2)(x^2 - 3)In the second pair, factor out -3, not 3. The sign matters because -3(x - 2) = -3x + 6, which matches the original terms.
A common mistake is to factor out +3 from the second pair:
(-3x + 6) = 3(-x + 2)This is not wrong, but it gives the binomial (-x + 2), which does not match (x - 2). Factoring out the negative along with the number is what makes the binomials match.
When the binomials differ only by sign
Sometimes the original order of the terms produces binomials that are opposites. For x^3 - 2x^2 + 6 - 3x:
x^3 - 2x^2 + 6 - 3x
= (x^3 - 2x^2) + (6 - 3x)
= x^2(x - 2) + 3(2 - x)The binomials (x - 2) and (2 - x) are opposites, because 2 - x = -(x - 2). Rewrite the second term:
= x^2(x - 2) - 3(x - 2)
= (x - 2)(x^2 - 3)This is the same answer as before, which makes sense: the polynomial has the same four terms in a different order. Multiplication is commutative, so the order of terms in the original does not change the result.
Rearranging terms
Grouping the first two terms and the last two terms is a default, not a rule. If that arrangement fails, reorder the terms and try again.
Factor xy + 5 + 5y + x. The first pair xy + 5 has no common factor, and 5y + x has none either. Rearrange so that terms sharing a variable sit together:
xy + 5 + 5y + x
= xy + 5y + x + 5 reorder
= (xy + 5y) + (x + 5)
= y(x + 5) + 1(x + 5)
= (x + 5)(y + 1)Notice the 1 in 1(x + 5). When the second pair is already the binomial itself, the GCF of that pair is 1. Do not drop it, or you will end up with y(x + 5) + (x + 5) and not know how to continue. Write the 1 explicitly.
Check: (x + 5)(y + 1) = xy + x + 5y + 5, which has the same four terms as the original.
Polynomials with several variables
Grouping works the same way when the terms contain more than one variable. Factor 3xy - 6x + 4y - 8:
3xy - 6x + 4y - 8
= (3xy - 6x) + (4y - 8)
= 3x(y - 2) + 4(y - 2)
= (3x + 4)(y - 2)Check: (3x + 4)(y - 2) = 3xy - 6x + 4y - 8. ✓
Always take out the overall GCF first
Suppose the four terms share a numerical or variable factor. Take it out first, because it makes the pair-by-pair factoring easier and keeps the final answer complete.
2x^3 + 6x^2 + 4x + 12
= 2(x^3 + 3x^2 + 2x + 6)
= 2(x^2(x + 3) + 2(x + 3))
= 2(x + 3)(x^2 + 2)Skipping the first step does not break the method. You could group directly and get 2x^2(x + 3) + 4(x + 3) = (x + 3)(2x^2 + 4). But the factor (2x^2 + 4) still has a common factor of 2, so the polynomial is not factored completely. Factoring out the GCF first avoids this leftover work.
When grouping fails
Not every four-term polynomial factors by grouping. Consider x^3 + 2x^2 + 3x + 4:
(x^3 + 2x^2) + (3x + 4)
= x^2(x + 2) + (3x + 4)The remaining pieces (x + 2) and (3x + 4) do not match. Try the other arrangement:
x^3 + 3x + 2x^2 + 4
= x(x^2 + 3) + 2(x^2 + 2)Again the binomials differ. Trying the remaining pairings gives the same result.
Here is a useful way to confirm the failure. A cubic with integer coefficients that factors over the integers must have a linear factor, and a linear factor (x - r) corresponds to an integer root r that divides the constant term 4. Testing ±1, ±2, ±4 in x^3 + 2x^2 + 3x + 4 gives 10, 2, 26, -2, 112, -40 for 1, -1, 2, -2, 4, -4 respectively. None is zero, so the polynomial has no linear factor over the integers and is prime there. Grouping could not have worked.
A summary of common errors
| Error | What goes wrong | Fix |
|---|---|---|
| Dropping the `1` | Writing `y(x + 5) + (x + 5)` and getting stuck | Write `y(x + 5) + 1(x + 5)` |
| Wrong sign in second pair | Binomials look like `(x - 2)` and `(-x + 2)` | Factor out a negative GCF from the second pair |
| Stopping before the end | Leaving `(x + 3)(2x^2 + 4)` | Take out the overall GCF first, or factor again |
| Not checking | Sign errors survive into the answer | Multiply the result back out |
| Giving up too soon | Concluding "prime" after one grouping | Rearrange the terms and try the other pairings |
Checking with software
You can use SymPy to confirm a result. The function factor returns the factored form, and expand multiplies it back out so you can compare with the original.
from sympy import symbols, factor, expand
x, y = symbols('x y')
examples = [
x**3 + 3*x**2 + 2*x + 6,
x**3 - 2*x**2 - 3*x + 6,
x*y + 5 + 5*y + x,
3*x*y - 6*x + 4*y - 8,
2*x**3 + 6*x**2 + 4*x + 12,
x**3 + 2*x**2 + 3*x + 4,
]
for expr in examples:
factored = factor(expr)
print(expr, "->", factored, "| check:", expand(factored) == expand(expr))For the last polynomial, factor returns the expression unchanged, which signals that it does not factor over the integers. Every line prints check: True, because expanding a correct factorization always reproduces the original.
Where grouping leads next
Grouping is the engine behind the ac method in a later chapter. To factor 2x^2 + 7x + 3, you split the middle term into two pieces and then factor the resulting four-term polynomial by grouping. Everything you practiced here carries over, including the sign handling and the rearranging.
Exercises
Exercise
Factor 2x^3 + 8x^2 + 3x + 12 by grouping, and check your answer by multiplying.
Show answer
Group the pairs: (2x^3 + 8x^2) + (3x + 12) = 2x^2(x + 4) + 3(x + 4) = (x + 4)(2x^2 + 3). Check: (x + 4)(2x^2 + 3) = 2x^3 + 3x + 8x^2 + 12, which equals the original.
Exercise
Factor 5x^3 - 10x^2 - 15x + 30 completely. Which step comes first, and why?
Show answer
First factor out the overall GCF 5: 5(x^3 - 2x^2 - 3x + 6). Then group: x^2(x - 2) - 3(x - 2) = (x - 2)(x^2 - 3). The answer is 5(x - 2)(x^2 - 3). Taking out 5 first keeps the numbers small and avoids a leftover common factor in the last binomial.
Exercise
Factor x^3 + 4x^2 - 9x - 36 completely, then solve x^3 + 4x^2 - 9x - 36 = 0.
Show answer
Group: x^2(x + 4) - 9(x + 4) = (x + 4)(x^2 - 9). The second factor is a difference of squares, so the complete factorization is (x + 4)(x - 3)(x + 3). Setting each factor to zero gives x = -4, x = 3 and x = -3.
Exercise
A student tries to factor x^3 + 2x^2 + 3x + 4 by grouping and gets x^2(x + 2) + (3x + 4). Explain why the attempt fails and what that tells you about the polynomial.
Show answer
The binomials (x + 2) and (3x + 4) are different, so no binomial can be pulled out. Rearranging does not help either. The only possible integer roots are ±1, ±2 and ±4, and none of them makes the polynomial zero, so it has no linear factor over the integers. The polynomial is prime over the integers.