# How do you cube (x+2)(x+3)?

Sep 3, 2015

${\left(\left(x + 2\right) \left(x + 3\right)\right)}^{3}$

$= {x}^{6} + 15 {x}^{5} + 93 {x}^{4} + 305 {x}^{3} + 558 {x}^{2} + 540 x + 216$

#### Explanation:

First write out Pascal's triangle as far as the row that reads $1$, $3$, $3$, $1$. This gives you the coefficients of the binomial expansion:

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

In the case of $\left(x + 2\right)$ and $\left(x + 3\right)$, we have the added complication of powers of $2$ or powers of $3$, which need to be multiplied by $1$, $3$, $3$, $1$ to get the coefficients of ${\left(x + 2\right)}^{3}$ and ${\left(x + 3\right)}^{3}$

$\textcolor{w h i t e}{}$
${\left(x + 2\right)}^{3} = {x}^{3} + \left(3 \cdot {x}^{2} \cdot 2\right) + \left(3 \cdot x \cdot {2}^{2}\right) + {2}^{3}$

$= {x}^{3} + 6 {x}^{2} + 12 x + 8$

$\textcolor{w h i t e}{}$
${\left(x + 3\right)}^{3} = {x}^{3} + \left(3 \cdot {x}^{2} \cdot 3\right) + \left(3 \cdot x \cdot {3}^{2}\right) + {3}^{3}$

$= {x}^{3} + 9 {x}^{2} + 27 x + 27$

$\textcolor{w h i t e}{}$
To multiply $\left({x}^{3} + 6 {x}^{2} + 12 x + 8\right) \left({x}^{3} + 9 {x}^{2} + 27 x + 27\right)$, I will write out a $4 \times 4$ grid of products of pairs of coefficients - one from each cubic - and sum the diagonals:

$\textcolor{w h i t e}{000000} \text{|} \textcolor{w h i t e}{00} 1 \textcolor{w h i t e}{0000} 6 \textcolor{w h i t e}{000} 12 \textcolor{w h i t e}{0000} 8$
$\text{---------|-----------------------------}$
$\textcolor{w h i t e}{000} 1 \textcolor{w h i t e}{00} \text{|} \textcolor{w h i t e}{00} \textcolor{red}{1} \textcolor{w h i t e}{0000} \textcolor{g r e e n}{6} \textcolor{w h i t e}{000} \textcolor{b l u e}{12} \textcolor{w h i t e}{0000} \textcolor{p u r p \le}{8}$
$\textcolor{w h i t e}{000000} \text{|}$
$\textcolor{w h i t e}{000} 9 \textcolor{w h i t e}{00} \text{|} \textcolor{w h i t e}{00} \textcolor{g r e e n}{9} \textcolor{w h i t e}{000} \textcolor{b l u e}{54} \textcolor{w h i t e}{00} \textcolor{p u r p \le}{108} \textcolor{w h i t e}{000} \textcolor{b r o w n}{72}$
$\textcolor{w h i t e}{000000} \text{|}$
$\textcolor{w h i t e}{00} 27 \textcolor{w h i t e}{00} \text{|} \textcolor{w h i t e}{0} \textcolor{b l u e}{27} \textcolor{w h i t e}{00} \textcolor{p u r p \le}{162} \textcolor{w h i t e}{00} \textcolor{b r o w n}{324} \textcolor{w h i t e}{00} \textcolor{t e a l}{216}$
$\textcolor{w h i t e}{000000} \text{|}$
$\textcolor{w h i t e}{00} 27 \textcolor{w h i t e}{00} \text{|} \textcolor{w h i t e}{0} \textcolor{p u r p \le}{27} \textcolor{w h i t e}{00} \textcolor{b r o w n}{162} \textcolor{w h i t e}{00} \textcolor{t e a l}{324} \textcolor{w h i t e}{00} \textcolor{\mathmr{and} a n \ge}{216}$
$\textcolor{w h i t e}{}$

Hence:

${\left(\left(x + 2\right) \left(x + 3\right)\right)}^{3}$

$= {\left(x + 2\right)}^{3} {\left(x + 3\right)}^{3}$

$= \left({x}^{3} + 6 {x}^{2} + 12 x + 8\right) \left({x}^{3} + 9 {x}^{2} + 27 x + 27\right)$

$= \textcolor{red}{1} {x}^{6} + \textcolor{g r e e n}{\left(6 + 9\right)} {x}^{5} + \textcolor{b l u e}{\left(12 + 54 + 27\right)} {x}^{4} + \textcolor{p u r p \le}{\left(8 + 108 + 162 + 27\right)} {x}^{3} + \textcolor{b r o w n}{\left(72 + 324 + 162\right)} {x}^{2} + \textcolor{t e a l}{\left(216 + 324\right)} x + \textcolor{\mathmr{and} a n \ge}{216}$

$= \textcolor{red}{1} {x}^{6} + \textcolor{g r e e n}{15} {x}^{5} + \textcolor{b l u e}{93} {x}^{4} + \textcolor{p u r p \le}{305} {x}^{3} + \textcolor{b r o w n}{558} {x}^{2} + \textcolor{t e a l}{540} x + \textcolor{\mathmr{and} a n \ge}{216}$