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 :

The image displays two block diagrams illustrating the functions \(g\) and \(h\) in relation to the input \(x\).

Long description

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 :

A diagram illustrating the composition of two functions, showing the input \(x\) being squared by function \(g\) and then having three times the result plus five by function \(h\), resulting in \(3x^2 + 5\).

Long description

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 image displays the composition of two functions, \(g(h(x))\), shown as a sequence of steps.

Long description

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 .