Combinations of Functions

Read this section for an introduction to combinations of functions, then work through practice problems 1-9.

Composition of Functions - Functions of Functions

Basic functions are often combined with each other to describe more complicated situations. Here we will consider the composition of functions, functions of functions.

Definition: The composite of two functions f and g , written f \circ g, is f \circ g(x) ≡ f( g(x) ).

The domain of the composite function f \circ g(x) = f( g(x) ) consists of those x–values for which g(x) and f( g(x) ) are both defined - we can evaluate the composition of two functions at a point x only if each step in the composition is defined.

If we think of our functions as machines, then composition is simply
a new machine consisting of an arrangement of the original machines. The composition  f \circ g of the function machines f and g shown in Fig. 5(a) is an arrangement of the machines so that the original input x goes into machine g , the output from machine g becomes the input into machine f, and the output from machine f is our final output. The composition of the function machines f \circ g(x) = f( g(x) ) is only valid if x is an allowable input into g  (x is in the domain of g) and if g(x) is then an allowable input into f . The composition g \circ f involves arranging the machines so the original input goes into f, and the output from f then becomes the input for g (Fig. 5(b) ).


Example 2: For f(x) = x – 2 ,  g(x) = x^2, and h(x) = \left\{ \begin{array}{ll} 3x & \mbox { if  x < 2 } \\ x – 1 & \mbox { if  2 ≤ x }\end{array} \right. , evaluate  f \circ g(3), g \circ f(6), f \circ h(2) and h \circ g(–3). Find the equations and domains of f \circ g(x) and g \circ f(x).

Solution: f \circ g(3) =  f( g(3) )  =  f( 3^2 )  =  f( 9 )  =  \sqrt{9 – 2}   =  \sqrt7   ≈  2.646
g \circ f(6) =  g( f(6) )  = 
    g(\sqrt{6 – 2}  )  =  g( \sqrt 4  )  =  g( 2 ) =  2^2  =  4
f \circ h(2) =  f( h(2) )  =  f( 2 – 1 )  =  f( 1 )  =  \sqrt{1 – 2}   =  \sqrt{–1} which is undefined
h \circ g(–3) = h( g(–3) ) = h( 9 ) = 9 – 1 = 8.

f \circ g(x) = f( g(x) ) = f( x^2 ) = x^2 – 2, and the domain of f \circ g is those x–values for which x^2 – 2 ≥ 0 so the domain of f \circ g is all x such that x ≥ 2 or x ≤ – 2.

g \circ f(x) = g( f(x) ) = g(\sqrt{ x – 2}   ) = { x – 2  }^2 = x – 2, but we can evaluate the first piece, f, of the composition only if f(x) = x – 2 is defined, so the domain of g \circ f is all x ≥ 2.

Practice 4: For f(x) = \frac{x}{x–3} , g(x) = \sqrt{1+x} , and h(x) = \left\{ \begin{array}{ll} 2x & \mbox { if  x ≤ 1}\\ 5 – x & \mbox { if 1 < x}\end{array} \right..
Evaluate  f \circ g(3), f \circ g(8), g \circ f(4), f \circ h(1), f \circ h(3), f \circ h(2) and h \circ g(–1). Find the equations for f \circ g(x) and g \circ f(x).