Factoring can feel like guesswork. You stare at a polynomial, try one identity, abandon it, try another. The truth is that most school-level factoring is not a guessing game — it is routing. Count the terms, follow the right branch, apply the named method. The decision tree below handles around 95% of the polynomials you will see from class 9 through JEE Mains.
The flowchart
Read it from top to bottom. The blue boxes are decisions; the green boxes are actions; the red boxes are end states (the factored form is what you wrote down by following the path).
Walk through the tree once and the rest of the article makes sense. The five sections below explain each branch in turn.
2-term polynomials: difference and sum of squares and cubes
Two terms is the smallest a non-trivial polynomial can shrink to, and there are exactly four shapes you should know.
- Difference of squares: a^2 - b^2 = (a - b)(a + b).
- Difference of cubes: a^3 - b^3 = (a - b)(a^2 + ab + b^2).
- Sum of cubes: a^3 + b^3 = (a + b)(a^2 - ab + b^2).
- Sum of squares: a^2 + b^2 does not factor over the real numbers. It is irreducible. (See why (a+b)(a-b) collapses but the squared version does not for the cross-term reason.)
Recognising the pattern is the whole game. Both terms perfect squares with a minus between them? Both terms perfect cubes? If yes, the identity does the work in one step.
Worked example. Factor x^2 - 16. Both terms are perfect squares: x^2 = (x)^2 and 16 = 4^2. Apply difference of squares with a = x, b = 4:
Worked example. Factor x^3 - 27. Both terms are perfect cubes: x^3 = (x)^3 and 27 = 3^3. Apply difference of cubes with a = x, b = 3:
The quadratic factor x^2 + 3x + 9 has discriminant 9 - 36 = -27 < 0, so it is irreducible over the reals. You stop here.
3-term polynomials: perfect-square check, then split-the-middle
Three terms is the most common shape — every quadratic in standard form is a three-term polynomial. The flowchart asks two questions in order.
First, is it a perfect-square trinomial? A perfect-square trinomial has the shape a^2 \pm 2ab + b^2 and folds back into (a \pm b)^2. To check, see if the first and last terms are perfect squares, then see if the middle term is exactly \pm 2 \cdot a \cdot b. If yes, you are done in one step.
Second, if not a perfect square, use split-the-middle (the ac method). For a trinomial ax^2 + bx + c, find two numbers p and q such that p \cdot q = ac and p + q = b. Split the middle term bx into px + qx, and you now have a four-term polynomial that factors by grouping.
Worked example. Factor x^2 + 5x + 6. Not a perfect square (the constant 6 is not a perfect square anyway). Use split-the-middle: a c = 1 \cdot 6 = 6. You need two numbers with product 6 and sum 5. Those are 2 and 3. Split:
Worked example. Factor 2x^2 + 7x + 3. Now a \neq 1, so the ac trick really matters. a c = 2 \cdot 3 = 6. You need two numbers with product 6 and sum 7. Those are 6 and 1. Split:
The split-the-middle method is the general workhorse of three-term factoring; the perfect-square shortcut is only worth taking when you can spot it on sight.
4-term polynomials: grouping
Four terms is the canonical signal for grouping. Pair the terms two and two, factor a common piece out of each pair, and look for the same binomial bracket sitting in both halves. If you find it, pull it out as the common factor.
Worked example. Factor x^3 + x^2 + 2x + 2.
The first pair gave x^2 outside and (x + 1) inside; the second pair gave 2 outside and the same (x + 1) inside. That repeated bracket is the common factor.
If the pairing does not produce a common bracket on the first try, swap the order of the terms before grouping. Sometimes the natural left-to-right split hides the structure, and you have to rearrange to see it.
Step 0 — always try GCF first
Before you count terms, before you reach for any identity, look for a greatest common factor. If every term shares a number, a variable, or a binomial, pull it out front. The remaining polynomial is smaller and easier to handle.
Take 4x^3 + 8x^2 + 4x. Every term contains a factor of 4x:
After pulling out the 4x, what remained was x^2 + 2x + 1 — a perfect-square trinomial. If you had skipped the GCF step, you would have started with a cubic and worked harder for the same answer. The GCF step is free; never skip it.
When the flowchart doesn't fit
The decision tree handles the bulk of school-level factoring, but the corners do exist.
- Higher-degree polynomials. A degree-5 or degree-7 polynomial usually does not yield to grouping alone. Use the Rational Root Theorem with synthetic division: test candidate rational roots, peel off linear factors (x - r) one at a time, then return to the flowchart.
- Irreducible polynomials. Some polynomials are primes — no non-trivial factorisation over the reals. a^2 + b^2 is the simplest example; any quadratic with negative discriminant is irreducible. When you hit one, that is the answer.
- Mixed-variable expressions. Treat one variable as the main one and the other as a constant. The flowchart still applies; the "numbers" are now small expressions in the second variable.
Five worked examples — apply the flowchart
Each of these starts at the top of the tree, follows one branch, and stops.
- x^2 - 9. 2 terms. Both perfect squares with a minus. Difference of squares. x^2 - 9 = (x - 3)(x + 3).
- x^2 + 6x + 9. 3 terms. Check perfect square: x^2 = (x)^2, 9 = 3^2, middle term 6x = 2 \cdot x \cdot 3. Yes. (x + 3)^2.
- x^2 - 7x + 12. 3 terms. Not a perfect square (12 is not a perfect square). Split-the-middle: product 12, sum -7. The pair is -3 and -4. (x - 3)(x - 4).
- ax + ay + bx + by. 4 terms. Grouping. a(x + y) + b(x + y) = (a + b)(x + y).
- 2x^3 - 4x^2. GCF first. Both terms share 2x^2. 2x^3 - 4x^2 = 2x^2(x - 2). Now what is left, x - 2, is a single linear term — no further factoring possible. Done.
Each of those took less than thirty seconds because the flowchart told you which method to use without any guessing.
Why the flowchart works
The tree is just the catalogue of standard identities organised by the most visible feature of any polynomial: how many terms it has. Each term-count maps to a small set of named methods, and within each method the steps are mechanical. The work that used to feel like guessing — "should I try grouping or the ac method?" — is now decided up front by counting.
The flowchart covers more than 95% of factoring problems in NCERT class 9 and 10 and most of the algebra in JEE Mains. The remaining 5% — irreducible polynomials, high-degree cases, exotic patterns — need either the Rational Root Theorem or genuine cleverness. For those, see the parent article on polynomial factorization.
Count the terms. Follow the branch. Apply the method. The only cases left to think about are the ones that genuinely deserve thought.