Sum and Difference of Cubes

Sum and Difference of Cubes:

$$$\color{purple}{a^3 \pm b^3=\left(a\pm b\right)\left(a^2 \mp ab+b^2 \right)}$$$

Proof of this fact is straightforward.

We just prove it from right to left.

Multiply polynomials:

$$${\left({a}-{b}\right)}{\left({{a}}^{{2}}+{a}{b}+{{b}}^{{2}}\right)}={a}\cdot{{a}}^{{2}}+{a}\cdot{a}{b}+{a}\cdot{{b}}^{{2}}-{b}\cdot{{a}}^{{2}}-{b}\cdot{a}{b}-{b}\cdot{{b}}^{{2}}=$$$

$$$={{a}}^{{3}}+{{a}}^{{2}}{b}+{a}{{b}}^{{2}}-{{a}}^{{2}}{b}-{a}{{b}}^{{2}}-{{b}}^{{3}}={{a}}^{{3}}-{{b}}^{{3}}$$$.

Similarly, it can be shown, that $$${{a}}^{{3}}+{{b}}^{{3}}={\left({a}+{b}\right)}{\left({{a}}^{{2}}-{a}{b}+{{b}}^{{2}}\right)}$$$.

Or written more compactly: $$$a^3 \pm b^3=\left(a\pm b\right)\left(a^2 \mp ab+b^2 \right)$$$

Expressions $$${{a}}^{{2}}+{a}{b}+{{b}}^{{2}}$$$ and $$${{a}}^{{2}}-{a}{b}+{{b}}^{{2}}$$$ are often called incomplete squares, because they lack one $$${a}{b}$$$ to become perfect square $$$\left({{\left({a}\pm{b}\right)}}^{{2}}={{a}}^{{2}}\pm{\color{red}{{{2}}}}{a}{b}+{{b}}^{{2}}\right)$$$.

Don't attempt to factor an incomplete square. It can't be factored.

Example 1. Factor $$${{x}}^{{3}}+{8}$$$.

Notice, that $$${8}={{2}}^{{3}}$$$.

Thus, $$${{x}}^{{3}}+{8}={{x}}^{{3}}+{{2}}^{{3}}={\left({x}+{2}\right)}{\left({{x}}^{{2}}-{x}\cdot{2}+{{2}}^{{2}}\right)}={\left({x}+{2}\right)}{\left({{x}}^{{2}}-{2}{x}+{4}\right)}$$$.

Answer: $$${{x}}^{{3}}+{8}={\left({x}+{2}\right)}{\left({{x}}^{{2}}-{2}{x}+{4}\right)}$$$.

Of course, there can be more complex expressions.

Example 2. Factor $$${27}{{y}}^{{3}}-{64}$$$.

Notice, that $$${27}{{y}}^{{3}}={{\left({3}{y}\right)}}^{{3}}$$$ and $$${64}={{4}}^{{3}}$$$.

Thus, $$${27}{{y}}^{{3}}-{64}={{\left({3}{y}\right)}}^{{3}}-{{4}}^{{3}}={\left({3}{y}-{4}\right)}{\left({{\left({3}{y}\right)}}^{{2}}+{3}{y}\cdot{4}+{{4}}^{{2}}\right)}={\left({3}{y}-{4}\right)}{\left({9}{{y}}^{{2}}+{12}{y}+{16}\right)}$$$.

Answer: $$${27}{{y}}^{{3}}-{64}={\left({3}{y}-{4}\right)}{\left({9}{{y}}^{{2}}+{12}{y}+{16}\right)}$$$.

And even harder...

Example 3. Factor the following: $$${8}{{m}}^{{6}}{{n}}^{{9}}+{27}{{a}}^{{9}}{{b}}^{{3}}$$$.

Notice, that $$${8}{{m}}^{{6}}{{n}}^{{9}}={{\left({2}{{m}}^{{2}}{{n}}^{{3}}\right)}}^{{3}}$$$ and $$${27}{{a}}^{{9}}{{b}}^{{3}}={{\left({3}{{a}}^{{3}}{b}\right)}}^{{3}}$$$.

Thus, $$${8}{{m}}^{{6}}{{n}}^{{9}}+{27}{{a}}^{{9}}{{b}}^{{3}}={{\left({2}{{m}}^{{2}}{{n}}^{{3}}\right)}}^{{3}}+{{\left({3}{{a}}^{{3}}{b}\right)}}^{{3}}=$$$

$$$={\left({2}{{m}}^{{2}}{{n}}^{{3}}+{3}{{a}}^{{3}}{b}\right)}{\left({{\left({2}{{m}}^{{2}}{{n}}^{{3}}\right)}}^{{2}}-{2}{{m}}^{{2}}{{n}}^{{3}}\cdot{3}{{a}}^{{3}}{b}+{{\left({3}{{a}}^{{3}}{b}\right)}}^{{2}}\right)}=$$$

$$$={\left({2}{{m}}^{{2}}{{n}}^{{3}}+{3}{{a}}^{{3}}{b}\right)}{\left({4}{{m}}^{{4}}{{n}}^{{6}}-{6}{{a}}^{{3}}{b}{{m}}^{{2}}{{n}}^{{3}}+{9}{{a}}^{{6}}{{b}}^{{2}}\right)}$$$.

Answer: $$${8}{{m}}^{{6}}{{n}}^{{9}}+{27}{{a}}^{{9}}{{b}}^{{3}}={\left({2}{{m}}^{{2}}{{n}}^{{3}}+{3}{{a}}^{{3}}{b}\right)}{\left({4}{{m}}^{{4}}{{n}}^{{6}}-{6}{{a}}^{{3}}{b}{{m}}^{{2}}{{n}}^{{3}}+{9}{{a}}^{{6}}{{b}}^{{2}}\right)}$$$.

Now, it is time to exercise.

Exercise 1. Factor the following: $$${{n}}^{{3}}+{125}$$$.

Answer: $$${\left({n}-{5}\right)}{\left({{n}}^{{2}}+{5}{n}+{25}\right)}$$$.

Exercise 2. Factor the following: $$$-{343}+{{y}}^{{6}}{{x}}^{{3}}$$$.

Answer: $$${\left({{y}}^{{2}}{x}-{7}\right)}{\left({{y}}^{{4}}{{x}}^{{2}}+{7}{{y}}^{{2}}{x}+{49}\right)}$$$. Hint: $$$-{343}+{{y}}^{{6}}{{x}}^{{3}}={{y}}^{{6}}{{x}}^{{3}}-{343}$$$.

Exercise 3. Factor $$${{x}}^{{3}}{{y}}^{{3}}{{z}}^{{3}}-{27}{{a}}^{{3}}$$$.

Answer: $$${\left({x}{y}{z}-{3}{a}\right)}{\left({{x}}^{{2}}{{y}}^{{2}}{{z}}^{{2}}+{3}{a}{x}{y}{z}+{9}{{a}}^{{2}}\right)}$$$.

Exercise 4. Factor $$${8}{{x}}^{{3}}+{1}$$$.

Answer: $$${\left({2}{x}+{1}\right)}{\left({4}{{x}}^{{2}}-{2}{x}+{1}\right)}$$$.