Learn on your own. Parents beside you. Teachers guide.

Lemonmath
Tiếng Việt

Cube of a sum. Cube of a difference. Sum and difference of two cubes

Lesson 2.2 · 35 min read · Updated

A gift box is a cube with edge xx cm. Suppose we make a larger box by lengthening every edge by 11 cm. How much more volume does the new box have than the old one? The new volume is (x+1)3(x+1)^3, so we need to know how to expand the cube of a sum.

We might also ask: what is 99399^3? Since 99=100−199=100-1, we shall be able to calculate it in our heads. This lesson continues the previous one, with four identities about cubes.

The cube of a sum and of a difference

Explore: from squares to cubes

We already know (a+b)2=a2+2ab+b2(a+b)^2=a^2+2ab+b^2. To find (a+b)3(a+b)^3, we multiply by one more factor (a+b)(a+b): (a+b)3=(a+b)2(a+b)=(a2+2ab+b2)(a+b).(a+b)^3=(a+b)^2(a+b)=(a^2+2ab+b^2)(a+b). Multiplying term by term: (a2+2ab+b2)(a+b)=a3+a2b+2a2b+2ab2+ab2+b3=a3+3a2b+3ab2+b3.\begin{aligned} (a^2+2ab+b^2)(a+b)&=a^3+a^2b+2a^2b+2ab^2+ab^2+b^3\\ &=a^3+3a^2b+3ab^2+b^3. \end{aligned}

The cube of a sum using volume. Split a cube of side a + b into 8 pieces; a, b > 0.

We can also see it as a volume: a cube of edge a+ba+b is made of a cube of edge aa (volume a3a^3), a cube of edge bb (volume b3b^3), three boxes a×a×ba\times a\times b (each of volume a2ba^2b) and three boxes a\times b\times b (each of volume ab^2). Adding the eight pieces gives a^3+3a^2b+3ab^2+b^3.

Replacing b by -b in this identity gives the cube of a difference.

Going deeper. In (a-b)^3 the signs alternate: +,-,+,-. The coefficients 1,3,3,1 are the same in both identities.

The sum and difference of two cubes

We multiply (a+b) by (a^2-ab+b^2): (a+b)(a^2-ab+b^2)=a^3-a^2b+ab^2+a^2b-ab^2+b^3=a^3+b^3, because -a^2b and +a^2b, and +ab^2 and -ab^2, cancel each other. In the same way, (a-b)(a^2+ab+b^2)=a^3-b^3.

These identities hold for monomials and polynomials too, provided we treat a and b as expressions. For instance (2x)^3=8x^3, not 2x^3.

Examples

We begin with the cube of a sum and of a difference.

Next we use the identities for mental calculation.

Now we use the sum and difference of two cubes.

We also read the identities backwards.

Next we simplify and evaluate.

Finally, the problem about the box from the start.

Connections. These identities continue the lesson on squares, and all come from multiplying polynomials. They let us expand very quickly, and when read backwards they help us factorise polynomials in the next lesson.

Key terms

Summary

  • (a+b)^3=a^3+3a^2b+3ab^2+b^3.
  • (a-b)^3=a^3-3a^2b+3ab^2-b^3 (alternating signs).
  • a^3+b^3=(a+b)(a^2-ab+b^2).
  • a^3-b^3=(a-b)(a^2+ab+b^2).
  • Note that (2x)^3=8x^3, and watch the sign of the middle term in the second factor.

Practice

Each exercise has the knowledge you need and the steps. Try it yourself first, then open the solution.

Exercise 1

Expand:

a) (x+1)^3.

b) (x-3)^3.

c) (2x+1)^3.

What you need and how to start

What you need: (a+b)^3=a^3+3a^2b+3ab^2+b^3 and (a-b)^3=a^3-3a^2b+3ab^2-b^3.

Steps:

  1. Identify a and b.
  2. Write the four terms, paying attention to the signs.
Show solution

Use the identity for the cube of a sum (A+B)^3=A^3+3A^2B+3AB^2+B^3 and the cube of a difference (A-B)^3=A^3-3A^2B+3AB^2-B^3.

a) With A=x, B=1, we have (x+1)^3=x^3+3\cdot x^2\cdot1+3\cdot x\cdot1^2+1^3=x^3+3x^2+3x+1.

b) With A=x, B=3, we have (x-3)^3=x^3-3\cdot x^2\cdot3+3\cdot x\cdot3^2-3^3=x^3-9x^2+27x-27.

