Sub topic 11
Recognizing polynomials that do not factor
This chapter assumes you can factor out a greatest common factor (GCF), factor trinomials with leading coefficient 1, use the ac method, and recognize the special products. Here you learn to recognize when none of those methods will work, so you can stop searching and write "prime."
What "prime" means for polynomials
A prime polynomial (also called an irreducible polynomial) is a polynomial with integer coefficients that cannot be written as a product of two polynomials with integer coefficients, other than by pulling out 1 or -1. This works like prime numbers: 7 is prime because the only integer factorizations are 1 · 7 and (-1)(-7).
Three points keep this definition precise.
- The phrase "over the integers" matters. A polynomial can be prime over the integers and still factor with irrational or complex numbers. For example, x^2 - 5 is prime over the integers, but over the real numbers it equals (x - √5)(x + √5). This course uses the integers unless told otherwise.
- Every polynomial of degree 1, such as x + 4 or 3x - 2, is prime. You cannot split a linear expression into two non-constant factors.
- A polynomial with a number factor is not prime, even if what remains is. The expression 2x + 4 equals 2(x + 2), so it is not prime. Only after the GCF is removed can the leftover part be prime.
The last point is the one that causes most mistakes, so treat the GCF as the first test every time. A polynomial like 3x^2 + 12 is not prime, because 3(x^2 + 4) is a valid factorization. The factor x^2 + 4 inside the parentheses is prime, so the factorization is complete.
Where prime polynomials appear
The table lists common patterns and what to expect from each.
| Polynomial | Result over the integers | Reason |
|---|---|---|
| x + 7 | Prime | Degree 1 |
| x^2 + 9 | Prime | Sum of squares, no integer pair multiplies to 9 and adds to 0 |
| x^2 + x + 1 | Prime | No integer pair multiplies to 1 and adds to 1 |
| x^2 - 5 | Prime | 5 is not a perfect square |
| 4x^2 + 6 | Not prime | 2(2x^2 + 3), and 2x^2 + 3 is prime |
| x^3 + 8 | Not prime | Sum of cubes: (x + 2)(x^2 - 2x + 4) |
| x^4 + 4 | Not prime | (x^2 + 2x + 2)(x^2 - 2x + 2) |
| x^4 + 1 | Prime | No integer factorization exists |
Notice that "sum of squares" is not a guarantee of primality. The expression x^2 + 9 is prime, but x^4 + 4 is a sum of squares in disguise (x^2 squared plus 2 squared) and it factors. The safe rule: a sum of two squares is prime only after you confirm no common factor exists and the squares are the plain form a^2 + b^2 with a and b as simple as x and a number. For higher powers, you need extra tools.
Proving a monic trinomial is prime
For x^2 + bx + c, you search for two integers with product c and sum b. To declare the trinomial prime, you must show that no pair works. A complete check lists every factor pair of c.
Take x^2 + 4x + 6. The product is 6, so list all integer pairs.
| Pair | Product | Sum |
|---|---|---|
| 1, 6 | 6 | 7 |
| 2, 3 | 6 | 5 |
| -1, -6 | 6 | -7 |
| -2, -3 | 6 | -5 |
No sum equals 4, so x^2 + 4x + 6 is prime.
Two shortcuts reduce the work.
- When c is positive, both numbers share a sign. That sign matches the sign of b. So for x^2 + 4x + 6 you only need the positive pairs, and you can skip the negative rows.
- When c is negative, the numbers have opposite signs, and the larger one in absolute value takes the sign of b.
Listing pairs gets tedious for large c, which leads to the faster test below.
The discriminant test
For a quadratic ax^2 + bx + c, the discriminant is
D = b^2 - 4ac
The quadratic formula says the roots are (-b ± √D) / (2a). A quadratic with integer coefficients factors over the integers into two linear factors exactly when its roots are rational. The roots are rational exactly when D is a perfect square (0, 1, 4, 9, 16, 25, and so on).
That gives a quick decision rule, provided you first remove any GCF:
- If D is a negative number, the quadratic is prime. There are no real roots.
- If D is a positive number that is not a perfect square, the quadratic is prime. The roots are irrational.
- If D is a perfect square, the quadratic factors over the integers.
Apply it to three examples.
x^2 + 4x + 6: D = 16 - 24 = -8 negative, so prime
x^2 + 3x + 1: D = 9 - 4 = 5 not a perfect square, so prime
2x^2 + 7x + 3: D = 49 - 24 = 25 perfect square, so it factorsThe last one factors as (2x + 1)(x + 3), which matches the earlier ac method example. The test tells you whether to keep working, but it does not produce the factors. You still use the ac method or trial pairs for that.
A discriminant of exactly 0 is a special case. It means the trinomial is a perfect square, such as x^2 + 6x + 9, where D = 36 - 36 = 0. This connects to the perfect square trinomial pattern from the earlier chapter.
A decision path for quadratics
The flowchart below combines the checks in the order you should run them.
Binomials and higher degrees
Binomials are easier to judge because only a few patterns factor.
- A difference of squares, a^2 - b^2, always factors as (a - b)(a + b).
- A sum or difference of cubes, a^3 ± b^3, always factors.
- A binomial with a GCF, such as 6x + 9, factors by pulling out the GCF.
- Any other binomial, such as x^2 + 9, x^2 - 5, or x + 3, is prime over the integers.
For degree 4 and above, the patterns multiply. Two common cases help:
- Rewrite as a quadratic in x^2. The polynomial x^4 - 5x^2 + 4 behaves like u^2 - 5u + 4 with u = x^2. It factors as (u - 1)(u - 4) = (x^2 - 1)(x^2 - 4), and each piece is a difference of squares, giving (x - 1)(x + 1)(x - 2)(x + 2).
- Look for a hidden square. The expression x^4 + 4 becomes a difference of squares after you add and subtract 4x^2:
x^4 + 4 = x^4 + 4x^2 + 4 - 4x^2
= (x^2 + 2)^2 - (2x)^2
= (x^2 + 2 - 2x)(x^2 + 2 + 2x)This trick is rarely required at this level, but it shows why "sum of squares is always prime" is false for higher powers.
Four-term polynomials that resist grouping
Grouping works only when the two pairs share a binomial factor after you pull out each pair's GCF. If the shared binomials do not match, try rearranging the terms once. For x^3 + 3x^2 + 2x + 6, the pairs gave x^2(x + 3) + 2(x + 3), which matches.
Compare x^3 + 3x^2 + 2x + 5:
(x^3 + 3x^2) + (2x + 5) = x^2(x + 3) + (2x + 5)The binomials (x + 3) and (2x + 5) differ. Swapping the middle terms gives (x^3 + 2x) + (3x^2 + 5) = x(x^2 + 2) + (3x^2 + 5), which also fails. When both arrangements fail, grouping has given you no factorization. That does not prove the polynomial is prime, though. Another method could still apply. For this cubic, a quick test shows it is prime: any integer factorization would include a linear factor (x - r) with r dividing 5, and trying r = ±1 and ±5 gives nonzero values every time.
Checking with software
SymPy can confirm primality. Its factor_list function returns the integer content (the numeric GCF) and a list of irreducible factors with their multiplicities. A polynomial is prime over the integers if the content is 1 or -1 and there is one factor with multiplicity 1.
from sympy import symbols, factor, factor_list
x = symbols('x')
def is_prime_poly(expr):
content, factors = factor_list(expr)
return abs(content) == 1 and len(factors) == 1 and factors[0][1] == 1
examples = [
x**2 + 1,
x**2 + x + 1,
x**2 + 5*x + 6,
2*x**2 + 4,
x**2 - 5,
x**4 + 4,
x**4 + 1,
]
for expr in examples:
print(expr, "->", factor(expr), "| prime:", is_prime_poly(expr))Running it confirms the table earlier in the chapter: x^2 + 1, x^2 + x + 1, x^2 - 5, and x^4 + 1 are prime, while x^2 + 5x + 6, 2x^2 + 4, and x^4 + 4 are not. The function treats 2x^2 + 4 as not prime because its content is 2.
Common errors
- Declaring a polynomial prime before removing the GCF. Always test for a common factor first.
- Stopping the pair search too early. List every factor pair of c, including the negative ones when c is positive and b is negative.
- Calling a trinomial prime because the first method failed. For ax^2 + bx + c, run the discriminant test as a second opinion.
- Treating a sum of squares as always prime. It is prime for forms like x^2 + 9, but x^4 + 4 factors.
- Confusing "prime over the integers" with "has no roots." The polynomial x^2 - 5 has two real roots, yet it is prime over the integers because those roots are irrational.
- Writing a factorization that is not complete. In 3(x^2 + 4), the number 3 is prime and x^2 + 4 is prime, so the answer is finished. In (x^2 - 4)(x + 1), the first factor is a difference of squares, so more work remains.
Exercises
Exercise
Is 5x^2 + 10 prime? If not, factor it completely.
Show answer
It is not prime, because 5 is a common factor. 5x^2 + 10 = 5(x^2 + 2). The factor x^2 + 2 has no integer factorization (the discriminant is 0 - 8 = -8, which is negative), so the factorization is complete.
Exercise
Use the discriminant to decide whether x^2 + 3x + 5 factors over the integers.
Show answer
D = 3^2 - 4(1)(5) = 9 - 20 = -11. The discriminant is negative, so the trinomial is prime over the integers.
Exercise
Use the discriminant to decide whether 3x^2 + 10x + 8 factors. If it does, find the factors.
Show answer
D = 100 - 4(3)(8) = 100 - 96 = 4, which is a perfect square, so it factors. With the ac method, ac = 24, and the numbers 4 and 6 multiply to 24 and add to 10. Then 3x^2 + 4x + 6x + 8 = x(3x + 4) + 2(3x + 4) = (3x + 4)(x + 2).
Exercise
A student writes "x^2 - 7 is prime, so x^2 - 7 = 0 has no solutions." What is wrong with this claim?
Show answer
Prime over the integers only means no integer factorization exists. The equation x^2 - 7 = 0 still has the real solutions x = √7 and x = -√7. Factoring over the integers is one tool for solving equations, and its failure does not mean the equation has no solutions. You can use the quadratic formula or take square roots instead.