# How do you find (gof)(x) given f(x)=x-1 and g(x)=x^2+2x-8?

Aug 2, 2017

Another notation is given by the following equation:

$\left(g o f\right) \left(x\right) = g \left(f \left(x\right)\right)$

We substitute $g \left(x\right) = {x}^{2} + 2 x - 8$ on the right side but we write $\left(f \left(x\right)\right)$ everywhere that there is an x:

$\left(g o f\right) \left(x\right) = {\left(f \left(x\right)\right)}^{2} + 2 \left(f \left(x\right)\right) - 8$

Substitute $x - 1$ for $f \left(x\right)$:

$\left(g o f\right) \left(x\right) = {\left(x - 1\right)}^{2} + 2 \left(x - 1\right) - 8$

Expand the square:

$\left(g o f\right) \left(x\right) = {x}^{2} - 2 x + 1 + 2 \left(x - 1\right) - 8$

Use the distributive property:

$\left(g o f\right) \left(x\right) = {x}^{2} - 2 x + 1 + 2 x - 2 - 8$

Combine like terms:

$\left(g o f\right) \left(x\right) = {x}^{2} - 9 \leftarrow$ answer