c) With A=2x, B=1, we have (2x+1)^3=(2x)^3+3\cdot(2x)^2\cdot1+3\cdot2x\cdot1^2+1^3=8x^3+12x^2+6x+1.

So a) x^3+3x^2+3x+1; b) x^3-9x^2+27x-27; c) 8x^3+12x^2+6x+1.

Answer. a) x^3+3x^2+3x+1. b) x^3-9x^2+27x-27. c) 8x^3+12x^2+6x+1.

Exercise 2

Expand:

a) (3x-2y)^3.

b) (x^2+2)^3.

c) \left(\dfrac12x+2\right)^3.

What you need and how to start

What you need: the identities hold when a and b are monomials; remember to cube both the coefficient and the variable.

Steps:

  1. Identify a and b.
  2. Work out a^3, 3a^2b, 3ab^2, b^3.
Show solution

Use (A+B)^3=A^3+3A^2B+3AB^2+B^3 and (A-B)^3=A^3-3A^2B+3AB^2-B^3.

a) With A=3x, B=2y, we have \begin{aligned}(3x-2y)^3&=(3x)^3-3\cdot(3x)^2\cdot2y+3\cdot3x\cdot(2y)^2-(2y)^3\\&=27x^3-54x^2y+36xy^2-8y^3.\end{aligned}

b) With A=x^2, B=2, we have (x^2+2)^3=(x^2)^3+3\cdot(x^2)^2\cdot2+3\cdot x^2\cdot2^2+2^3=x^6+6x^4+12x^2+8.

c) With A=\dfrac12x, B=2, we have \begin{aligned}\left(\frac12x+2\right)^3&=\left(\frac12x\right)^3+3\cdot\left(\frac12x\right)^2\cdot2+3\cdot\frac12x\cdot2^2+2^3\\&=\frac18x^3+\frac32x^2+6x+8.\end{aligned}

So a) 27x^3-54x^2y+36xy^2-8y^3; b) x^6+6x^4+12x^2+8; c) \dfrac18x^3+\dfrac32x^2+6x+8.

Answer. a) 27x^3-54x^2y+36xy^2-8y^3. b) x^6+6x^4+12x^2+8. c) \dfrac18x^3+\dfrac32x^2+6x+8.

Exercise 3

Expand:

a) (x+4)(x^2-4x+16).

b) (3x-1)(9x^2+3x+1).

c) (2x+3y)(4x^2-6xy+9y^2).

What you need and how to start

What you need: (a+b)(a^2-ab+b^2)=a^3+b^3 and (a-b)(a^2+ab+b^2)=a^3-b^3.

Steps:

  1. Recognise a, b and the shape of the second factor.
  2. Write the result as a sum or difference of two cubes.
Show solution

Use the identity for the sum of two cubes (A+B)(A^2-AB+B^2)=A^3+B^3 and for the difference of two cubes (A-B)(A^2+AB+B^2)=A^3-B^3.

a) With A=x, B=4, we have A^2-AB+B^2=x^2-4x+16, so (x+4)(x^2-4x+16)=x^3+4^3=x^3+64.

b) With A=3x, B=1, we have A^2+AB+B^2=9x^2+3x+1, so (3x-1)(9x^2+3x+1)=(3x)^3-1^3=27x^3-1.

c) With A=2x, B=3y, we have A^2-AB+B^2=4x^2-6xy+9y^2, so (2x+3y)(4x^2-6xy+9y^2)=(2x)^3+(3y)^3=8x^3+27y^3.

So a) x^3+64; b) 27x^3-1; c) 8x^3+27y^3.

Answer. a) x^3+64. b) 27x^3-1. c) 8x^3+27y^3.

Exercise 4

Calculate mentally using identities:

a) 21^3.

b) 19^3.

c) 31^3.

What you need and how to start

What you need: write the given number as a sum or difference of a multiple of ten and a small number.

Steps:

  1. Write 21=20+1, 19=20-1, 31=30+1.
  2. Apply the matching identity.
Show solution

We split each number into a sum or difference of a round number and a small number, then use the identities for cubes.

a) We have 21=20+1, so 21^3=(20+1)^3=20^3+3\cdot20^2\cdot1+3\cdot20\cdot1^2+1^3=8000+1200+60+1=9261.

