Math Core

Lesson 8.5 · Polynomials and Factoring

Factoring x² + bx + c

Quadratic trinomials like x2+7x+12x^2 + 7x + 12 are everywhere in algebra: in area problems, in projectile motion, and in the equations of the next unit. When the leading coefficient is 11, factoring one comes down to a small number puzzle: find two numbers with a given product and a given sum.

Where the numbers come from

Multiply two binomials of the form (x+p)(x+q)(x + p)(x + q):

(x+p)(x+q)=x2+qx+px+pq=x2+(p+q)x+pq.(x + p)(x + q) = x^2 + qx + px + pq = x^2 + (p + q)x + pq.

Look at where each coefficient comes from:

  • the coefficient of xx is the sum p+qp + q;
  • the constant term is the product pqpq.

For example, (x+3)(x+4)=x2+7x+12(x + 3)(x + 4) = x^2 + 7x + 12: the 77 is 3+43 + 4 and the 1212 is 3⋅43 \cdot 4. Factoring reverses this. Given x2+bx+cx^2 + bx + c, you look for the two numbers pp and qq.

Factoring x² + bx + c

To factor x2+bx+cx^2 + bx + c, find two integers pp and qq with

p⋅q=candp+q=b.p \cdot q = c \qquad \text{and} \qquad p + q = b.

Then x2+bx+c=(x+p)(x+q)x^2 + bx + c = (x + p)(x + q).

A good routine: list the factor pairs of cc and check the sum of each pair until one equals bb.

Worked example: Both signs positive

Factor x2+7x+12x^2 + 7x + 12.

You need a product of 1212 and a sum of 77.

factor pair of 1212sum
1,121, 121313
2,62, 688
3,43, 477 ✓

So x2+7x+12=(x+3)(x+4)x^2 + 7x + 12 = (x + 3)(x + 4).

Using the signs

The signs of bb and cc tell you the signs of pp and qq before you start listing:

ccbbsigns of pp and qqexample
positivepositiveboth positivex2+7x+12=(x+3)(x+4)x^2 + 7x + 12 = (x + 3)(x + 4)
positivenegativeboth negativex2−9x+20=(x−4)(x−5)x^2 - 9x + 20 = (x - 4)(x - 5)
negativeeitherone positive, one negativex2+2x−15=(x+5)(x−3)x^2 + 2x - 15 = (x + 5)(x - 3)

Here's the reasoning. A positive product means the two numbers have the same sign, and the sum tells you which sign. A negative product means opposite signs, and the number with the larger absolute value takes the sign of bb.

Worked example: Positive c, negative b

Factor x2−9x+20x^2 - 9x + 20.

Product 2020 (positive) and sum −9-9 (negative), so both numbers are negative. Try negative factor pairs of 2020: −1-1 and −20-20 sum to −21-21; −2-2 and −10-10 sum to −12-12; −4-4 and −5-5 sum to −9-9. ✓

x2−9x+20=(x−4)(x−5).x^2 - 9x + 20 = (x - 4)(x - 5).

Worked example: Negative c

Factor x2+2x−15x^2 + 2x - 15 and x2−4x−21x^2 - 4x - 21.

For x2+2x−15x^2 + 2x - 15: the product is −15-15, so the signs differ. The sum is +2+2, so the larger number is positive. The pair 55 and −3-3 works: 5⋅(−3)=−155 \cdot (-3) = -15 and 5+(−3)=25 + (-3) = 2.

x2+2x−15=(x+5)(x−3).x^2 + 2x - 15 = (x + 5)(x - 3).

For x2−4x−21x^2 - 4x - 21: product −21-21, sum −4-4, so the larger number is negative. The pair −7-7 and 33 works.

x2−4x−21=(x−7)(x+3).x^2 - 4x - 21 = (x - 7)(x + 3).

Common mistake

It's easy to find the right two numbers and then attach the wrong signs. (x−5)(x+3)(x - 5)(x + 3) looks almost like (x+5)(x−3)(x + 5)(x - 3), but it multiplies out to x2−2x−15x^2 - 2x - 15, not x2+2x−15x^2 + 2x - 15. Always check the middle term by multiplying the outer and inner products.

GCF first

If all three terms share a common factor, factor it out first. What's left is often an x2+bx+cx^2 + bx + c trinomial.

Worked example: Taking out a GCF first

Factor 3x2−6x−243x^2 - 6x - 24 completely.

Every term is divisible by 33:

3x2−6x−24=3(x2−2x−8).3x^2 - 6x - 24 = 3(x^2 - 2x - 8).

Now factor x2−2x−8x^2 - 2x - 8: product −8-8, sum −2-2. The pair −4-4 and 22 works.

3x2−6x−24=3(x−4)(x+2).3x^2 - 6x - 24 = 3(x - 4)(x + 2).

Don't drop the 33. It's part of the complete factorization.

When nothing works

Some trinomials can't be factored using integers. For x2+5x+8x^2 + 5x + 8, the factor pairs of 88 are 1,81, 8 (sum 99) and 2,42, 4 (sum 66). Neither sums to 55, and negative pairs have negative sums. A polynomial that can't be factored this way is called prime. Once you've checked every factor pair, you can say so with confidence.

Tip

When cc has many factor pairs, start with the pair whose numbers are closest together if ∣b∣|b| is small, and with the pair that's farthest apart (like 11 and cc) if ∣b∣|b| is large. Sums grow as the numbers spread apart.

Practice

Practice 1

Factor x2+8x+15x^2 + 8x + 15.

Practice 2

Factor x2−10x+21x^2 - 10x + 21.

Practice 3

The trinomial x2+x−30x^2 + x - 30 factors as (x+a)(x+b)(x + a)(x + b). Find aa and bb.

Separate answers with commas, e.g. 2, -5

Practice 4

Factor x2−5x−24x^2 - 5x - 24.

Practice 5

The trinomial x2−13x+36x^2 - 13x + 36 factors as (x−4)(x−m)(x - 4)(x - m). What is mm?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Which trinomial is prime (cannot be factored using integers)?

Practice 7

Factor 2x2+2x−402x^2 + 2x - 40 completely.

Practice 8

The trinomial x2+bx+18x^2 + bx + 18 can be factored using integers, and bb is positive. What is the largest possible value of bb?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.