Factoring special patterns
Some polynomials are products in disguise. Which ones can you factor on sight, with no search at all?
Where you are 10 in Polynomials
Why this exists
Factoring a trinomial such as x^2 + 11x + 30 is a search: you hunt for two numbers whose product is 30 and whose sum is 11, as in Factoring trinomials. Some polynomials need no search. Their shape alone names the factors, because they are the special products you already know how to multiply out, read in the other direction.
The most useful one is the difference of two squares. The expression 16x^2 - 81 has no middle term and a leading coefficient that is not 1, so a search would be slow. Once you see that it is (4x)^2 - 9^2, the factors (4x + 9)(4x - 9) can be written straight down. Two more shapes work the same way: the perfect square trinomial, and the sum or difference of two cubes.
Definition
A term is a perfect square when it is the square of a simpler term: 9x^2 = (3x)^2, x^4 = (x^2)^2, \displaystyle \frac{1}{4} = \left(\frac{1}{2}\right)^2. A number coefficient must be a square number or the square of a fraction, and every variable must carry an even exponent. So 8x^2 and x^3 are not perfect squares.
A difference of two squares is an expression a^2 - b^2: two terms, each a perfect square, with subtraction between them. Here a and b stand for any terms, so x^2 - 49, 9x^2 - 25y^2 and x^4 - 1 all qualify.
A perfect square trinomial is the square of a binomial written out: a^2 + 2ab + b^2 or a^2 - 2ab + b^2. The test has two parts. The first and last terms are perfect squares, a^2 and b^2, both added. The middle term is twice the product ab, with either sign.
A sum of two cubes is a^3 + b^3 and a difference of two cubes is a^3 - b^3, where each term is a cube: 8y^3 = (2y)^3 and 27 = 3^3, for instance.
Intuition
Special products has the picture for a^2 - b^2. Cut a square of side b from one corner of a square of side a. The L shape left over has area a^2 - b^2, and it can be cut in two and rearranged into one rectangle a + b long and a - b tall. There the picture was read as a product turning into a difference. Factoring reads it the other way: you are handed the L shape, area a^2 - b^2, and asked for the sides of one rectangle with that same area. The sides are the sum a + b and the difference a - b:
The same lesson cuts a square of side a + b into a square a^2, a square b^2 and two rectangles, each a by b. Two rectangles is why the middle term of (a + b)^2 is 2ab, and why the perfect square test asks for twice the product. Factoring a^2 + 2ab + b^2 means recognizing those four pieces and fitting them back into one square.
Both pictures need lengths, so they show only a > b > 0. The algebra below has no such limit.
Results
Difference of two squares. For all real numbers a and b,
Perfect square trinomials.
Sum and difference of two cubes.
In the cube formulas the binomial factor keeps the sign of the original, the middle term of the trinomial takes the opposite sign, and the last term b^2 is always added.
Why it is true
Each identity is proved by multiplying out its right side. For the squares, that multiplication is done in Special products: in (a + b)(a - b) the two middle terms -ab and +ab cancel and leave a^2 - b^2, and (a \pm b)^2 comes out as a^2 \pm 2ab + b^2. An identity read from right to left is a product; read from left to right it is a factorization.
For the sum of cubes, distribute a + b over the trinomial:
The terms -a^2b and +a^2b cancel, and so do +ab^2 and -ab^2. Changing b to -b throughout turns this into the difference formula, since (-b)^3 = -b^3 and (-b)^2 = b^2.
There is a picture for the difference of cubes too. Figure 1 cuts a cube of side 4 from a corner of a cube of side x; in general, cut a cube of side b from a corner of a cube of side a. The solid left can be sliced (the slices are not drawn) into three boxes: a bottom slab a by a by a - b, and, in the top layer of height b, a box a by a - b by b and a box b by a - b by b. Every box has one edge a - b, and its other two edges multiply to a^2, ab and b^2 in turn, so the volume is (a - b)(a^2 + ab + b^2).
Worked examples
Spotting a difference of squares
Factor 16x^2 - 81 and 25m^2 - 4n^2.
SolutionBoth terms of 16x^2 - 81 are squares, 16x^2 = (4x)^2 and 81 = 9^2, with subtraction between. So a = 4x and b = 9:
Check by multiplying: 16x^2 - 36x + 36x - 81 = 16x^2 - 81.
In 25m^2 - 4n^2, 25m^2 = (5m)^2 and 4n^2 = (2n)^2, so a = 5m, b = 2n:
The order of the two factors does not matter, because multiplication is commutative.
The metal plate
A square metal plate has side x centimeters. A square of side 6 cm is cut from one corner. Write the area left as a product, and find it when x = 15.
SolutionThe whole plate has area x^2 and the piece removed has area 6^2 = 36, so the area left is x^2 - 36. Both terms are squares, so
This is the cut-square picture of Special products with a = x and b = 6: the leftover rearranges into a rectangle x + 6 long and x - 6 wide. When x = 15 the area is (21)(9) = 189 square centimeters. Check: 15^2 - 36 = 225 - 36 = 189. The setting needs x > 6, or there is no plate left around the cut.
Squares in mental arithmetic
Find 53^2 - 47^2 and 1004^2 - 996^2 without a calculator.
SolutionSquaring 53 and 47 is work, but their sum and difference are easy. With a = 53 and b = 47,
Check: 2809 - 2209 = 600. The same move makes the second one short:
Testing for a perfect square trinomial
Decide whether each is a perfect square trinomial, and factor it: x^2 + 22x + 121, 4x^2 - 20xy + 25y^2, x^2 + 10x + 16.
SolutionIn x^2 + 22x + 121 the end terms are x^2 and 121 = 11^2, both added. Twice their product is 2 \cdot x \cdot 11 = 22x, which is the middle term, with a plus sign:
In 4x^2 - 20xy + 25y^2 the end terms are (2x)^2 and (5y)^2. Twice the product is 2 \cdot 2x \cdot 5y = 20xy, and the middle term is -20xy, so
In x^2 + 10x + 16 the end terms are squares, 16 = 4^2, but twice the product is 2 \cdot x \cdot 4 = 8x, not 10x. It is not a perfect square trinomial: (x + 4)^2 is x^2 + 8x + 16. Failing the test only means this pattern does not apply. The search of Factoring trinomials still works: 2 \cdot 8 = 16 and 2 + 8 = 10, so the trinomial is (x + 2)(x + 8).
Squares that are not plain numbers
Factor \displaystyle x^2 - \frac{1}{4} and x^4 - 81y^2.
SolutionSince \displaystyle \frac{1}{4} = \left(\frac{1}{2}\right)^2, the first is a difference of squares with a = x and \displaystyle b = \frac{1}{2}:
Check: \displaystyle x^2 - \frac{1}{2}x + \frac{1}{2}x - \frac{1}{4}, and the middle terms cancel.
In the second, x^4 = (x^2)^2 and 81y^2 = (9y)^2, so a = x^2 and b = 9y:
Neither factor splits again. x^2 + 9y is a sum and fits none of the patterns, and in x^2 - 9y the term 9y is not a perfect square, since y has exponent 1.
A cube with a corner cut away
A cube of modeling clay has side x centimeters, and a cube of side 4 cm is cut from one corner (Figure 1). Write the volume left as a product and check it at x = 10. Then factor 8y^3 + 27.
SolutionThe volume left is x^3 - 4^3 = x^3 - 64, a difference of cubes with a = x and b = 4:
At x = 10: 1000 - 64 = 936, and (10 - 4)(100 + 40 + 16) = 6 \cdot 156 = 936.
For 8y^3 + 27, the terms are (2y)^3 and 3^3, so a = 2y and b = 3. In the sum formula, a^2 = 4y^2, ab = 6y and b^2 = 9, so
Check at y = 1: 8 + 27 = 35, and 5 \cdot 7 = 35.
Boundaries
A sum of two squares does not factor over the real numbers. Take x^2 + 64. If it were (x + p)(x + q) for real numbers p and q, multiplying out would give x^2 + (p + q)x + pq, so we would need p + q = 0 and pq = 64. The first forces q = -p, and then pq = -p^2, which is zero or negative and never 64. No two real numbers multiply to +64 and add to 0. The same argument rules out x^2 + c for every c > 0. A sum of two cubes, by contrast, always factors.
The squares must be squares of the kind you allow. x^2 - 6 is \displaystyle (x + \sqrt{6})(x - \sqrt{6}) over the real numbers, but it has no factorization with integer coefficients, because 6 is not a square number.
The trinomial test needs both end terms added. x^2 + 10x - 25 fails even though 25 is a square: the last term -25 is not the square of any real number.
The trinomials in the cube formulas do not factor further over the real numbers when b is not zero. A factor of degree one would make the trinomial zero at some real number, and these trinomials are never zero. For example, x^2 + 4x + 16 = (x + 2)^2 + 12 is at least 12 for every x, and \displaystyle 4y^2 - 6y + 9 = \left(2y - \frac{3}{2}\right)^2 + \frac{27}{4} is at least \displaystyle \frac{27}{4} for every y.
Where this goes next
Completing the square runs the perfect square test backwards: it adds the one number that turns x^2 + bx into a perfect square trinomial. Factoring on sight also feeds equation solving. Setting a difference of squares equal to zero and using the Solving quadratics by factoring gives both roots at once, the same pair the Solving quadratics with square roots reaches by another route. Real expressions often hide a pattern behind a common factor, or keep going after one step: x^4 - 16 = (x^2 + 4)(x^2 - 4), and x^2 - 4 splits again. Taking out the common factor first and finishing every split is Factoring completely and choosing a strategy. Each formula here is an identity, true for every value of its letters, and Proving polynomial identities uses such identities to build new facts.
Exercises
Differences of squares
- Factor x^2 - 196.
- Factor 49 - y^2.
- Factor 36a^2 - 25.
- Factor 81p^2 - 16q^2.
- Factor m^4 - 9.
- Factor \displaystyle x^2 - \frac{1}{9}.
Squares in arithmetic and area
- Find 86^2 - 84^2 without squaring either number.
- A square tile has side 20 cm. A square of side 8 cm is cut from one corner. Use the difference of squares to find the area left.
Perfect square trinomials
- Factor x^2 + 24x + 144.
- Factor y^2 - 30y + 225.
- Factor 16x^2 + 40x + 25.
- Factor 49m^2 - 28mn + 4n^2.
- Is 9x^2 + 12x + 16 a perfect square trinomial? Give the reason.
Cubes
- Factor a^3 - 27.
- Factor 125x^3 + 8.
Reasoning
- Explain why x^2 + 81 cannot be written as (x + p)(x + q) with p and q real numbers.
- Show that for two consecutive whole numbers n and n + 1, the difference of their squares equals their sum.
- Find every number k that makes 9x^2 + kx + 25 a perfect square trinomial.
Answers
- (x + 14)(x - 14). Here 196 = 14^2.
- (7 + y)(7 - y). The square subtracted is y^2, so a = 7 and b = y.
- (6a + 5)(6a - 5), since 36a^2 = (6a)^2 and 25 = 5^2.
- (9p + 4q)(9p - 4q), since 81p^2 = (9p)^2 and 16q^2 = (4q)^2.
- (m^2 + 3)(m^2 - 3), since m^4 = (m^2)^2. With integer coefficients this is as far as it goes, because 3 is not a square number.
- \displaystyle \left(x + \frac{1}{3}\right)\left(x - \frac{1}{3}\right), since \displaystyle \frac{1}{9} = \left(\frac{1}{3}\right)^2.
- 340. (86 + 84)(86 - 84) = 170 \cdot 2 = 340.
- 336 square centimeters. 20^2 - 8^2 = (20 + 8)(20 - 8) = 28 \cdot 12 = 336.
- (x + 12)^2. 144 = 12^2 and 2 \cdot x \cdot 12 = 24x.
- (y - 15)^2. 225 = 15^2, 2 \cdot y \cdot 15 = 30y, and the middle term is negative.
- (4x + 5)^2. 16x^2 = (4x)^2, 25 = 5^2 and 2 \cdot 4x \cdot 5 = 40x.
- (7m - 2n)^2. 49m^2 = (7m)^2, 4n^2 = (2n)^2 and 2 \cdot 7m \cdot 2n = 28mn.
- No. The end terms are (3x)^2 and 4^2, but twice their product is 2 \cdot 3x \cdot 4 = 24x, not 12x. The square (3x + 4)^2 is 9x^2 + 24x + 16.
- (a - 3)(a^2 + 3a + 9), using the difference of cubes with b = 3.
- (5x + 2)(25x^2 - 10x + 4), using the sum of cubes with a = 5x and b = 2: a^2 = 25x^2, ab = 10x and b^2 = 4.
- Multiplying out gives x^2 + (p + q)x + pq, so we would need p + q = 0 and pq = 81. Then q = -p and pq = -p^2, which is never positive, so it cannot be 81.
- Take a = n + 1 and b = n. Then a - b = 1, so (n + 1)^2 - n^2 = (a + b) \cdot 1 = (n + 1) + n, which is the sum 2n + 1. For example, 8^2 - 7^2 = 15 = 8 + 7.
- k = 30 or k = -30. The end terms are (3x)^2 and 5^2, so the middle term must be \pm 2 \cdot 3x \cdot 5 = \pm 30x, giving (3x + 5)^2 or (3x - 5)^2.