Proofwell
Menu

Polynomial Factorizer

Enter a polynomial and get its factorisation over the integers, with each step explained. Polynomials in one variable, and homogeneous polynomials in two variables, are always factored completely. For other expressions, the tool tells you whether it can guarantee the result is complete.

Mathematics · AlgebraUpdated Sources cited

Use ^ for powers: x^3 - 2x + 1. Brackets are expanded first, so (x + 1)^2 - 4 works. Each letter is a separate variable.
Examples:

Result

Completely factored over the integers

Factored form

(2x−1)(x−2)(x+3)\left(2x - 1\right)\left(x - 2\right)\left(x + 3\right)

Expanded form

2x3+x2−13x+62x^{3} + x^{2} - 13x + 6
  • 2x−12x - 1Irreducible
  • x−2x - 2Irreducible
  • x+3x + 3Irreducible
Assumptions behind this result
  • Factorisation is over the integers (equivalently the rationals). Factors with irrational or complex coefficients, such as x − √2, are not used.

Step-by-step solution

Every step is computed from your input
  1. Step 1: Expand and write in standard form

    Multiply out any brackets and collect like terms, highest degree first.

    2x3+x2−13x+62x^{3} + x^{2} - 13x + 6
  2. Step 2: Find rational roots of 2x^3 + x^2 - 13x + 6

    By the rational root theorem, candidates are ±(divisors of the constant term)/(divisors of the leading coefficient). Testing them gives x = -3, x = 1/2, x = 2, so (x + 3)(2x - 1)(x - 2) are factors.

  3. Step 3: Check by expanding

    Multiplying the factors back out gives the original polynomial exactly, and no factor can be broken down further over the integers.

    (2x−1)(x−2)(x+3)=2x3+x2−13x+6\left(2x - 1\right)\left(x - 2\right)\left(x + 3\right) = 2x^{3} + x^{2} - 13x + 6

What the factorizer does

Enter a polynomial in any form, with brackets, fractions or several variables. The tool:

  1. expands it and writes it in standard form;
  2. takes out the greatest common factor, including powers of variables;
  3. recognises standard identities and repeated factors;
  4. finds every linear factor using the rational root theorem;
  5. checks whether each remaining factor can be split further;
  6. expands the final answer to confirm that it equals the original polynomial.

How to use it

Type the polynomial using ^ for powers, for example 3x^4 - 12x^2. Multiplication can be written as * or left implicit (3xy). Each letter is its own variable, so xy means x·y. Brackets are expanded before factoring, so (x + 1)^2 - 4 is fine.

Methods and identities

Greatest common factor

Always start by taking out the largest factor common to every term:

6x3−15x2+6x=3x (2x2−5x+2)6x^3 - 15x^2 + 6x = 3x\,(2x^2 - 5x + 2)

Standard identities

a2−b2=(a−b)(a+b)a2±2ab+b2=(a±b)2a3+b3=(a+b)(a2−ab+b2)a3−b3=(a−b)(a2+ab+b2)\begin{aligned} a^2 - b^2 &= (a - b)(a + b) \\ a^2 \pm 2ab + b^2 &= (a \pm b)^2 \\ a^3 + b^3 &= (a + b)(a^2 - ab + b^2) \\ a^3 - b^3 &= (a - b)(a^2 + ab + b^2) \end{aligned}

The rational root theorem

If a polynomial with integer coefficients has a rational root p/q in lowest terms, then p divides the constant term and q divides the leading coefficient. Each such root gives a factor (qx − p). For 2x² − 5x + 2, the candidates are ±1, ±2 and ±1/2. Testing shows that x = 2 and x = 1/2 are roots, so the factors are (x − 2) and (2x − 1).

Factoring by grouping

With four terms, pair them so each pair has a common factor that leaves the same bracket:

xy+2x+3y+6=x(y+2)+3(y+2)=(x+3)(y+2)xy + 2x + 3y + 6 = x(y + 2) + 3(y + 2) = (x + 3)(y + 2)

When can a factor not be split further?

