math.wiki
Algebra › Polynomials › Proving polynomial identities
Open on the map
Algebra 2 · A.APR.C.4

Proving polynomial identities

Two expressions agree at every number you try. How can you be sure they agree at every number there is?

Where you are 10 in Polynomials

When you reach for it

Work out 7^2 - 6^2 = 13, 10^2 - 9^2 = 19 and 31^2 - 30^2 = 61. Each difference of two consecutive squares is odd, and each is the two numbers added together. A hundred more tries would agree, but a hundred tries are not every number. Algebra covers them all at once: for any number n,

\begin{aligned} n^2 - (n - 1)^2 &= n^2 - (n^2 - 2n + 1) \\ &= 2n - 1 = n + (n - 1) \end{aligned}

An identity is a statement that two expressions are equal for every value of their variables. An equation, in the sense of something to solve, is true for some values, and solving finds which. x^2 - 9 = (x - 3)(x + 3) is an identity; x^2 - 9 = 0 holds at x = 3 and x = -3 and nowhere else. Linear equations already showed the same split, when the letters vanished and left a statement true for every number.

Reach for a proof whenever someone claims two polynomial expressions are always equal: a factoring pattern, a shortcut for arithmetic, a pattern spotted in a list of numbers. A proof turns “it worked every time I tried” into “it cannot fail”.

The procedure

Turn one side into the other. Start from one side, usually the more complicated one, and rewrite it using only moves that hold for every number: the distributive property, the commutative and associative properties, collecting like terms, and identities already proved, such as the special products. Each move produces an expression equal to the one before for every value, so the first and last expressions in the chain are equal for every value. Ending at the other side proves the identity.

Or expand both sides. When neither side leads naturally to the other, expand each one fully, collect like terms and write it in standard form. If the two results match term for term, the two sides are the same polynomial written two ways, so they agree everywhere.

Or show the difference is zero. If left side minus right side simplifies to 0, the two sides are equal for every value. When it simplifies to something else instead, setting that to 0 finds the values where the statement does hold.

What you may not do. Do not treat the claim as an equation to solve, doing the same thing to both sides until a true line appears. That starts by assuming the very thing to be proved. Squaring both sides of the false statement -1 = 1 gives the true 1 = 1, so arriving at something true says nothing about where you started.

Substitution. A proved identity holds for every value of each letter, so any expression may replace a letter, provided every copy of that letter is replaced. Putting -y for y, or x + 1 for a, turns one identity into another with no new work.

Disproving takes one value. If the two sides differ at a single value, the statement is not an identity, and that value is a Counterexample. The statement may still hold at some values, in which case it is an equation with solutions.

Worked examples

Example 1

The difference and sum of cubes

Prove that for all x and y

x^3 - y^3 = (x - y)(x^2 + xy + y^2)

and use it to find a matching formula for x^3 + y^3.

Solution

The right side is the more complicated, so start there. By the distributive property, each term of x - y multiplies each term of the trinomial:

\begin{aligned} (x - y)(x^2 + xy + y^2) &= x^3 + x^2y + xy^2 \\ &\quad - x^2y - xy^2 - y^3 \\ &= x^3 - y^3 \end{aligned}

The middle terms cancel in pairs, x^2y against -x^2y and xy^2 against -xy^2. That canceling is exactly why the trinomial has those three terms.

For the sum, substitute -y for y throughout. Since (-y)^3 = -y^3, (-y)^2 = y^2 and x(-y) = -xy,

x^3 + y^3 = (x + y)(x^2 - xy + y^2)

No second expansion was needed. A sample value is a check, not a proof: at x = 5, y = 2 both sides of the first identity give 125 - 8 = 117 and 3 \cdot 39 = 117. Read from right to left, these are the patterns used for factoring a sum or difference of cubes.

Example 2

Expanding both sides, and a shortcut

Prove that (x + 1)^3 - (x - 1)^3 = 6x^2 + 2, and use it to find 1001^3 - 999^3.

Solution

Expand each cube by multiplying a square by one more factor: (x + 1)^3 is (x + 1)(x^2 + 2x + 1), which is x^3 + 3x^2 + 3x + 1, and in the same way (x - 1)^3 = x^3 - 3x^2 + 3x - 1. Subtracting a bracket subtracts each of its terms:

\begin{aligned} (x + 1)^3 - (x - 1)^3 &= (x^3 + 3x^2 + 3x + 1) \\ &\quad - (x^3 - 3x^2 + 3x - 1) \\ &= 6x^2 + 2 \end{aligned}

