Structure preview

Factoring polynomials: choosing a method, step by step

Common factors, identities, quadratics and synthetic division: worked examples, exact checks and exercises with hidden solutions. Includes a rational-coefficient laboratory.

Section: Algebra Updated:

Factoring polynomials: a step-by-step laboratory

Articles /scomposizione-polinomi-metodi-esempi-ruffini
Factoring polynomials: choosing a method, step by step

25 min

Expanding and factoring are opposite journeys. Expanding a product gives a sum; factoring a sum finds an equivalent product. This is not guesswork: examine coefficients, exponents and signs, choose a rule, then check the result.

Illustration for the Algebra section
Section: Algebra

Factoring polynomials: a step-by-step laboratory

What does factoring mean?

(x + 2)(x + 3) = x² + 3x + 2x + 6 = x² + 5x + 6. Read backwards, this gives x² + 5x + 6 = (x + 2)(x + 3).

A polynomial identity holds for every value of x. Factoring is not solving an equation: only after setting the product equal to zero can we use the zero-product property to find solutions.

A rectangle with sides x plus 2 and x plus 3 is divided into areas x squared, 2x, 3x and 6.
The four areas add to x² + 5x + 6; the sides reveal (x + 2)(x + 3), with positive x in the diagram.

Before choosing a formula

  1. Combine like terms and arrange by powers of x.
  2. First look for a common numerical or variable factor.
  3. Count the remaining terms and inspect their powers: two squares? A three-term square? Two cubes? Four terms that can be grouped?
  4. For a quadratic trinomial, check the sum and product or use the discriminant.
  5. If patterns are insufficient, test rational roots and use synthetic division.
  6. Repeat on each factor and check by expanding.

Different methods can give the same product, up to factor order and a numerical factor.

Taking out a common factor: the first check

In 6x³ + 9x², the GCD of 6 and 9 is 3; the smallest common power is x². Divide each term by 3x²:

6x³/(3x²) = 2x, 9x²/(3x²) = 3, so 6x³ + 9x² = 3x²(2x + 3).

Fractions remain exact: (1/2)x² + (3/2)x = (1/2)x(x + 3). Put coefficients over a common denominator and take out the GCD of their numerators.

Factoring by grouping: create a common factor

2x³ + 3x² + 4x + 6 has no factor common to every term. Group the terms:

x²(2x + 3) + 2(2x + 3) = (2x + 3)(x² + 2).

The first step produces two identical brackets; the second takes out that bracket. For x³ - 2x² - x + 2, signs matter: x²(x - 2) - (x - 2) = (x - 2)(x² - 1). The factor x² - 1 can be factored further.

Difference of squares

A² - B² = (A - B)(A + B). Expanding cancels the mixed terms: A² + AB - AB - B².

9x² - 25 = (3x - 5)(3x + 5); x⁴ - 16 = (x² - 4)(x² + 4) = (x - 2)(x + 2)(x² + 4).

The rule requires a difference. x² + 9 is not (x - 3)(x + 3), which expands to x² - 9.

Square and cube of a binomial

A² + 2AB + B² = (A + B)² and A² - 2AB + B² = (A - B)². Squares at both ends are insufficient: the middle term must be exactly twice their product.

4x² - 12x + 9 = (2x - 3)², because 2·2x·3 = 12x. However, x² + 3x + 1 is not a binomial square.

A³ + 3A²B + 3AB² + B³ = (A + B)³; replacing B by -B gives A³ - 3A²B + 3AB² - B³ = (A - B)³.

x³ + 6x² + 12x + 8 = (x + 2)³: check all four terms.

Sum and difference of cubes

A³ + B³ = (A + B)(A² - AB + B²)
A³ - B³ = (A - B)(A² + AB + B²).

8x³ + 27 = (2x + 3)(4x² - 6x + 9); x³ - 8 = (x - 2)(x² + 2x + 4). The final term in the quadratic stays positive; its middle term has the opposite sign to the binomial.

Quadratic trinomials

Start with the roots x₁ and x₂ and expand: (x - x₁)(x - x₂) = x² - x₂x - x₁x + x₁x₂ = x² - (x₁ + x₂)x + x₁x₂.

