algebra

How to Factor Polynomials: Six Methods, Step by Step

Master polynomial factoring with the six standard techniques: GCF, grouping, difference of squares, perfect squares, integer search, and rational roots. With worked examples.

本文中文版本即将上线。下方暂以英文原文展示。

AI-Math Editorial Team

作者: AI-Math Editorial Team

发布于 2026-05-02

Factoring polynomials is the bridge between algebra and almost everything that follows — solving equations, simplifying rational expressions, integrating in calculus. This guide goes through the six standard techniques in order, so when you see a polynomial you have a checklist instead of a guess.

The decision tree

For any polynomial, ask in this order:

  1. Common factor? Pull it out first.
  2. Two terms → difference of squares / cubes.
  3. Three terms → perfect square or integer-pair search.
  4. Four terms → grouping.
  5. High-degree → rational root test, then synthetic division.

Following this order saves time and prevents missed factorisations.

Method 1: Greatest common factor (GCF)

Always pull out the GCF first. It simplifies everything else.

Example: Factor 6x3+9x215x6x^3 + 9x^2 - 15x.

  • GCF of 6,9,156, 9, -15 is 33. GCF of x3,x2,xx^3, x^2, x is xx.
  • Combined GCF: 3x3x.
  • 6x3+9x215x=3x(2x2+3x5)6x^3 + 9x^2 - 15x = 3x(2x^2 + 3x - 5).
  • Now factor the inner quadratic: find numbers multiplying to (2)(5)=10(2)(-5) = -10 and adding to 33. Try 55 and 2-2: ✓.
  • Final: 3x(2x+5)(x1)3x(2x + 5)(x - 1).

Method 2: Difference of squares

If you see a2b2a^2 - b^2, immediately apply

a2b2=(ab)(a+b).a^2 - b^2 = (a - b)(a + b).

Example: x249=(x7)(x+7)x^2 - 49 = (x - 7)(x + 7).

Watch for hidden squares: 4x225=(2x)252=(2x5)(2x+5)4x^2 - 25 = (2x)^2 - 5^2 = (2x - 5)(2x + 5).

Method 3: Sum and difference of cubes

a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)
a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2)

Example: x327=x333=(x3)(x2+3x+9)x^3 - 27 = x^3 - 3^3 = (x - 3)(x^2 + 3x + 9).

The middle term in the trinomial factor often confuses students — it has the opposite sign from the original cubes' sign, then a positive last term.

Method 4: Perfect square trinomial

a2±2ab+b2=(a±b)2a^2 \pm 2ab + b^2 = (a \pm b)^2

Example: x2+6x+9=(x+3)2x^2 + 6x + 9 = (x + 3)^2 — recognise because 9=329 = 3^2 and 6=236 = 2 \cdot 3.

This pattern shows up everywhere in calculus (completing the square, Gaussian integrals).

Method 5: Integer-pair search for x2+bx+cx^2 + bx + c

Find two numbers that multiply to cc and add to bb.

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

  • Pairs of 1212: (1,12),(2,6),(3,4)(1,12), (2,6), (3,4). Pair (3,4)(3, 4) adds to 77. ✓
  • Result: (x+3)(x+4)(x + 3)(x + 4).

For ax2+bx+cax^2 + bx + c with a1a \neq 1, use the AC method: find pair multiplying to acac and adding to bb, split the middle term, factor by grouping.

Method 6: Factoring by grouping

Used when you have four terms. Group in pairs, factor each pair, hope for a common binomial.

Example: Factor x3+2x2+3x+6x^3 + 2x^2 + 3x + 6.

  • Group: (x3+2x2)+(3x+6)=x2(x+2)+3(x+2)(x^3 + 2x^2) + (3x + 6) = x^2(x + 2) + 3(x + 2).
  • Common factor (x+2)(x + 2): (x+2)(x2+3)(x + 2)(x^2 + 3).

Grouping also handles trinomials when the AC method requires splitting the middle term.

Method 7 (advanced): Rational root theorem

For higher-degree polynomials with integer coefficients, the rational root theorem says any rational root p/qp/q has pp dividing the constant term and qq dividing the leading coefficient. Test those candidates with synthetic division — once you find one root rr, (xr)(x - r) is a factor and you can reduce the polynomial's degree.

Example: Factor x32x2x+2x^3 - 2x^2 - x + 2.

  • Possible rational roots: ±1,±2\pm 1, \pm 2.
  • Test x=1x = 1: 121+2=01 - 2 - 1 + 2 = 0. ✓ So (x1)(x - 1) is a factor.
  • Synthetic division gives x2x2x^2 - x - 2, which factors as (x2)(x+1)(x - 2)(x + 1).
  • Final: (x1)(x2)(x+1)(x - 1)(x - 2)(x + 1).

Common mistakes

  • Forgetting to pull out the GCF first — leads to ugly factoring and missed simplification.
  • Sign errors in difference of squaresa2b2(ab)2a^2 - b^2 \neq (a - b)^2. Many students accidentally write the perfect-square form.
  • Trying to factor primes. Not every quadratic factors over the integers. x2+1x^2 + 1 has no real factorisation. Switch to the quadratic formula or accept "irreducible."
  • Stopping after one pass. Always check whether each factor can be factored further (especially after pulling out a GCF — the inner expression often factors again).

Practice with our solver

Drop any polynomial into the free Factoring Calculator and we'll show every step, including which method we tried and why. Pair it with the Quadratic Solver when factoring fails for second-degree.

For specific worked examples:

AI-Math Editorial Team

作者: AI-Math Editorial Team

发布于 2026-05-02

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.