3 Composition of functions

Consider the two functions g ( x ) = x 2 , and h ( x ) = 3 x + 5 . Block diagrams showing the rules for these functions are shown in Figure 4.


Figure 4 :

{ Block diagrams of two functions $g$ and $h$}


Suppose we place these Block diagrams together in series as shown in Figure 5, so that the output from function g is used as the input to function h .


Figure 5 :

{ The composition of the two functions to give $h(g(x))$}


Study Figure 5 carefully and deduce that when the input to g is x the output from the two functions in series is 3 x 2 + 5 . Since the output from g is used as input to h we write

h ( g ( x ) ) = h ( x 2 ) = 3 x 2 + 5

The form h ( g ( x ) ) is known as the composition of the functions g and h .

Suppose we interchange the two functions so that h is applied first as shown in Figure 6.


Figure 6 :

{ The composition of the two functions to give $g(h(x))$}


Study Figure 6 and note that when the input to h is x the final output is ( 3 x + 5 ) 2 . We write

g ( h ( x ) ) = ( 3 x + 5 ) 2

Note that the function h ( g ( x ) ) is different from g ( h ( x ) ) .

Example 4

Given two functions g ( t ) = 3 t + 2 and h ( t ) = t + 3 obtain an expression for the composition g ( h ( t ) ) .

Solution

We have   g ( h ( t ) ) = g ( t + 3 ) . Now the rule for g is ‘triple the input and add 2’, and so we can write g ( t + 3 ) = 3 ( t + 3 ) + 2 = 3 t + 11 so,   g ( h ( t ) ) = 3 t + 11 .

Task!

Given the two functions g ( t ) = 3 t + 2 and h ( t ) = t + 3 as in Example 4 above, obtain an expression for the composition h ( g ( t ) ) .

‘add 3 to the input’, h ( 3 t + 2 ) = 3 t + 5 . Note that h ( g ( t ) ) g ( h ( t ) ) .

Exercises
  1. Find f ( g ( x ) ) when f ( x ) = x 7 and g ( x ) = x 2 .
  2. If f ( x ) = 8 x + 2 find f ( f ( x ) ) .
  3. If f ( x ) = x + 6 and g ( x ) = x 2 5 find
    1. f ( g ( 0 ) ) ,
    2. g ( f ( 0 ) ) ,
    3. g ( g ( 2 ) ) ,
    4. f ( g ( 7 ) ) .
  4. If f ( x ) = x 3 x + 1 and g ( x ) = 1 x find g ( f ( x ) ) .
  1. x 2 7 .
  2. 8 ( 8 x + 2 ) + 2 = 64 x + 18 .
    1. 1,
    2. 31,
    3. 4 ,
    4. 50 .
  3. x + 1 x 3 .