The x^3 and 3x terms cancel, and the other two double.

A second route uses Example 1 with a = x + 1 and b = x - 1 in place of x and y. Then a - b = 2 and

\begin{aligned} a^2 + ab + b^2 &= (x^2 + 2x + 1) + (x^2 - 1) \\ &\quad + (x^2 - 2x + 1) \\ &= 3x^2 + 1 \end{aligned}

so the difference is 2(3x^2 + 1) = 6x^2 + 2. Two routes, the same polynomial.

Now put x = 1000, which is allowed because the identity holds for every x:

1001^3 - 999^3 = 6 \cdot 1000^2 + 2 = 6{,}000{,}002

The cubes themselves run to nine and ten digits, and the identity never needed either of them.

Example 3

Identity, equation, or neither

Decide whether each statement is an identity. If it is not, find every x where it holds.

(a) (x + 5)^2 = x^2 + 25 \qquad (b) (x + 4)(x - 4) + 16 = x^2 \qquad (c) x^3 - 6x^2 + 12x - 6 = x

Solution

(a) Try x = 1: the left side is 36 and the right side 26. One failing value is enough, so this is not an identity. To find where it holds, expand: x^2 + 10x + 25 = x^2 + 25, so 10x = 0 and x = 0. It is an equation with exactly one solution. The right side has lost the middle term 10x of the square of a sum.

(b) By the difference of squares, (x + 4)(x - 4) = x^2 - 16, so the left side is x^2 - 16 + 16 = x^2. This is an identity.

(c) Try x = 1: 1 - 6 + 12 - 6 = 1. Try x = 2: 8 - 24 + 24 - 6 = 2. Try x = 3: 27 - 54 + 36 - 6 = 3. Three successes, yet at x = 0 the left side is -6 and the right side 0, so it is not an identity. Subtract x from both sides and factor:

x^3 - 6x^2 + 11x - 6 = (x - 1)(x - 2)(x - 3)

which you can confirm by expanding. The difference is 0 exactly at x = 1, 2 and 3: the three values tried happened to be the only three where the statement is true. This is why trying values is never a proof.

Example 4

Tiles and odd numbers

Radka builds square panels from square ceramic tiles. (a) Prove that growing an (n - 1) by (n - 1) panel into an n by n panel always takes 2n - 1 new tiles. (b) How many tiles take an 18 by 18 panel to 19 by 19? (c) She has 45 tiles and wants to use all of them to add one row and one column to a square panel. What size panel does she start with?

(n - 1)^2
n
n - 1
Figure 1Growing an (n - 1) by (n - 1) square to n by n adds an L of n + (n - 1) = 2n - 1 tiles. Drawn for n = 5, where the L has 9.
Solution

(a) The new tiles are the difference of the two areas. Expanding the square of a difference,

\begin{aligned} n^2 - (n - 1)^2 &= n^2 - (n^2 - 2n + 1) \\ &= 2n - 1 \end{aligned}

for every n. The figure shows the same count: the added L is a column of n tiles plus a row of n - 1 more.

(b) Here n = 19, so she needs 2 \cdot 19 - 1 = 37 tiles. Check: 361 - 324 = 37.

(c) Solve 2n - 1 = 45: n = 23. She starts with a 22 by 22 panel and ends with 23 by 23. Check: 529 - 484 = 45. Every odd positive integer is 2n - 1 for some positive integer n, so every odd positive integer is a difference of two consecutive squares.

Example 5

The identity behind Pythagorean triples

Prove that (m^2 - n^2)^2 + (2mn)^2 = (m^2 + n^2)^2.

Solution

Neither side leads obviously to the other, so expand both. On the left, square each term with the special products and collect the m^2n^2 terms:

\begin{aligned} &(m^2 - n^2)^2 + (2mn)^2 \\ &\quad = m^4 - 2m^2n^2 + n^4 + 4m^2n^2 \\ &\quad = m^4 + 2m^2n^2 + n^4 \end{aligned}

On the right, (m^2 + n^2)^2 = m^4 + 2m^2n^2 + n^4. The standard forms match, so this is an identity. With m = 9 and n = 4 it gives 65^2 + 72^2 = 97^2, and indeed 4225 + 5184 = 9409 = 97^2. Which triples this formula produces, and why it produces all the primitive ones, is the subject of Pythagorean triples.

Example 6

A product of two sums of two squares

