Section 4.2 Simplifying a Composition of Functions
If the composition of functions doesn't specify an input value, then we actually want to write an entire new function. We still work from the inside to the outside, but instead of evaluating the inside function, we put its entire formula in.
Example 4.6.
Suppose \(f(x)=2x-9\) and \(g(x)=x^2+1\text{,}\) and we want to find \(f(g(x))\text{.}\) Since we don't have a number to plug into \(g(x)\text{,}\) we're going to take its entire formula and plug it into \(f(x)\text{:}\)
You'll notice that this is very similar to what we did in Section Section 2.1. If you're having trouble keeping track of what goes where, the same tricks might be helpful. For example, you might find it helpful to color-code the inside formula. In that case, the example above would look like this:
You might also find it useful to put an extra step in the middle: write a blank where the \(x\)'s are in the formula for \(f(x)\text{,}\) and then fill in the blank with the formula for \(g(x)\text{,}\) like this:
Checkpoint 4.7.
Suppose \(f(x)=5x+1\) and \(g(x)=x^2+x-3\text{.}\) Find each of the following:
\(\displaystyle f(g(x))\)
\(\displaystyle g(f(x))\)
\(\displaystyle f(f(x))\)
\(\displaystyle f(g(x))= 5x^2+5x-14\)
\(\displaystyle g(f(x))= 25x^2 + 15x -1\)
\(\displaystyle f(f(x)) = 25x+6\)
-
To find \(f(g(x))\text{,}\) we take the whole formula for \(g(x)\) and plug it into the formula for \(f(x)\text{:}\)
\begin{align*} f(g(x)) \amp = f(x^2+x-3)\\ \amp =5(x^2+x-3)+1\\ \amp= 5x^2+5x-14 \end{align*} -
To find \(g(f(x))\text{,}\) we take the whole formula for \(f(x)\) and plug it into the formula for \(g(x)\text{:}\)
\begin{align*} g(f(x)) \amp = g(5x+1)\\ \amp = (5x+1)^2+(5x+1)-3\\ \amp = (25x^2+10x + 1) + (5x+1)-3\\ \amp = 25x^2 + 15x -1 \end{align*} -
To find \(f(f(x))\text{,}\) we take the whole formula for \(f(x)\) and plug it back into the formula for \(f(x)\text{:}\)
\begin{align*} f(f(x)) \amp = f(5x+1)\\ \amp = 5(5x+1)+1\\ \amp = 25x+6 \end{align*}