The equation with solutions x₁ and x₂ is x² - (x₁ + x₂)x + x₁x₂ = 0. Comparing with x² + bx + c = 0 gives b = -(x₁ + x₂) and c = x₁x₂, hence x₁ + x₂ = -b and x₁x₂ = c.

The corresponding factoring identity, without setting the polynomial equal to zero, is x² + bx + c = (x - x₁)(x - x₂).

For x² + 5x + 6, find roots with sum -5 and product 6: x₁ = -2 and x₂ = -3. Indeed, (-2) + (-3) = -5 and (-2)(-3) = 6. Thus x² + 5x + 6 = [x - (-2)][x - (-3)] = (x + 2)(x + 3). +2 and +3 are the constants inside the brackets, not the roots: the polynomial vanishes at x = -2 and x = -3.

With leading coefficient a ≠ 0, x₁ + x₂ = -b/a, x₁x₂ = c/a and ax² + bx + c = a(x - x₁)(x - x₂): keep the factor a.

For 2x² + 7x + 3, the roots are x₁ = -1/2 and x₂ = -3: their sum is -7/2 and product 3/2. Hence 2x² + 7x + 3 = 2[x - (-1/2)][x - (-3)] = 2(x + 1/2)(x + 3) = (2x + 1)(x + 3). Splitting the middle term gives the same product: 2x² + 6x + x + 3 = 2x(x + 3) + (x + 3).

If the roots are not obvious, use Δ = b² - 4ac, x₁ = (-b + √Δ)/(2a) and x₂ = (-b - √Δ)/(2a). For primitive integer coefficients, rational linear factors exist exactly when Δ is a non-negative integer square. With a = 2, b = 7, c = 3, Δ = 49 - 24 = 25.

A substitution can reveal a quadratic

x⁴ + 5x² + 4 contains only x⁴, x² and a constant. Set t = x²: t² + 5t + 4 = (t + 1)(t + 4). Return to x to obtain (x² + 1)(x² + 4).

Both factors are irreducible over ℚ. Substitution reveals the pattern, but the final answer must return to the original variable.

Rational roots and synthetic division, without skipped steps

The factor theorem says P(r) = 0 exactly when x - r divides P(x). For integer coefficients and a reduced fraction r = p/q, p divides the constant coefficient and q divides the leading coefficient. The candidate list is finite.

For P(x) = x³ - 6x² + 11x - 6, the candidates are ±1, ±2, ±3, ±6. Test 1: P(1) = 1 - 6 + 11 - 6 = 0. Synthetic division gives:

r = 11-611-6
Products—1-56
Sums1-560
  1. Bring down 1.
  2. Multiply 1 by the root 1; add to -6 to get -5.
  3. Multiply -5 by 1; add to 11 to get 6.
  4. Multiply 6 by 1; add to -6: the remainder is zero.

The quotient is x² - 5x + 6. Thus P(x) = (x - 1)(x² - 5x + 6) = (x - 1)(x - 2)(x - 3). Insert a zero coefficient for every missing power. For root p/q, rewrite the monic factor x - p/q as qx - p while compensating the numerical factor.

When several methods are needed

2x³ - 8x = 2x(x² - 4) = 2x(x - 2)(x + 2): first take out the common factor, then recognise the difference of squares.

x³ - 2x² - x + 2 = (x - 2)(x² - 1) = (x - 2)(x - 1)(x + 1). Factoring is complete only when no factor can be split further over the chosen field.

Irreducible over which coefficients?

x² - 2 is irreducible over the rationals but becomes (x - √2)(x + √2) over the reals. x² + 1 is irreducible even over the reals, but not over the complex numbers. Saying only “impossible” is ambiguous.

The laboratory works over ℚ, the rational coefficients. In degrees 2 and 3, the absence of rational roots proves irreducibility. From degree 4 onwards it does not: x⁴ + 5x² + 4 = (x² + 1)(x² + 4) has no rational roots but is reducible.

For cases not recognised by school methods, the laboratory tries an exact Kronecker search: an integer factor takes values dividing P at selected integer points. Interpolation reconstructs candidates from these values, then exact division checks them. Only a completed search certifies the absence of factors. Reaching the calculation limit gives a partial result, not a false claim of irreducibility.

