Section 5. Composite Functions Objective #: Form a Composite Function. In many cases, we can create a new function by taking the composition of two functions. For example, suppose f(x) x and g(x) x +. If we evaluate f(x) for when x g(x), this will give us a new function. f(g(x)) f(x + ) (x + ) x + This new function is called the composition of f and g or we can say it is f compose g. The innermost function, g, acts on x first; cubing x and then adding. The output of the innermost function becomes the input or domain element of the outermost function, f. Then outermost function acts on that input; take the square root. So, suppose we want to find f(g()), the innermost function would cube and then add : + 8 + 9. Then, the outermost function would take the square root of that answer: 9. Thus, f(g()). Definition The composition of f and g or (f compose g), denoted f O g, is defined by (f O g)(x) f(g(x)) provided that g(x) is in the domain of f. The composition of g and f or (g compose f), denoted g O f, is defined by (g O f)(x) g(f(x)) provided that f(x) is in the domain of g. Caution: (f O g)(x) and (g O f)(x) are not always equal. Given f(x) x 5, g(x) x +, and h(x) x 5, find: Ex. a (f O g)( ) Ex. b (g O f)() Ex. c (h O g)() Ex. d (g O h)(7) Ex. e (f O f)() Ex. f (h O h)(4) a) (f O g)( ) f(g( )) But, g( ) ( ) + 4. f(4) Now, plug in 4 for x in f. (4) 5 b) (g O f)() g(f()) But, f() () 5. g( ) Now, plug in for x in g. ( ) + 4
c) (h O g)() h(g()) But, g() () + 8. h(8) Now, plug in 8 for x in h. (8) 5 d) (g O h)(7) g(h(7)) But, h(7) (7) 5 or 0.5. g(0.5) Now, plug in 0.5 for x in g. (0.5) +.75 e) (f O f)() f(f()) But, f() () 5. f( ) Now, plug in for x in f. ( ) 5 7 f) (h O h)(4) h(h(4)) But, h(4) (4) 5. h( ) Now, plug in for x in h. ( ) 5 6 Objective #: Finding the Domain of a Composite Function. Given f(x) x, g(x) x, and h(x) x+ 7, find: Ex. a (f O g)(x) Ex. b (g O f)(x) Ex. c (h O g)(x) Ex. d (g O h)(x) Ex. e (h O f)(x) Ex. f (f O h)(x) a) (f O g)(x) f(g(x)) Replace g(x) by x. f(x ) Replace x by x in the function f. (x ) Simplify. x The domain is (, ). b) (g O f)(x) g(f(x)) Replace f(x) by x. g(x ) Replace x by x in g (x ) Simplify. 9x x + 4 The domain is (, ). c) (h O g)(x) h(g(x)) Replace g(x) by x. h(x ) Replace x by x in the function f. x + 7 Since x + 7 > 0, x + 7 the domain is (, ).
d) (g O h)(x) g(h(x)) Replace h(x) by x+ 7. g( x+ 7 ) Replace x by x+ 7 in the function g. ( x+ 7 ) Simplify. Be careful, for x+ 7 to be defined, x + 7 0 or x 7. x + 7 The domain is [ 7, ). e) (h O f)(x) h(f(x)) Replace f(x) by x. h(x ) Replace x by x in the function h. (x ) + 7 Simplify. But, x + 5 0 or x+ 5 x 5, the domain is [ 5, ). f) (f O h)(x) f(h(x)) Replace h(x) by x+ 7 f( x+ 7 ) Replace x by x+ 7 in f ( x+ 7 ) Simplify. Be careful, for x+ 7 to be defined, x + 7 0 or x 7. x+ 7 The domain is [ 7, ). Use the functions below to find: g(x) 6 x r(x) x 4 Ex. a (r O g)(x) Ex. b (r O r)(x) To find the domain of g, set 6 x 0 and solve: x 6 or x 8. Thus, the domain of g is { x x 8} To find the domain of r, set x 4 0, solve and exclude those values: (x )(x + ) 0 or x or Thus, the domain of r is { x x or x } a) (r O g)(x) r(g(x)) Note that { x x 8} because of g. But, x ± in r which implies that g(x) 6 x ±. Solving yields: 6 x ± (square both sides) 6 x 4 x or x 6 Thus, the domain of r O g is { x x 8, x 6} Now, let's find the composition:
4 r(g(x)) Replace g(x) by 6 x. r( 6 x ) Replace x by 6 x in r. ( 6 x ) 4 (6 x) 4 x Simplify. Simplify. The domain is { x x 8, x 6}. b) (r O r)(x) r(r(x)) Note that { x x ± } because of innermost r function. But, x ± in the outermost function r which implies that r(x) ±. Solving yields: x 4 x 4 x 4 (Multiply by x 4) x + 8 x 8 5 x x x 5 x ± 5 ± 0 So, the domain is { x x ± x x ± 0 Now, let's find the composition: r(r(x)) ±, x ±, ± Replace r(x) by r( ) Replace x by x 4 x 4 4 9 x 4 8x 4 +6 Simplify. x 4 x 4. in r. }. (Multiply top & bottom by x 4 8x + 6) x 4 4x +48 9 4x 4 +x 64
5 x4 4x +48 4x 4 +x 55 The domain is { x x ± 0, x ±, ± }. Use the graphs of the functions below to find the following: 5 4 g(x) 0-5 -4 - - - 0 4 5 - - - f(x) -4-5 Ex. 4a f( ) Ex. 4b g() Ex. 4c (g O f)( ) Ex. 4d (f O g)() Ex. 4e (g O f)(4) Ex. 4f (f O f)( 4) a) Looking at the graph of f (solid line), the point that has x- component of is (, ). Thus, f( ). b) Looking at the graph of g (dashed line), the point that has x- component of is (, ). Thus, g(). c) (g O f)( ) g(f( )) g( ) from part a. The point on g that has x-component of is (, ), so (g O f)( ) g(f( )) g( ). d) (f O g)() f(g()) f( ) from part b. The point on f that has x-component of is (, ), so (f O g)() f(g()) f( ). e) (g O f)(4) g(f(4)). The point on f that has x-component of 4 is (4, ). So, f(4). Thus, g(f(4)) g( ). But, the point on g that has x-component of is (,.5) which means g( ).5. Hence, (g O f)(4) g(f(4)).5.
f) (f O f)( 4) f(f( 4)). The point on f that has x-component of 4 is ( 4, ). So, f( 4). Thus, f(f( 4)) f(). But, the point on f that has x-component of is (, ) which means f(). Hence, (f O f)( 4) f(f( 4)). 6 Objective #: Writing Functions as a Composition of Two Simpler Functions. Find f(x) and g(x) such that the given function h(x) (f o g)(x): 5a) h(x) x 7 5b) h(x) 5(x 7) 5c) h(x) x+6 5d) h(x) x 5x + a) The outside function f is the square root function and the inside function g is x 7. Thus, f(x) x and g(x) x 7. b) The outside function f is the quadratic function and the inside function g is x 7. Thus, f(x) 5x and g(x) x 7. c) The outside function f is the inverse function and the inside function g is x + 6. Thus, f(x) x and g(x) x + 6. d) The outside function f is the absolute value function and the inside function g is x 5x +. Thus, f(x) x and g(x) x 5x +. Given f(x) x 5 and g(x).5x + 7.5: Ex. 6 Show (f o g)(x) (g o f)(x) x for all x Since f and g are linear polynomial functions, their domains are all real numbers and hence the domain of the respective compositions is all real numbers. (f o g)(x) f(g(x)) and (g o f)(x) f(g(x)) f(.5x + 7.5) g( x 5) (.5x + 7.5) 5.5( x 5) + 7.5 x + 5 5 x 7.5 + 7.5 x x Hence, (f o g)(x) (g o f)(x) x for all x. We will see in the next section that f and g are inverse functions.