Composition of Functions Help
Introduction to Composition of Functions
Suppose that f and g are functions and that the domain of g contains the range of f . This means that if x is in the domain of f then f ( x ) makes sense but also g may be applied to f (x) (Fig. 1.46). The result of these two operations, one following the other, is called g composed with f or the composition of g with f . We write
Let f ( x ) = x 2 − 1 and g ( x ) = 3 x + 4. Calculate g ο f .
Notice that we have started to work inside the parentheses: the first step was to substitute the definition of f , namely x 2 − 1, into our equation.
Now the definition of g says that we take g of any argument by multiplying that argument by 3 and then adding 4. In the present case we are applying g to x2 − 1. Therefore the right side of equation (*) equals
3 · ( x2 − 1) + 4.
This easily simplifies to 3x2 + 1. In conclusion,
g ο f ( x ) = 3x2 + 1.
Let f ( t ) = ( t 2 − 2)/( t + 1) and g ( t ) = 2t + 1. Calculate g ο f and f ο g .
We calculate that
We compute g of any argument by doubling it and adding 1. Thus equation (**) equals
One of the main points of this example is to see that f ο g is different from g ο f . We compute f ο g :
So f ο g and g ο f are different functions.
You Try It: Let f ( x ) = ∣ x ∣ and . Calculate f ο g ( x ) and g ο f ( x ).
We say a few words about recognizing compositions of functions.
How can we write the function k ( x ) = (2 x + 3)2 as the composition of two functions g and f ?
Notice that the function k can be thought of as two operations applied in sequence. First we double and add three, then we square. Thus define f ( x ) = 2x + 3 and g ( x ) = x2 . Then k ( x ) = ( g ο f )( x ).
We can also compose three (or more) functions: Define
( h ο g ο f )( x ) = h ( g ( f ( x ))).
Write the function k from the last example as the composition of three functions (instead of just two).
First we double, then we add 3, then we square. So let f(x) = 2x , g(x) = x + 3, h(x) = x2. Then k(x) = ( h ο g ο f )(x).
Write the function
as the composition of two functions.
First we square t and add 3, then we divide 2 by the quantity just obtained. As a result, we define f ( t ) = t 2 + 3 and g (t) = 2/ t. It follows that r (t) = ( g ο f )(t).
You Try It: Express the function g ( x ) = 3/(x2 + 5) as the composition of two functions. Can you express it as the composition of three functions?
Practice problems for this concept can be found at: Calculus Basics Practice Test.