Checking and avoiding mistakes

The final check is to expand the product and recover all original coefficients. Testing only x = 0 or x = 1 does not prove an identity.

  • Keep the common factor taken out at the start.
  • Do not confuse (A - B)² with A² - B².
  • Do not apply the difference-of-squares rule to a sum.
  • Keep zero coefficients in synthetic division.
  • Do not conclude “irreducible” simply because you cannot find a root.
  • Do not stop while a factor can still be split.

Using the laboratory

Enter a polynomial in x, select an example or switch to Practice. Integer and fractional coefficients, brackets, products and integer powers from 0 to 8 are accepted, with degree at most 8 even in intermediate products. Enter (1/2)x² + (3/2)x, 2x^3 - 8x or (x + 1)^3. No decimals, other variables or denominators containing x.

Each step identifies the factor being processed. Advance one step at a time or show everything; the result and check remain in an expandable panel. Practice hints and solutions stay hidden until requested. Calculation is bounded to keep the device responsive, so demanding cases may remain partial. Zero and constants are handled separately.

Try it: hidden solutions

1. 6x^3 + 9x^2

Show the explained solution

Take out 3x²; the remaining bracket is linear.

6x^3 + 9x^2 = 3 · (2x + 3) · (x)^2

Try in the laboratory

2. 9x^2 - 25

Show the explained solution

Recognise the difference between (3x)² and 5².

9x^2 - 25 = (3x - 5) · (3x + 5)

Try in the laboratory

3. 4x^2 - 12x + 9

Show the explained solution

Check the middle term -2·2x·3.

4x^2 - 12x + 9 = (2x - 3)^2

Try in the laboratory

4. 8x^3 + 27

Show the explained solution

Sum of cubes: A = 2x and B = 3.

8x^3 + 27 = (2x + 3) · (4x^2 - 6x + 9)

Try in the laboratory

5. x^2 + 5x + 6

Show the explained solution

The roots are -2 and -3: their sum is -5 and product 6. The factors are [x - (-2)] and [x - (-3)].

x^2 + 5x + 6 = (x + 2) · (x + 3)

Try in the laboratory

6. 2x^2 + 7x + 3

Show the explained solution

The roots are -1/2 and -3: their sum is -7/2 and product 3/2. Keep a = 2: 2(x + 1/2)(x + 3) = (2x + 1)(x + 3).

2x^2 + 7x + 3 = (2x + 1) · (x + 3)

Try in the laboratory

7. 2x^3 + 3x^2 + 4x + 6

Show the explained solution

Group x²(2x + 3) + 2(2x + 3). The quadratic is irreducible over ℚ.

2x^3 + 3x^2 + 4x + 6 = (2x + 3) · (x^2 + 2)

Try in the laboratory

8. 2x^3 - 8x

Show the explained solution

Take out 2x, then factor x² - 4.

2x^3 - 8x = 2 · (x) · (x - 2) · (x + 2)

Try in the laboratory

9. x^3 - 6x^2 + 11x - 6

Show the explained solution

Synthetic division with root 1 leaves x² - 5x + 6; factor again.

x^3 - 6x^2 + 11x - 6 = (x - 1) · (x - 2) · (x - 3)

Try in the laboratory

10. x^4 + 5x^2 + 4

Show the explained solution

Set t = x²; t² + 5t + 4 = (t + 1)(t + 4).

x^4 + 5x^2 + 4 = (x^2 + 1) · (x^2 + 4)

Try in the laboratory

11. x^2 - 2

Show the explained solution

x² - 2 does not factor over ℚ: Δ = 8 is not a rational square. It does factor over the reals using √2.

x^2 - 2 = (x^2 - 2)

Try in the laboratory

12. x^4 + 4

Show the explained solution

Add and subtract 4x²: x⁴ + 4 = (x² + 2)² - (2x)². Then use a difference of squares.

x^4 + 4 = (x^2 - 2x + 2) · (x^2 + 2x + 2)

Try in the laboratory

Further reading

Factoring polynomials: a step-by-step laboratory