Given 𝑓 of 𝑥 equals three 𝑥 minus one and 𝑔 of 𝑥 equals 𝑥 squared plus one, find 𝑓 of 𝑔 of two.
This thing here is the function 𝑓 of 𝑔 or 𝑓 composed with 𝑔. And like normal for a function, we define it by saying what it does to the input 𝑥. 𝑓 composed with 𝑔 of 𝑥 is equal to 𝑓 of 𝑔 of 𝑥. Let’s use this definition to find 𝑓 of 𝑔 of two.
To find 𝑓 of 𝑔 of two, we replace 𝑥 by two in the definition, so we have 𝑓 of 𝑔 of two. We can use the definition of 𝑔 of 𝑥 to find 𝑔 of two. 𝑔 of 𝑥 is 𝑥 squared plus one, so 𝑔 of two is two squared plus one, and two squared plus one is five, so 𝑔 of two is five and 𝑓 of 𝑔 of two is 𝑓 of five.
And we know how to evaluate 𝑓 of five: we replace 𝑥 in the definition of 𝑓 of 𝑥 by five, giving us three times five minus one, which is 14. We could’ve found this a different way applying the definition of 𝑓 of 𝑥 first. 𝑓 of 𝑥 is three 𝑥 minus one, so 𝑓 of 𝑔 of two is three 𝑔 of two minus one.
We still have to find the value of 𝑔 of two of course. 𝑔 of 𝑥 is 𝑥 squared plus one, so 𝑔 of two is two squared plus one, which is five as we found before. And so as before, we get three times five minus one, which is 14. So whichever way round we do it, we get the same answer.