# Combining the Rules

Here are a few more examples where you can 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 together, and then multiply each term in the resulting expression by 2. The other is to first multiply each term in the first pair of parentheses by 2, and then multiply the resulting expression by the other pair of parentheses. Let’s take a look at both. The first method:

$\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}$

Or, the second method would play 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 by 2, not both! Both methods give you the correct answer, and they both take about 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\cdot \left(x+2\right)$, and that

 $\left(4-2x\right)3\phantom{\rule{3.0pt}{0ex}}=\phantom{\rule{3.0pt}{0ex}}3\left(4-2x\right)$

because it doesn’t matter which side of the parentheses the number is on. 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, let’s 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 pairs of parentheses, and then you multiply the resulting product by 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 together, 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-8\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-8\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

To finish things off, let’s work on 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}$