UBC Calculus Online Course Notes

Composite Functions

Composite functions are so common that we usually don't think to think to label them as composite functions. However, they arise any time a change in one quantity produces a change in another which, in turn, produces a change in a third quantity. Does that sound confusing? Don't worry, an example will make things clear.

An Example

For this example, we'll assume that the number of humans living on the coast affects the number of whales in nearby coastal waters. Since whales eat plankton, the number of whales will affect the number of plankton in the waters.

Let's be more specific. Since whales don't like all the noise that people make, they move out of an area when too many people move in. If we denote the number of thousands of people by x and the number of whales by y, a simple model would be that $  y = f(x) = 1000 - \frac x2 $ .

Now since the whales are eating the plankton, more whales mean less plankton. If we measure the amount of plankton by z, then a simple model is that $  z = g(y) = 400 - \frac y5  $ .

Now the end result is that the number of people influence the number of whales which influences the number of plankton. To see how the number of plankton depend on the number of people, we can compute that

\[  z = g(y) = 400 - \frac y5 = 400 - \frac{1000 - \frac x2}{5} = 
200 + \frac x{10} \]

What's important is that a change is the first quantity, x or the number of people, produces a change in the second quantity, y or the number of whales. This, in turn, changes the final quantity, z or the number of plankton. You can explore this below by moving the red box on the "People" scale and seeing how the other quantities are influenced.

For your consideration:

  1. At what rate does the number of whales change compared to the number of people?

  2. At what rate does the number of plankton change compared to the number of whales?

  3. At what rate does the number of plankton change compared to the number of people?

  4. Can you explain the relationship between these three numbers?

More generally, if we have two functions $  y = f(x)  $ and $  z= g(y)  $ , we call the new function $  z = g(f(x)) 
 $ the composite of $  f  $ and $  g  $ and denote it by $  g \circ f (x) = g(f(x))  $ .

Composite functions are much more common than you may realize. For instance, if you want to compute $  e^{1.1^2}  $ on your hand-held calculator, you will enter 1.1 and then press the button which squares the entry. After that, you will press the button which exponentiates the entry. Each of the buttons you press, to square and to exponentiate, represent a function. By feeding what comes out of the squaring function into the exponentiation function, you are really computing the composite of these two functions. Said in mathematical notation, you are first evaluating $  y = f(x) = x^2  $ at 1.1 and then putting the result into the function $  z = g(y) = e^y  $ . By composing them, you obtain $  z = g(f(x)) = e^{x^2}  $ which you evaluate at 1.1.

For your consideration:

Express the following functions as composites:

  1. $  x^2 + 2  $

  2. $  e^{2x} $

  3. $  \ln(1 + e^x)  $