b) We have 19=20-1, so 19^3=(20-1)^3=20^3-3\cdot20^2\cdot1+3\cdot20\cdot1^2-1^3=8000-1200+60-1=6859.

c) We have 31=30+1, so 31^3=(30+1)^3=30^3+3\cdot30^2\cdot1+3\cdot30\cdot1^2+1^3=27\,000+2700+90+1=29\,791.

So a) 9261; b) 6859; c) 29\,791.

Answer. a) 9261. b) 6859. c) 29\,791.

Exercise 5

Write each expression as the cube of a sum (or difference), or as a product:

a) x^3+12x^2+48x+64.

b) 8x^3-125.

c) 27+x^3.

What you need and how to start

What you need: read the identities backwards.

Steps:

  1. Recognise a and b (the first and last terms are cubes).
  2. Choose the matching identity.
Show solution

a) We see that x^3=x^3, 64=4^3, 12x^2=3\cdot x^2\cdot4 and 48x=3\cdot x\cdot4^2. With a=x, b=4, the expression has the form a^3+3a^2b+3ab^2+b^3, so x^3+12x^2+48x+64=x^3+3\cdot x^2\cdot4+3\cdot x\cdot4^2+4^3=(x+4)^3.

b) We have 8x^3=(2x)^3 and 125=5^3. Using the difference of two cubes a^3-b^3=(a-b)(a^2+ab+b^2) with a=2x, b=5: 8x^3-125=(2x)^3-5^3=(2x-5)\left(4x^2+10x+25\right).

c) We have 27=3^3. Using the sum of two cubes a^3+b^3=(a+b)(a^2-ab+b^2) with a=3, b=x: 27+x^3=3^3+x^3=(3+x)\left(9-3x+x^2\right).

So a) (x+4)^3; b) (2x-5)(4x^2+10x+25); c) (3+x)(9-3x+x^2).

Answer. a) (x+4)^3. b) (2x-5)(4x^2+10x+25). c) (3+x)(9-3x+x^2).

Exercise 6

Simplify C=(x+3)^3-(x-3)^3 and find the value of C at x=1.

What you need and how to start

What you need: expand the two cubes, then subtract; when removing a bracket with a - sign, change the sign of every term.

Steps:

  1. Expand (x+3)^3 and (x-3)^3.
  2. Subtract the two results, then substitute x=1.
Show solution

We have (x+3)^3=x^3+9x^2+27x+27 and (x-3)^3=x^3-9x^2+27x-27. Hence C=(x^3+9x^2+27x+27)-(x^3-9x^2+27x-27)=18x^2+54. At x=1, C=18+54=72. (Check: 4^3-(-2)^3=64+8=72.)

So C=18x^2+54 and C=72 when x=1.

Answer. C=18x^2+54; 72.

Exercise 7

Suppose a water tank is a cube with edge x m. A new tank, also a cube, is built with edges 2 m longer than the old one. Write a polynomial for the extra volume, then find it when x=3.

What you need and how to start

What you need: the volume of a cube of edge a is a^3; (x+2)^3=x^3+6x^2+12x+8.

Steps:

  1. Write the volumes of the new and old tanks.
  2. Subtract the two volumes, then substitute x=3.
Show solution

The volume of the new tank is (x+2)^3=x^3+6x^2+12x+8 (m³). The extra volume is (x^3+6x^2+12x+8)-x^3=6x^2+12x+8\ (\text{m}^3). When x=3, the extra volume is 6\cdot9+12\cdot3+8=98 (m³). (Check: 5^3-3^3=125-27=98.)

So the extra volume is 6x^2+12x+8 (m³), which equals 98 m³ when x=3.

Answer. 6x^2+12x+8 (m³); 98 m³.

Exercise 8

Suppose there are two cubic boxes whose edges (in decimetres) are a and b, with a+b=5 and ab=6. Find the total volume a^3+b^3 of the two boxes.

What you need and how to start

What you need: a^3+b^3=(a+b)^3-3ab(a+b).

Steps:

  1. Expand (a+b)^3 and solve for a^3+b^3.
  2. Substitute a+b=5 and ab=6.
Show solution

From (a+b)^3=a^3+b^3+3ab(a+b) we get a^3+b^3=(a+b)^3-3ab(a+b). Hence a^3+b^3=5^3-3\cdot6\cdot5=125-90=35. (Check: the edges are 2 dm and 3 dm, and 2^3+3^3=8+27=35.)

So the total volume of the two boxes is 35 dm³.