A quadratic or cubic factor with no rational roots cannot be factored over the integers, because any factorisation would include a linear factor and therefore a rational root. For higher degrees, the tool tries every way of grouping the polynomial’s roots into a factor with integer coefficients, and confirms any candidate by exact division. When none works, the factor is proven irreducible.

Worked example

Factor 6x³ − 15x² + 6x completely.

  1. Common factor. Every term is divisible by 3x: 6x³ − 15x² + 6x = 3x(2x² − 5x + 2).
  2. Rational roots of the quadratic. The candidates are ±1, ±2 and ±1/2. Substituting x = 2 gives 8 − 10 + 2 = 0, and x = 1/2 gives 1/2 − 5/2 + 2 = 0.
  3. Write the factors. The roots 2 and 1/2 give the factors (x − 2) and (2x − 1).
  4. Check. 3x(2x − 1)(x − 2) = 3x(2x² − 5x + 2) = 6x³ − 15x² + 6x ✓.

Common mistakes

  • Forgetting the common factor. Factor out the GCF first; otherwise the remaining factors are harder to find and the answer is incomplete.
  • Stopping too early. x⁴ − 16 = (x² − 4)(x² + 4) is not finished: x² − 4 is itself a difference of squares.
  • Trying to factor a sum of squares. x² + 4 does not factor over the integers. Only a difference of squares does.
  • Sign errors with cubes. In a³ − b³ = (a − b)(a² + ab + b²), the sign in the quadratic is the opposite of the sign in the linear factor.
  • Dropping a constant. −x² + 1 = −(x − 1)(x + 1); the leading minus sign is part of the answer.

Practical applications

  • Solving equations. A factored polynomial shows its roots directly.
  • Simplifying fractions. Rational expressions simplify by cancelling common factors of the numerator and denominator.
  • Partial fractions. Integrating a rational function starts by factoring its denominator.
  • Graph sketching. Linear factors give the x-intercepts; repeated factors show where the graph touches the axis.

Assumptions and limitations

Factorisation is over the integers, so factors such as x − √2 or x − i are not used. Polynomials in one variable, and homogeneous polynomials in two variables, are factored completely, with each factor proven irreducible. Other polynomials in several variables are factored with common factors, grouping and standard identities. When those methods find nothing further, the tool says that completeness is not guaranteed. Degrees above 40 are not supported.

Frequently asked questions

What does "factored over the integers" mean?

The factors have integer (or, equivalently, rational) coefficients. Under this rule x² − 2 cannot be factored, even though it equals (x − √2)(x + √2) over the real numbers. This is the convention used in algebra courses and by most textbooks.

How do I know the answer is completely factored?

For polynomials in one variable, and for homogeneous polynomials in two variables such as x² + 5xy + 6y², the tool proves each factor cannot be split further and labels the result "completely factored". For other multivariable polynomials it uses common factors, grouping and standard identities, and says when it cannot guarantee completeness.

Why is x⁴ + 4 factorable when it has no real roots?

A polynomial without real roots can still split into quadratic factors. x⁴ + 4 = (x² − 2x + 2)(x² + 2x + 2), an identity attributed to Sophie Germain. The tool finds such factors by grouping the polynomial's complex roots, and confirms each one by exact division.

Can I enter fractions or decimals?

Yes. x^2/2 - 1/2 is factored as ½(x − 1)(x + 1). Decimals are treated as exact fractions.

What is the difference between factoring and solving?

Factoring rewrites a polynomial as a product. Solving finds the values that make it zero. Each linear factor (ax − b) gives a solution x = b/a, so factoring is often the first step in solving.

References

  1. von zur Gathen, J. & Gerhard, J. (2013). Modern Computer Algebra (3rd ed.), chapters 14–16 (factoring polynomials). Cambridge University Press.
  2. Yun, D. Y. Y. (1976). On square-free decomposition algorithms. Proceedings of the 1976 ACM Symposium on Symbolic and Algebraic Computation, 26–35.
  3. Weisstein, E. W. Rational Zero Theorem. MathWorld, Wolfram Research.