# Let f(x)=5x-4 and g(x)=x+7. Determine  color(white)("d") a: (f@g)(x), color(white)("d")b: (g@f)(x),color(white)("d")c: (f@g)(3)color(white)(...) ?

## this is intermediate algebra and I don't understand how to solve this problem regarding functions

Dec 1, 2017

A lot of explanation given.

Part a: $\left(f \circ g\right) \left(x\right) = z = 5 x + 31$

Part b: $\left(g \circ f\right) \left(x\right) = 5 x + 3$

Part c: $\left(f \circ g\right) \left(3\right) = 15 + 31$

#### Explanation:

$\textcolor{m a \ge n t a}{\text{Explaining what it all means}}$

The letters $f \mathmr{and} g$ are a sorts of names that the writer may assign to any particular expression structure they so choose.

For example, if I use the word 'wheel' you immediately know what I am talking about it and possibly a picture of a wheel occurs in your mind.

Equally the original writer of this question intended the structure $f$ when applied to 'something' to mean $5 \times \text{something} - 4$

So $f$ of 'something' $\textcolor{w h i t e}{\text{ddd}}$is written as:

f("'something'")->5xx"'something'"-4

so $f \left(x\right) \to 5 \times x - 4 \textcolor{w h i t e}{\text{ddd")->color(white)("ddd}} 5 x - 4$

In the same way the different structure name $g$ when applied to $x$ does this to $x \textcolor{w h i t e}{\text{d")->color(white)("d}} x + 7$ so we have:

$g \left(x\right) = x + 7$
$g \left(b\right) = b + 7$
g("wheel")="wheel"+7 and so on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We can nest these (put one inside the other) and one possible way of demonstrating this is:

Set $\textcolor{red}{y = g \left(x\right) = x + 7}$

Set $\textcolor{b l u e}{z = f \left(\textcolor{red}{y}\right) = 5 \textcolor{red}{y} - 4}$

The mathematical symbols: $\left(f \circ g\right) \left(x\right)$ is saying take the structure of $g$ applied to $x$ and then apply the structure of $f$ to that. In a way it is a bit like substitution as I have shown above. The form $\left(f \circ g\right) \left(x\right)$ is worded: $f$ of $g$ of $x$

Ok so lets do it!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{m a \ge n t a}{\text{Answering part a: } \left(f \circ g\right) \left(x\right)}$

$g$ is in the right so that is the substitution.

$\textcolor{red}{y = g \left(x\right) = x + 7}$

$\textcolor{b l u e}{z = f \left(\textcolor{red}{y}\right) = 5 \textcolor{red}{y} - 4}$

Thus by substituting for $y$ we have:

$\textcolor{b l u e}{z = f \left(\textcolor{red}{y}\right) = 5 \textcolor{red}{\left(x + 7\right)} - 4}$

$z = f \left(y\right) = \textcolor{w h i t e}{\text{d}} 5 x + 35 - 4$

$\left(f \circ g\right) \left(x\right) = z = 5 x + 31 \ldots \ldots \ldots \ldots \ldots \ldots \ldots . E q u a t i o n \left(1\right)$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{m a \ge n t a}{\text{Answering part b: } \left(g \circ f\right) \left(x\right)}$

$f$ is on the right so that comes first and is the substitution

$\textcolor{red}{y = f \left(x\right) = 5 x - 4}$

color(blue)(z=g(color(red)(y))= color(red)(y)+ 7

$\textcolor{b l u e}{z = \textcolor{red}{5 x - 4} + 7}$

$z = g \left(y\right) = 5 x + 3$

$\left(g \circ f\right) \left(x\right) = 5 x + 3 \ldots \ldots \ldots \ldots \ldots . E q u a t i o n \left(2\right)$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{m a \ge n t a}{\text{Answering part c: } \left(f \circ g\right) \left(3\right)}$

Using $E q u a t i o n \left(1\right)$

$\left(f \circ g\right) \left(x\right) = 5 x + 31$

$\left(f \circ g\right) \left(3\right) = 5 \left(3\right) + 31$

$\left(f \circ g\right) \left(3\right) = 15 + 31$

$\left(f \circ g\right) \left(3\right) = 46$