Answer. 35\ \text{dm}^3.

Exercise 9

Recall the lesson on cuboids and cubes. A cube has edge (2x-1) cm. Write its volume as a polynomial, then find it when x=2.

What you need and how to start

What you need: V=a^3 and (a-b)^3=a^3-3a^2b+3ab^2-b^3.

Steps:

  1. Expand (2x-1)^3.
  2. Substitute x=2.
Show solution

The volume of a cube with edge a is V=a^3. With edge a=2x-1 (cm), we have \begin{aligned}V=(2x-1)^3&=(2x)^3-3\cdot(2x)^2\cdot1+3\cdot2x\cdot1^2-1^3\\&=8x^3-12x^2+6x-1\ (\text{cm}^3).\end{aligned}

Substituting x=2 into the polynomial, we get V=8\cdot2^3-12\cdot2^2+6\cdot2-1=64-48+12-1=27\ (\text{cm}^3).

Check: when x=2 the edge is 2\cdot2-1=3 cm, and 3^3=27.

So the volume is V=8x^3-12x^2+6x-1\ (\text{cm}^3), which equals 27\ \text{cm}^3 when x=2.

Answer. 8x^3-12x^2+6x-1; 27\ \text{cm}^3.

Exercise 10 Challenge

Given a+b=1, prove that a^3+b^3+3ab=1.

What you need and how to start

What you need: (a+b)^3=a^3+b^3+3ab(a+b).

Steps:

  1. Write a^3+b^3 in terms of (a+b)^3 and 3ab(a+b).
  2. Substitute a+b=1 and simplify.
Show solution

We need to prove that a^3+b^3+3ab=1 when a+b=1.

By the identity for the cube of a sum, (a+b)^3=a^3+b^3+3ab(a+b). Hence a^3+b^3=(a+b)^3-3ab(a+b).

Substituting a+b=1, we get a^3+b^3=1^3-3ab\cdot1=1-3ab.

Therefore a^3+b^3+3ab=1-3ab+3ab=1.

So if a+b=1 then a^3+b^3+3ab=1.

Answer. The identity is proved.

Mini test

Mini test

Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.

Part I. Multiple choice

Question 1. Expanding (x+2)^3 gives
Question 2. Expanding (2x-1)^3 gives
Question 3. The expression x^3+27 equals
Question 4. The expression 8x^3-y^3 equals

Part II. True or false

Question 1. Consider (x+1)^3 and (x-1)^3.
a) (x+1)^3=x^3+1.
b) (x-1)^3=x^3-3x^2+3x-1.
c) (x+1)^3-(x-1)^3=6x^2.
d) At x=1, (x+1)^3-(x-1)^3 equals 8.

Part III. Short answer

Question 1. Calculate 11^3 mentally.

Question 2. Given a-b=1 and ab=6, find a^3-b^3.

Show answers and explanations
  1. Part I, question 1: C. (x+2)^3=x^3+3\cdot x^2\cdot2+3\cdot x\cdot4+8=x^3+6x^2+12x+8. A drops the two middle terms, B forgets the coefficients 3, D has the wrong signs.
  2. Part I, question 2: D. (2x-1)^3=8x^3-3\cdot4x^2+3\cdot2x-1=8x^3-12x^2+6x-1. B is a difference of two cubes, C forgets to square the coefficient 2 in the second term, A does not alternate the signs.
  3. Part I, question 3: A. x^3+27=x^3+3^3=(x+3)(x^2-3x+9). A has the wrong sign on the middle term, B has four terms, C gets the middle term wrong.
  4. Part I, question 4: B. 8x^3-y^3=(2x)^3-y^3=(2x-y)(4x^2+2xy+y^2). A is the cube of a difference, C is a sum of two cubes, D forgets to square the coefficient 2.
  5. Part II, question 1: a) False; b) True; c) False; d) True. a) False: 3x^2+3x is missing. b) True: the signs alternate. c) False: the difference is 6x^2+2. d) True: 2^3-0^3=8 and 6+2=8.
  6. Part III, question 1: 1331. 11^3=(10+1)^3=1000+300+30+1=1331.
  7. Part III, question 2: 19. a^3-b^3=(a-b)^3+3ab(a-b)=1+18=19.
📈 My progress

Finding Lemonmath useful?

Send this page to a friend, a parent or a teacher who could use it. Studying on your own is easier with company, and Lemonmath is free for everyone.

Facebook ✉ Email