Prove that (a^2 + b^2)(c^2 + d^2) = (ac - bd)^2 + (ad + bc)^2, and use it to write 13 \cdot 17 = 221 as a sum of two squares.

Solution

Distributing on the left gives four terms:

\begin{aligned} &(a^2 + b^2)(c^2 + d^2) \\ &\quad = a^2c^2 + a^2d^2 + b^2c^2 + b^2d^2 \end{aligned}

On the right, square each binomial:

\begin{aligned} (ac - bd)^2 &= a^2c^2 - 2abcd + b^2d^2 \\ (ad + bc)^2 &= a^2d^2 + 2abcd + b^2c^2 \end{aligned}

Added, the -2abcd and 2abcd cancel and the same four terms remain. So the product of two sums of two squares is always a sum of two squares.

Now 13 = 2^2 + 3^2 and 17 = 1^2 + 4^2. With a = 2, b = 3, c = 1, d = 4: ac - bd = -10 and ad + bc = 11, so 221 = 10^2 + 11^2 = 100 + 121. Substituting -d for d gives the companion identity (a^2 + b^2)(c^2 + d^2) = (ac + bd)^2 + (ad - bc)^2 and a second answer, 221 = 14^2 + 5^2 = 196 + 25. The same pair ac - bd and ad + bc appears as the real and imaginary parts of (a + bi)(c + di). Taking c = a and d = -b makes the second factor the conjugate, and the product becomes the real number a^2 + b^2, the fact behind dividing by a complex number.

Boundaries

Every value means every value. These identities involve only polynomials, so no value is excluded. Once a variable sits in a denominator or under a root, an identity is claimed only where both sides are defined, as in identities in general.

Trying values is not a proof, and one failure is a disproof. Example 3(c) passed three tests and is still false. There is one precise exception: two polynomials of degree at most n that agree at n + 1 different values are identical, because a nonzero difference would have more zeros than its degree allows, which the The remainder and factor theorems rules out. Example 3(c) has degree 3 and agreed at only three values, one short.

Same standard form is the test. Two expansions that look different after collecting really are different polynomials, and some value tells them apart.

No moves that assume the conclusion. A proof runs from one side to the other, or shows the difference is zero. Working on both sides of the claim at once, as if solving it, proves nothing.

Where this goes next

Polynomial long division and Synthetic division end in an identity, dividend equals divisor times quotient plus remainder, checked by expanding exactly as here. The The remainder and factor theorems reads that identity at one value, and is the step behind the exception in the boundaries. The cubes of Example 2 grow into the full pattern for (a + b)^n, whose coefficients are rows of Pascal’s triangle. Statements about every positive integer, such as a sum of odd numbers, are also proved by induction, and trigonometric identities are proved with the same moves.

Exercises

Identity or not

Decide whether each statement is an identity. If it is not, give a value where it fails and every value where it holds.

  1. (x - 1)^2 = x^2 - 1
  2. (x + 3)(x - 1) - (x + 1)^2 = -4
  3. (x + 2)^3 = x^3 + 8
  4. Mirko checks x^3 + 2 = 2x^2 + x at x = 1, x = -1 and x = 2, and it holds each time. Is it an identity?

Prove by expanding

  1. (x + y)^2 - (x - y)^2 = 4xy
  2. (x + 2)(x^2 - 2x + 4) = x^3 + 8
  3. (a + b)^3 - (a^3 + b^3) = 3ab(a + b)
  4. (x^2 + x + 1)(x^2 - x + 1) = x^4 + x^2 + 1
  5. x^4 - y^4 = (x - y)(x + y)(x^2 + y^2)
  6. (x - 1)(x^3 + x^2 + x + 1) = x^4 - 1

Cubes and shortcuts

  1. Prove x^3 - (x - 1)^3 = 3x^2 - 3x + 1, and use it to find 21^3 - 20^3.
  2. Prove (x + 2)^3 - (x - 2)^3 = 12x^2 + 16, and use it to find 52^3 - 48^3.

Number facts

  1. Write 51 as the difference of two consecutive squares.
  2. Liliana has a k by k panel of square tiles and adds two rows and two columns to make it (k + 2) by (k + 2). Prove that she adds 4k + 4 tiles, and find how many for k = 12.
  3. Use 10 = 1^2 + 3^2, 13 = 2^2 + 3^2 and the identity of Example 6 to write 130 as a sum of two squares in two ways.
  4. Prove (2n + 1)^2 + (2n^2 + 2n)^2 = (2n^2 + 2n + 1)^2, and give the triple it makes for n = 7.

