Sub topic 6
Factoring a Difference of Squares
This chapter assumes you can expand products with FOIL, use the identity (a+b)(a−b) = a² − b², factor out a greatest common factor, and recognize perfect squares such as 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, and 169.
The Pattern
A difference of squares is an expression of the form a² − b², where one perfect square is subtracted from another. The identity from the previous chapter, read right to left, gives its factorization:
a² − b² = (a + b)(a − b)
To factor, find a and b by taking the square root of each term. Then write one factor with a plus sign and one with a minus sign. The order of the two factors does not matter.
Examples:
- x² − 49 = (x + 7)(x − 7)
- 9y² − 16 = (3y + 4)(3y − 4)
- 25x² − 4y² = (5x + 2y)(5x − 2y)
- x⁴ − 81 = (x² + 9)(x² − 9)
The last example is not finished. That is covered in the section on repeated factoring below.
Why the Middle Terms Disappear
Expand (a + b)(a − b) with FOIL:
a·a + a·(−b) + b·a + b·(−b) = a² − ab + ab − b² = a² − b²
The two middle terms are opposites, so they cancel. This also shows why the pattern has no middle term. If an expression has a middle term, such as x² + 6x − 49, it is not a difference of squares.
Checking the Conditions
All three conditions must hold.
- Exactly two terms. x² − 49 qualifies. x² − 14x + 49 does not.
- A subtraction between them. x² + 49 is a sum of squares. It cannot be factored over the real numbers, so there is no (x + 7)(x + 7) shortcut. Note that (x + 7)² = x² + 14x + 49, which has a middle term.
- Each term is a perfect square. Numbers must be perfect squares, and each variable must have an even exponent. So 36x⁶ is a square, because it equals (6x³)². But x⁵ and 12x² are not squares.
The order of the terms can be reversed. For example, 16 − x² is still a difference of squares, and it equals (4 + x)(4 − x).
Combining with the GCF
Always look for a greatest common factor first. It often reveals a difference of squares that was hidden.
Factor 50x² − 18:
- The GCF is 2, which gives 2(25x² − 9).
- Inside the parentheses, 25x² − 9 = (5x + 3)(5x − 3).
- The full answer is 2(5x + 3)(5x − 3).
If you skip step 1, you will not see that 50x² and 18 are squares. Neither is a perfect square, so the pattern is not visible until the 2 is removed.
Repeated Factoring
After one factorization, check each factor again. Return to x⁴ − 81:
x⁴ − 81 = (x²)² − 9² = (x² + 9)(x² − 9)
The factor x² − 9 is itself a difference of squares, so:
x⁴ − 81 = (x² + 9)(x + 3)(x − 3)
The factor x² + 9 is a sum of squares and stays as it is. A factorization is complete only when no factor can be split further.
Factoring Whole Expressions as a or b
The terms a and b do not have to be single variables. They can be any expression.
(x + 2)² − 25 = ((x + 2) + 5)((x + 2) − 5) = (x + 7)(x − 3)
Here a = x + 2 and b = 5. Careful use of parentheses matters. When b is itself a sum or difference, the signs inside need attention:
x² − (y − 1)² = (x + (y − 1))(x − (y − 1)) = (x + y − 1)(x − y + 1)
Note that the second factor requires distributing the minus sign across y − 1.
Verifying with Code
You can test a factorization on sample values before trusting it.
def check(expr, factored, values):
for x in values:
assert expr(x) == factored(x), x
check(lambda x: 50 * x**2 - 18,
lambda x: 2 * (5 * x + 3) * (5 * x - 3),
range(-5, 6))
check(lambda x: x**4 - 81,
lambda x: (x**2 + 9) * (x + 3) * (x - 3),
range(-5, 6))
check(lambda x: (x + 2)**2 - 25,
lambda x: (x + 7) * (x - 3),
range(-5, 6))
print("factorizations verified")Agreement on several inputs does not prove an identity. But a wrong factorization will almost always fail on some value, so this catches most mistakes.
Uses on the GRE
Solving equations. To solve x² − 49 = 0, factor to get (x + 7)(x − 7) = 0. By the zero product property, x = 7 or x = −7. The square root method gives the same result.
Simplifying fractions. The expression (x² − 25)/(x − 5) becomes (x + 5)(x − 5)/(x − 5). Cancel the common factor to get x + 5, valid for x ≠ 5.
Numeric shortcuts. To compute 87² − 13², write (87 + 13)(87 − 13) = 100 · 74 = 7400. The GRE often builds numbers so that a + b or a − b is a round number.
Quantitative comparison. Suppose x² − y² = 40 and x + y = 8. Then (x + y)(x − y) = 40, so 8(x − y) = 40 and x − y = 5. You found x − y without solving for x and y separately.
Common Errors
| Error | Why it fails | Correct |
|---|---|---|
| x² + 25 = (x + 5)(x − 5) | The product is x² − 25 | x² + 25 does not factor over the reals |
| x² − 9 = (x − 3)² | (x − 3)² = x² − 6x + 9 | (x + 3)(x − 3) |
| 4x² − 9 = (4x + 3)(4x − 3) | The square root of 4x² is 2x, not 4x | (2x + 3)(2x − 3) |
| Stopping at x⁴ − 16 = (x² + 4)(x² − 4) | x² − 4 can still be factored | (x² + 4)(x + 2)(x − 2) |
| Cancelling x² − 25 over x − 5 and ignoring x = 5 | The original expression is undefined at x = 5 | x + 5, with x ≠ 5 |
Summary
Factor a GCF first. Confirm there are two terms, a minus sign, and two perfect squares. Write (a + b)(a − b). Then check every factor for a further difference of squares.
Exercise
Factor 3x⁴ − 48 completely over the real numbers.
Show answer
First take out the GCF 3: 3(x⁴ − 16). Then x⁴ − 16 = (x² + 4)(x² − 4). The factor x² − 4 = (x + 2)(x − 2). The complete factorization is 3(x² + 4)(x + 2)(x − 2).
Exercise
If a² − b² = 63 and a − b = 7, what is a + b?
Show answer
Factor: (a + b)(a − b) = 63. Substitute a − b = 7 to get 7(a + b) = 63, so a + b = 9.
Exercise
Compute 1,001² − 999² without a calculator.
Show answer
Use the difference of squares: (1,001 + 999)(1,001 − 999) = 2,000 · 2 = 4,000.