# How do you find (fog)(x) given f(x)=2x-5 and g(x)=x+2?

Feb 16, 2017

$\left(f o g\right) \left(x\right) = 2 x - 1$

#### Explanation:

Another way of looking at it:

set $g \left(x\right) \to {y}_{1} = x + 2. \ldots \ldots \ldots . E q u a t i o n \left(1\right)$

set $f \left(x\right) \to {y}_{2} = 2 x - 5. \ldots \ldots . E q u a t i o n \left(2\right)$

$\left(f o g\right) \left(x\right)$ is such that as f is before the g in $\left(f o g\right) \left(x\right)$

so wherever in $f \left(x\right)$ you see $x$ you substitute ${y}_{1}$ That is; you are substituting $E q u a t i o n \left(1\right)$ into any $x \text{ that is in } E q u a t i o n \left(2\right)$

So: $\left(f o g\right) \left(x\right) = \textcolor{g r e e n}{2 \left(\textcolor{red}{{y}_{1}}\right) - 5}$

but $\text{ } \textcolor{red}{{y}_{1} = x + 2}$

So: $\left(f o g\right) \left(x\right) = \textcolor{g r e e n}{2 \left(\textcolor{red}{x + 2}\right) - 5}$

$\left(f o g\right) \left(x\right) = 2 x + 4 - 5 \text{ "=" } 2 x - 1$