Matching coefficients

  1. Find p and q so that (x^2 + px + 3)(x - 2) = x^3 + qx^2 - x - 6 for every x.
  2. Find a and b so that (x + a)^2 - (x + b)^2 = 6x + 3 for every x.

Reasoning

  1. Osvaldo tests a claimed identity at x = 0, 1, 2, \ldots, 10 and it holds each time. Explain why this does not prove it, and say what would disprove it.
  2. Nalani proves the difference of cubes, then writes the sum of cubes by putting -y for y. Explain why that substitution is allowed.
  3. Add the identities k^2 - (k - 1)^2 = 2k - 1 for k = 1, 2, \ldots, n to prove that the first n odd numbers add to n^2. Explain what the tile figure shows about the same fact.
Answers
  1. Not an identity; it fails at x = 0 (1 against -1) and holds only at x = 1. Expanding, x^2 - 2x + 1 = x^2 - 1 gives -2x = -2.
  2. An identity. The left side is (x^2 + 2x - 3) - (x^2 + 2x + 1) = -4.
  3. Not an identity; it fails at x = 1 (27 against 9) and holds only at x = 0 and x = -2. The difference is 6x^2 + 12x = 6x(x + 2).
  4. No. At x = 0 the sides are 2 and 0. The difference is x^3 - 2x^2 - x + 2 = (x - 2)(x - 1)(x + 1), so it holds only at x = -1, 1 and 2, exactly the values Mirko tried.
  5. (x^2 + 2xy + y^2) - (x^2 - 2xy + y^2) = 4xy.
  6. x^3 - 2x^2 + 4x + 2x^2 - 4x + 8 = x^3 + 8. It is the sum of cubes with y = 2.
  7. (a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3, so the left side is 3a^2b + 3ab^2 = 3ab(a + b).
  8. Write the factors as (x^2 + 1) + x and (x^2 + 1) - x, a sum times a difference. The product is (x^2 + 1)^2 - x^2 = x^4 + x^2 + 1.
  9. (x - y)(x + y) = x^2 - y^2, and (x^2 - y^2)(x^2 + y^2) = x^4 - y^4.
  10. x^4 + x^3 + x^2 + x - x^3 - x^2 - x - 1 = x^4 - 1.
  11. 1261. x^3 - (x^3 - 3x^2 + 3x - 1) = 3x^2 - 3x + 1; at x = 21, 1323 - 63 + 1 = 1261.
  12. 30016. The cubes are x^3 \pm 6x^2 + 12x \pm 8, so the difference is 12x^2 + 16; at x = 50, 12 \cdot 2500 + 16 = 30016.
  13. 51 = 26^2 - 25^2. Solve 2n - 1 = 51 for n = 26; 676 - 625 = 51.
  14. 52 tiles. (k + 2)^2 - k^2 = k^2 + 4k + 4 - k^2 = 4k + 4; at k = 12, 196 - 144 = 52.
  15. 130 = 7^2 + 9^2 = 11^2 + 3^2. With a = 1, b = 3, c = 2, d = 3: ac - bd = -7, ad + bc = 9, and ac + bd = 11, ad - bc = -3.
  16. (15, 112, 113). Both sides expand to 4n^4 + 8n^3 + 8n^2 + 4n + 1. At n = 7: 225 + 12544 = 12769 = 113^2.
  17. p = 2, q = 0. The left side is x^3 + (p - 2)x^2 + (3 - 2p)x - 6, so 3 - 2p = -1 and q = p - 2.
  18. a = 2, b = -1. The left side is 2(a - b)x + a^2 - b^2, so a - b = 3 and a^2 - b^2 = (a - b)(a + b) = 3, giving a + b = 1.
  19. Eleven values are not every value: a polynomial difference can be zero at those eleven and nonzero elsewhere, as Example 3(c) was at three. One value where the sides differ disproves it. (If both sides have degree at most 10, agreement at these eleven values does settle it, by the exception in the boundaries.)
  20. The difference of cubes holds for every number y, so it holds for the number -y. Replacing every copy of y by -y is just choosing that value, so the new statement holds for every x and y.
  21. The left sides telescope: in (1^2 - 0^2) + (2^2 - 1^2) + \cdots up to n^2 - (n - 1)^2, each square cancels the next, leaving n^2. The right sides add to 1 + 3 + \cdots + (2n - 1). In the figure, a panel of n by n tiles is built from one tile by adding L shapes of 3, 5, 7, and so on.
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0