# Combining the Rules

Here are a few more examples where you use a combination of the rules from the previous pages.

Example 1

Expand $2\left(2+x\right)\left(3-y\right)$

Here, you have two options. The first is to multiply the two parentheses, and then multiply each term in the resulting expression with 2. The other is to first multiply each term in the first pair of parentheses with 2, and then multiply the resulting expression with the other pair of parentheses. I’ll show you both, the first method first:

$\begin{array}{llll}\hfill & \phantom{=}2\left(2+x\right)\left(3-y\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2\left(6-2y+3x-xy\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =12-4y+6x-2xy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill 2\left(2+x\right)\left(3-y\right)& =2\left(6-2y+3x-xy\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =12-4y+6x-2xy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

The second method plays out like this:
$\begin{array}{llll}\hfill & \phantom{=}2\left(2+x\right)\left(3-y\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\left(4+2x\right)\left(3-y\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =12-4y+6x-2xy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill 2\left(2+x\right)\left(3-y\right)& =\left(4+2x\right)\left(3-y\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =12-4y+6x-2xy\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Note that you only multiply one of the pairs of parentheses with 2, not both! Both methods give you the correct answer, and they both take the same amount of calculation.

Example 2

Expand the expression $2\left(x+2\right)-\left(4-2x\right)3$

Remember that $2\left(x+2\right)$ is the same as $2×\left(x+2\right)$, and that

 $\left(4-2x\right)3=3\left(4-2x\right)$

because it doesn’t matter which side of the parentheses the number is. That gives you

$\begin{array}{llll}\hfill & \phantom{=}2\left(x+2\right)-\left(4-2x\right)3\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2x+4+\left(-4+2x\right)3\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2x+4-12+6x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =8x-8.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill 2\left(x+2\right)-\left(4-2x\right)3& =2x+4+\left(-4+2x\right)3\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =2x+4-12+6x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =8x-8.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Next, you’ll look at an example where you multiply three pairs of parentheses. The same rules that applied earlier are still in effect. You begin by multiplying two of the parentheses, and then you multiply that product with the third pair of parentheses.

Example 3

Expand the expression $\left(x+4\right)\left(x+2\right)\left(x-1\right)$.

First, you multiply the first two parentheses, and then you multiply that product with the third pair of parentheses:

$\begin{array}{llll}\hfill & \phantom{=}\left(x+4\right)\left(x+2\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\phantom{\rule{-0.17em}{0ex}}\left({x}^{2}+2x+4x+8\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\phantom{\rule{-0.17em}{0ex}}\left({x}^{2}+6x+8\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{3}-{x}^{2}+6{x}^{2}-6x+8x-8\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{3}+5{x}^{2}+2x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill \left(x+4\right)\left(x+2\right)\left(x-1\right)& =\phantom{\rule{-0.17em}{0ex}}\left({x}^{2}+2x+4x+8\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =\phantom{\rule{-0.17em}{0ex}}\left({x}^{2}+6x+8\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{3}-{x}^{2}+6{x}^{2}-6x+8x-8\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{3}+5{x}^{2}+2x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

To finish off you’ll look at an example with powers and parentheses.

Example 4

Expand the expression

 $x\left(x-5\right)-\left(x+4\right)\left(x+2\right)\left(x-1\right)$

You should start with the products. Expand $x\left(x-5\right)$ and $\left(x+4\right)\left(x+2\right)\left(x-1\right)$ individually:

 $x\left(x-5\right)={x}^{2}-5x,$

and

$\begin{array}{llll}\hfill & \phantom{=}\left(x+4\right)\left(x+2\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{3}+5{x}^{2}+2x-8,\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

 $\left(x+4\right)\left(x+2\right)\left(x-1\right)={x}^{3}+5{x}^{2}+2x-8,$

as you found in Example 3. This means that
$\begin{array}{llll}\hfill & \phantom{=}x\left(x-5\right)-\left(x+4\right)\left(x+2\right)\left(x-1\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{2}-5x-\phantom{\rule{-0.17em}{0ex}}\left({x}^{3}+5{x}^{2}+2x-8\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{2}-5x-{x}^{3}-5{x}^{2}-2x+8\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =-{x}^{3}-4{x}^{2}-7x+8.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

$\begin{array}{llll}\hfill x\left(x-5\right)-\left(x+4\right)\left(x+2\right)\left(x-1\right)& ={x}^{2}-5x-\phantom{\rule{-0.17em}{0ex}}\left({x}^{3}+5{x}^{2}+2x-8\right)\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & ={x}^{2}-5x-{x}^{3}-5{x}^{2}-2x+8\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =-{x}^{3}-4{x}^{2}-7x+8.\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$