What does factoring a polynomial give?
Type a polynomial such as x^2 + 2x - 15 to write it as a product of simpler factors. The page checks that the factors multiply back to your polynomial.
- Factored form
- (x - 3) (x + 5)
Factoring x^2 + 2x - 15 gives (x - 3) (x + 5).
Factored form: (x - 3) (x + 5). Factoring x^2 + 2x - 15 gives (x - 3) (x + 5).
How to calculate
Factors a polynomial over the rational numbers, checking the product of the factors.
Example with the default inputs (Polynomial x^2 + 2x - 15): Factoring x^2 + 2x - 15 gives (x - 3) (x + 5).
Method: A computer algebra system factors over the rationals; the factors show only when their product equals the polynomial at 20 points.
- Factors have rational coefficients.
- An answer that fails its check is not shown.
Worked examples
Each example is checked against the calculator on every build.
- Polynomial x^2 + 2x - 15 gives Factored form (x - 3) (x + 5).Source: OpenStax College Algebra 2e, 1.5, Ex. 2. https://openstax.org/books/college-algebra-2e/pages/1-5-factoring-polynomials
- Polynomial 5x^2 + 7x - 6 gives Factored form (5x - 3) (x + 2).
- Polynomial 8x^3 - 125 gives Factored form (2x - 5) (4x^2 + 10x + 25).
How it works
The factoring calculator writes a polynomial as a product of factors whose coefficients are rational numbers. A computer algebra system (nerdamer, open source) does the factoring: it takes out a common factor, finds rational roots, and uses the square and cube patterns. The algebra runs after you start typing, in the background.
Every answer is checked before it is shown. The factored form must equal the polynomial at 20 points (fixed pseudo-random numbers, mostly between −4 and 4), to 1 part in 10⁹. A form that fails is never shown; the page says "No verified answer" instead.
What you can type
- A polynomial in one lowercase letter: x, t, y, and so on. Two different letters give no answer. The letter e is Euler’s number, and pi (or π) is π.
- Terms with whole-number powers of the letter (0, 1, 2, …) and numeric coefficients, which may be fractions or decimals: 5x^2 + 7x - 6, 0.5x^2 - 2, x^3/2 + 4. Products and powers of brackets are fine: (x + 1)^2 (x - 3).
- Not allowed: the letter in a denominator (1/x), a fractional or negative power of it (sqrt(x), x^-1), or a function of it (sin(x), ln(x)). Such input, and a number with no letter, gets no answer.
How answers are written
- The factors are in the syntax you type, with a space between factors:
(x - 3) (x + 5). A repeated factor is a power:(5x + 2)^2. A common number or power of the letter comes first:2x (x + 1)^2. - Factors are in order of degree, lowest first; inside each factor the terms go by power of the letter, highest first.
- Coefficients are exact: whole numbers or fractions. A number factor may stay outside as a fraction: 0.5x² − 2 gives
(x - 2) (x + 2)/2. - A polynomial with no factor over the rational numbers is shown unchanged, in the same order of terms.
- A quadratic factor ax² + bx + c whose roots are rational is always split, from its roots p/q, into (qx − p) factors with the number in front collected: 2x² + 9x + 4 gives (x + 4) (2x + 1), and −2x² − 5x − 2 gives −(2x + 1) (x + 2). The split form is checked equal to the algebra's at 15 points.
- A factor of degree 4 or more may be left unsplit even when it factors further over the rationals: x⁶ − 64 gives (x − 2) (x + 2) (x⁴ + 4x² + 16), and x⁴ + 4x² + 16 = (x² − 2x + 4)(x² + 2x + 4). The product is still exactly the polynomial.
Assumptions
- Factoring is over the rational numbers; irrational or complex factors are not used.
- Coefficients should be rational. A polynomial with an irrational coefficient, such as π in pi x^2 - pi, is factored as the algebra finds it and may come back unchanged: the page does not take out a common irrational factor, so π(x − 1)(x + 1) is not guaranteed.
- An answer that fails its check, finds no factoring, or takes over 3 seconds is not shown ("No verified answer").
Worked examples by hand
x² + 2x − 15 (OpenStax College Algebra 2e, section 1.5, Example 2). Two numbers that multiply to −15 and add to 2 are −3 and 5, so x² + 2x − 15 = (x − 3)(x + 5).
5x² + 7x − 6 (OpenStax College Algebra 2e, section 1.5, Example 3). ac = −30; two numbers that multiply to −30 and add to 7 are 10 and −3. Split and group: 5x² + 10x − 3x − 6 = 5x(x + 2) − 3(x + 2) = (5x − 3)(x + 2).
8x³ − 125 (OpenStax College Algebra 2e, section 1.5, Example 7). A difference of cubes with a = 2x and b = 5: a³ − b³ = (a − b)(a² + ab + b²) = (2x − 5)(4x² + 10x + 25). The quadratic factor has discriminant 100 − 400 < 0, so it does not factor further.
Other questions people ask
What does factoring a polynomial mean?
Writing it as a product of polynomials of lower degree. x² + 2x − 15 = (x − 3)(x + 5), because (x − 3)(x + 5) = x² + 5x − 3x − 15. Factored form shows the roots at once: the product is 0 exactly when x = 3 or x = −5.
How do you factor a trinomial by hand?
For x² + bx + c, find two numbers that multiply to c and add to b: for x² + 2x − 15 they are −3 and 5. For ax² + bx + c with a ≠ 1, find two numbers that multiply to ac and add to b, split the middle term, and factor by grouping: 5x² + 7x − 6 = 5x² + 10x − 3x − 6 = 5x(x + 2) − 3(x + 2) = (5x − 3)(x + 2).
Why is x² − 2 not factored?
The page factors over the rational numbers: every coefficient in a factor is a whole number or a fraction. x² − 2 = (x − √2)(x + √2) needs √2, which is irrational, so over the rationals x² − 2 is prime (irreducible) and is shown unchanged. The same goes for x² + 1, which has no real roots at all.
Which special patterns does it use?
The standard ones and more: a difference of squares a² − b² = (a − b)(a + b), perfect squares a² ± 2ab + b² = (a ± b)², and sums and differences of cubes a³ ± b³ = (a ± b)(a² ∓ ab + b²). It also pulls out a common factor first: 2x³ + 4x² + 2x = 2x(x + 1)².
Can I factor a number?
This page factors polynomials, so a plain number such as 12 gets no answer here. To break a whole number into primes, use the factor calculator.
What does "No verified answer" mean?
The factors are multiplied back out, in effect: the page compares their product with your polynomial at 20 points. If they differ anywhere, or no factoring is found, or the work takes over 3 seconds, the page says "No verified answer" instead of showing factors it could not check.