Sub topic 6
Factoring ax^2 + bx + c with the ac method
What this chapter assumes
You should already be comfortable with these skills:
- Factoring out a greatest common factor (GCF).
- Factoring a four-term polynomial by grouping.
- Factoring x^2 + bx + c, where the leading coefficient is 1.
- Multiplying two binomials with FOIL.
The ac method combines the last three skills. It turns a trinomial with a leading coefficient other than 1 into a four-term polynomial, and then grouping finishes the job.
Why the leading coefficient changes things
When a = 1, you look for two numbers that multiply to c and add to b. When a is not 1, that search no longer works, because the leading coefficient is spread across both binomials. Take 2x^2 + 7x + 3. The two numbers that multiply to 3 are 1 and 3, but the answer (2x + 1)(x + 3) uses them in a way the simple sum-and-product test does not reveal.
The ac method fixes this by changing the target. You look for two numbers that multiply to a times c and add to b.
Why the method works
Multiply two general binomials:
(px + q)(rx + s) = prx^2 + (ps + qr)x + qsMatch this to ax^2 + bx + c:
- a = pr
- b = ps + qr
- c = qs
Now multiply the outer and inner products, ps and qr:
(ps)(qr) = (pr)(qs) = a * c
(ps) + (qr) = bThe two cross-products from FOIL multiply to ac and add to b. The ac method finds exactly those two cross-products. Once you have them, you split the middle term into two pieces, which is the FOIL expansion run backward, and grouping recovers the binomials.
The procedure
- Factor out any GCF of all three terms. If a is negative, also factor out -1 so the leading coefficient becomes positive.
- Compute ac.
- Find two integers m and n with m * n = ac and m + n = b.
- Rewrite bx as mx + nx.
- Factor the four-term polynomial by grouping.
- Multiply the binomials back out to check.
Worked example 1: all positive terms
Factor 2x^2 + 7x + 3.
a = 2, b = 7, c = 3, so ac = 6
Pairs that multiply to 6: (1, 6) and (2, 3)
Sums: 7 and 5. The pair 1 and 6 adds to 7.
2x^2 + 7x + 3
= 2x^2 + x + 6x + 3
= x(2x + 1) + 3(2x + 1)
= (2x + 1)(x + 3)Check by FOIL: 2x x = 2x^2, 2x 3 = 6x, 1 x = x, 1 3 = 3. The middle terms combine to 6x + x = 7x, so the product is 2x^2 + 7x + 3.
The order of the middle terms does not matter
You could split 7x as 6x + x instead:
2x^2 + 6x + x + 3
= 2x(x + 3) + 1(x + 3)
= (x + 3)(2x + 1)This gives the same factors in a different order. Either order works, so pick whichever makes the grouping easier.
Choosing the signs of m and n
The signs of ac and b tell you what kind of pair to look for before you test any numbers.
| Sign of ac | Sign of b | Signs of m and n |
|---|---|---|
| Positive | Positive | Both positive |
| Positive | Negative | Both negative |
| Negative | Positive | One of each; the larger absolute value is positive |
| Negative | Negative | One of each; the larger absolute value is negative |
When ac is positive, m and n must share a sign, and that sign is the sign of b. When ac is negative, they have opposite signs, and the one with the larger absolute value takes the sign of b.
Worked example 2: negative terms
Factor 6x^2 - 11x - 10.
ac = 6 * (-10) = -60, b = -11
ac is negative, so one number is positive and one is negative.
b is negative, so the larger absolute value is negative.
Pairs for 60: (1, 60), (2, 30), (3, 20), (4, 15), (5, 12), (6, 10)
Differences: 59, 28, 17, 11, 7, 4
The pair 4 and 15 differs by 11, so m = -15 and n = 4.
6x^2 - 11x - 10
= 6x^2 - 15x + 4x - 10
= 3x(2x - 5) + 2(2x - 5)
= (2x - 5)(3x + 2)Check: (2x - 5)(3x + 2) = 6x^2 + 4x - 15x - 10 = 6x^2 - 11x - 10.
Now see what happens if you write the pair in the other order:
6x^2 + 4x - 15x - 10
= 2x(3x + 2) - 5(3x + 2)
= (3x + 2)(2x - 5)The factors are the same. Notice the sign in the second group: when the third term is negative, you factor out a negative number (here -5) so the remaining binomial matches the first group exactly.
Worked example 3: GCF first
Factor 12x^2 + 14x - 10.
Every coefficient is even, so factor out 2 before doing anything else:
12x^2 + 14x - 10 = 2(6x^2 + 7x - 5)Now apply the ac method to the trinomial inside:
ac = 6 * (-5) = -30, b = 7
Pairs for 30: (1, 30), (2, 15), (3, 10), (5, 6)
Differences: 29, 13, 7, 1
The pair 3 and 10 differs by 7, and the larger number takes the sign of b (positive).
So m = 10 and n = -3.
6x^2 + 7x - 5
= 6x^2 + 10x - 3x - 5
= 2x(3x + 5) - 1(3x + 5)
= (3x + 5)(2x - 1)Include the 2 in the final answer:
12x^2 + 14x - 10 = 2(3x + 5)(2x - 1)If you skipped the GCF, you would work with ac = 12 * (-10) = -120 and larger numbers. The method would still work, but the arithmetic is harder and you could easily miss that a factor of 2 remains.
Worked example 4: a repeated pair signals a perfect square
Factor 4x^2 + 12x + 9.
ac = 36, b = 12
The pair 6 and 6 multiplies to 36 and adds to 12.
4x^2 + 6x + 6x + 9
= 2x(2x + 3) + 3(2x + 3)
= (2x + 3)(2x + 3)
= (2x + 3)^2When m and n turn out to be equal, the trinomial is a perfect square. A later chapter covers that pattern directly.
Common errors
- Skipping the GCF. If a trinomial still has a common factor after you finish, your answer is not factored completely. Always look for the GCF first.
- Using b where ac belongs. The pair must multiply to ac, not to c. For 2x^2 + 7x + 3, the pair (1, 3) adds to 4 and multiplies to 3, so it does not work. The pair (1, 6) is the right one.
- Sign mistakes when grouping. If the third term of the four-term polynomial is negative, factor out a negative from the second group. Write -5(2x - 5) rather than 5(2x - 5), or the binomials will not match.
- Leaving a negative leading coefficient. For -x^2 + 5x - 6, factor out -1 first: -(x^2 - 5x + 6) = -(x - 2)(x - 3).
- Skipping the check. A wrong sign often passes a quick glance but fails when you multiply.
When no pair exists
Sometimes you list every factor pair of ac, with every sign choice, and none adds to b. Then the trinomial is prime over the integers. Here is an example:
2x^2 + 3x + 4
ac = 8, b = 3
Positive pairs: (1, 8) sums to 9; (2, 4) sums to 6.
Negative pairs: sums are -9 and -6.
No pair sums to 3.This trinomial cannot be factored with integer coefficients.
There is a shortcut. After you remove the GCF, the trinomial ax^2 + bx + c factors over the integers exactly when the discriminant b^2 - 4ac is a perfect square. For 2x^2 + 3x + 4:
b^2 - 4ac = 9 - 32 = -23A negative number is not a perfect square, so the trinomial is prime. For 6x^2 - 11x - 10, the discriminant is 121 + 240 = 361 = 19^2, which is a perfect square, so a factorization exists. You can use this test to decide whether searching is worthwhile before you list pairs.
Checking your work with code
This Python script searches for the pair m and n and then uses SymPy to confirm the factorization by expanding it.
from sympy import symbols, factor, expand
def ac_pair(a, b, c):
"""Return integers (m, n) with m * n == a * c and m + n == b, or None."""
ac = a * c
limit = abs(ac)
for m in range(-limit, limit + 1):
if m != 0 and ac % m == 0:
n = ac // m
if m + n == b:
return m, n
return None
x = symbols('x')
for a, b, c in [(2, 7, 3), (6, -11, -10), (2, 3, 4)]:
print((a, b, c), ac_pair(a, b, c))
expr = a * x**2 + b * x + c
factored = factor(expr)
print(" factored:", factored)
print(" check:", expand(factored) == expr)The pair search prints (1, 6) for 2x^2 + 7x + 3, (-15, 4) for 6x^2 - 11x - 10, and None for 2x^2 + 3x + 4. SymPy leaves the last expression unfactored. The check prints True in every case, because expanding an unfactored expression returns the same expression.
Summary
The ac method works because the two cross-products in FOIL multiply to ac and add to b. Find that pair, split the middle term, and factor by grouping. Take out the GCF first, use the sign table to narrow the search, and multiply back to verify. If no pair exists, the trinomial is prime over the integers.
Exercise
Factor 3x^2 + 10x + 8 using the ac method and check your answer.
Show answer
ac = 24 and b = 10. The pair 4 and 6 multiplies to 24 and adds to 10. Then 3x^2 + 4x + 6x + 8 = x(3x + 4) + 2(3x + 4) = (3x + 4)(x + 2). Check: 3x^2 + 6x + 4x + 8 = 3x^2 + 10x + 8.
Exercise
Factor 4x^2 - 4x - 15.
Show answer
ac = -60 and b = -4. The pair -10 and 6 multiplies to -60 and adds to -4. Then 4x^2 - 10x + 6x - 15 = 2x(2x - 5) + 3(2x - 5) = (2x - 5)(2x + 3). Check: 4x^2 + 6x - 10x - 15 = 4x^2 - 4x - 15.
Exercise
Factor 18x^2 + 3x - 6 completely.
Show answer
Factor out the GCF 3 first: 3(6x^2 + x - 2). For the trinomial, ac = -12 and b = 1, and the pair 4 and -3 works. Then 6x^2 + 4x - 3x - 2 = 2x(3x + 2) - 1(3x + 2) = (3x + 2)(2x - 1). The complete answer is 3(3x + 2)(2x - 1).
Exercise
Use the discriminant b^2 - 4ac to decide whether 6x^2 + 5x - 4 factors over the integers. If it does, factor it.
Show answer
The discriminant is 25 - 4(6)(-4) = 25 + 96 = 121 = 11^2, a perfect square, so it factors. Here ac = -24 and b = 5, and the pair 8 and -3 works. Then 6x^2 + 8x - 3x - 4 = 2x(3x + 4) - 1(3x + 4) = (3x + 4)(2x - 1). Check: 6x^2 - 3x + 8x - 4 = 6x^2 + 5x - 4.