Haberman MTH 111 Section I: Functions and Their Graphs Unit 4: Function Composition In The Algebra of Functions (Section I: Unit ) we discussed adding, subtracting, multiplying, and dividing functions. In this unit we will study another way to combine functions: function composition. EXAMPLE: When Peter was younger and people asked about his age, he never had to think: he had his age memorized. But now he s older and his age has taken enough different values that he sometimes lose track, and need to do some calculations to find his age. In this eample we ll discuss the function that Peter uses to calculate his age when he can t remember: the age function. Let s call the age function a. Since his goal is to determine his age, we need to input Peter into the function a. (Thus, it makes sense to define the domain of a to be the set of all living people.) So what does the function a need to do to determine a person s age? First, a needs to find the person s birth-date, and then it needs to calculate how long ago the person s birth-date occurred. Since a needs to do these two things, we say that a is the composition of two functions: the birthdate function, b, and the how long ago this date occurred function, h. So a is the function that computes a person s age b is the function that finds a person s birth-date h is the function that calculates how long ago (measured in complete years) a date occurred. The diagram below represents how function a works. a b Peter 1/7/71 h 46 years you b??/??/?? h your age Living People Birth-dates How long ago We can epress this function symbolically as follows:
Haberman MTH 111 Section I: Unit 4 a Peter h b( Peter) h 46 1 / 7 /1971 (so Peter is 46 years old) and if represents a generic person, then the age of person can be calculated as follows: a( ) h b( ) As mentioned above, a is the composition of two functions: b and h. We have special notation for the composition of two functions: a( ) h b ( ) h b( ) KEY POINT: The composition of functions is denoted by the symbol. The composition of functions f and g is the function f g defined as follows: f g f g ( ) ( ). The notation f g can be translated as f composed with g or the composition of f and g. BE CAREFUL: f g does not mean the same thing as f g, which is the product of f and g. ( f g)( ) f g( ) while f g ( ) f ( ) g( ) EXAMPLE: Table 1 shows the temperature, C, in degrees Celsius, as a function of the temperature in degrees Fahrenheit, F. Table shows the temperature in degrees Kelvin, K, as a function of the temperature in degrees Celsius, C. [The Kelvin scale is the temperature scale devised by Lord Kelvin in 1848.] Table 1: Celsius temperature vs. Fahrenheit temperature F 1 1 68 149 1 C(F) 0 0 6 100 Table : Kelvin temperature vs. Celsius temperature C 0 0 6 100 K (C) 8.1 48.1 7.1 9.1 8.1 7.1
Haberman MTH 111 Section I: Unit 4 Suppose we want a table that shows direct conversions from temperatures in degrees Fahrenheit to temperatures in degrees Kelvin. Table shows the temperature in degrees Kelvin, K, as a function of the temperature in degrees Fahrenheit, F. Table is easy to obtain using Table 1 and Table because the outputs of Table 1 are the same as the inputs of Table. Table : Kelvin temperature vs. Fahrenheit temperature F 1 1 68 149 1 K C( F ) 8.1 4.1 7.1 9.1 8.1 7.1 Since the output of Table 1 is used as the input of Table, we write the new function in K C( F ). The new function is formed by composing the other two functions. Table as The mathematical epression for this composition is K C( F ). Therefore, K C( F) K C( F). EXAMPLE: Given C( F) ( F ) and K( C) C 7.1, find K C( F ), the 9 function which converts temperature in degrees Fahrenheit directly to temperatures in degrees Kelvin. SOLUTION: K C( F) K CF ( ) K Replace with 9 9 ( F ) C( F) ( F ) ( F ) 7.1 Since K C C, K ( F 9 9 9 ( ) 7.1 ) ( F ) 7.1 F 160 9 9 7.1 9 F.7
Haberman MTH 111 Section I: Unit 4 4 EXAMPLE: Use Table 4 to evaluate f g () and g f (). Eplain why f g (4) is undefined. (Remember with no algebraic rule or graph, the values in the table are the only values we know!) Table 4: Functions f and g. f( ) g ( ) 1 4 0 4 4 1 9 4 7 SOLUTIONS: f g () f g() f ( 4 ) (since g() 4) ) 1 (since f (4) 1) ) g f () g f () g( ) (since f () ) 0 (since g( ) 0) f g (4) f g(4) f () 9 (since g(4) 9) But f (9) is undefined because there is no input value 9 in the first column in Table 4. Therefore, f g (4) is undefined.
Haberman MTH 111 Section I: Unit 4 EXAMPLE: Use the graph in Figure 1 to find the values for k m () and m k (). Figure 1: y m( ) is the parabola and y k( ) is the line. SOLUTIONS: k m() k m() k( 1 ) (we find that m() 1 on Figure 1, so we replace m() with 1) (the linear function in Figure 1 shows us that k( 1) ) m k() mk() m( 4 ) (we find that k() 4 on Figure 1, so we replace k() with 4) (the parabolic function in Figure 1 shows us that m( 4) )
Haberman MTH 111 Section I: Unit 4 6 EXAMPLE: If m( ) and n( ) 1, find and simplify the following: a. m n( ) b. n m( ) c. m m( ) d. n n( ) SOLUTIONS: a. m n( ) m n ( ) b. n m( ) n m ( ) n m 1 6 6 1 1 9 0 1 18 60 0 1 18 60 1 c. m m( ) m m ( ) d. n n( ) n n ( ) m n 9 1 9 0 1 4 1 1 1 1 1 4 4 1 1 4 8 8 1 4 8 8 KEY POINT: As the eample above suggests, f g( ) and g f ( ) are typically different. general, Although it is possible that they are equal, in f g ( ) g f ( ). In fact, in a key point below, we notice that some functions cannot even be composed in both ways!
Haberman MTH 111 Section I: Unit 4 7 EXAMPLE: If f ( ) 4 and following functions. g ( ), find simplified algebraic rules for the a. f g( ) b. g f ( ) c. g g( ) d. f f ( ) SOLUTIONS: a. f g( ) f g ( ) b. g f ( ) g f( ) f 4 9 4 4 9 g 8 4 4 10 c. g g( ) g g( ) d. f f ( ) f f ( ) g f 4 4 4 4 4 4 4 4 16 40 4 64 160 100 4 64 160 10
Haberman MTH 111 Section I: Unit 4 8 EXAMPLE: A computer store offers a 1% discount on all new computers. At the same time, the computer manufacturer offers a $00 rebate. Let P represent the original price of a computer. a. Write a function f to represent a computer s price if only the 1% discount is applied and a function g to represent its price if only the $00 rebate is applied. b. When both the discount and the rebate are applied, the purchase price of the computer is either f g ( P ) or g f ( P ), depending on the order in which they are applied. Which would you ask the dealer to apply first? Which composition represents your choice? Justify your answer by writing epressions for f g ( P ) and g f ( P ). SOLUTIONS: a. If P represents the original price, then the price after the 1% discount is applied would be represented by P 0.1P 0.8P. So, f ( P) 0.8P is a function which represents the price of the computer if only the 1% discount is applied. If P represents the original price, then the price after the $00 rebate is applied would be P 00. So, g( P) P 00 is a function g which represents the price if only the $00 rebate is applied. b. To interpret f g ( P ), we need to work from the inside out. P represents the original price; then g performs the $00 rebate followed by f which performs the 1% discount. To interpret g f ( P ), we again need to work from the inside out. P represents the original price, then f performs the 1% discount, followed by g which performs the $00 rebate. f g ( P) f gp ( ) 0.8 g( P) (put g( P) into f by replacing the input variable of f with g( P) ) 0.8( P 00) (replace g( P) with P 00 since g( P) P 00) 0.8P 4 g f ( P) g f( P) (apply the distributive property) f ( P) 00 (put f ( P) into g by replacing the input variable of g with f ( P) ) 0.8 P 00 (replace f ( P) with 0.8 P since f ( P) 0. 8P) Since f g ( P) 0.8P 4 and g f ( P) 0.8P 00, it appears that ( ) the 1% discount followed by the $00 rebate, would be the better deal. g f P,
Haberman MTH 111 Section I: Unit 4 9 KEY POINT: In most applied problems, functions cannot be composed both ways, as demonstrated in the following eample. EXAMPLE: Suppose that the function n P(t) represents the population (n) of the Portland metropolitan area t years after 1990 and l C( y) represents the carbon dioide (CO ) concentration (l) in the atmosphere of a city of population y. Which composition function, C P( t ) or P C ( y ), makes sense? Eplain your reasoning. SOLUTION: ( ) C P t is the only composition that makes sense since C P( t) C P( t) and the input of C must be a population and the output of P is a population. P C ( y) P C( y) doesn t make sense because the input of P must be a time (in years since 1990), but the output of C is not a time. EXAMPLE: If f ( ), find two new functions u and w so that SOLUTION: f ( ) u w ( ). Essentially, this eample asks us to de-compose the function f ( ) into two new functions u and w. Since we need f ( ) u w ( ) u w( ) we need to think of f ( ) as consisting of a two-step process where w represents the first step of the process and u represents the second step in the process. There are always many different correct choices for u and w but, in this case, it is most natural to consider that the two steps involved in the function f( ) are 1 st : Add to the input nd : Etract the square root of the result of the 1 st step. Thus, we can define the functions u and w as follows: w( ) u( )
Haberman MTH 111 Section I: Unit 4 10 Let s check if this choice of u and w works: u w( ) u w( ) u f( ) Since u w( ) f ( ), our choice of u and w is correct. EXAMPLE: If, find two new functions u and w so that g( ) g( ) u w ( ). SOLUTION: In order to de-compose the function g( ) into two functions u and w we need to think of g( ) a two-step process where w represents the first step of the process and u represents the second step in the process. In this case, it is most natural to consider that the two steps involved in the function 1 st : Cube the input. g () are nd : Add to the result of the 1 st step. Thus, we can define the functions u and w as follows: w( ) u( ) Let s check if this choice of u and w works: u w( ) u w( ) u g ( ) Since u w( ) g( ), our choice of u and w is correct.
Haberman MTH 111 Section I: Unit 4 11 h( ), find two new functions u and w so that EXAMPLE: If 10 h( ) u w ( ). SOLUTION: In order to de-compose the function 10 need to think of 10 h( ) into two functions u and w we h( ) a two-step process where w represents the first step of the process and u represents the second step in the process. In this case, there are a few equally natural ways to break-down the function into two steps. We ll show two different ways here: Solution A: h ( ) to be: We can take the two steps involved in the function 10 1 st : Multiply the input by and then subtract from the result. nd : Raise the result of the 1 st step to the power 10. Thus, we can define the functions u and w as follows: w( ) u( ) Let s check if this choice of u and w works: 10 u w( ) u w( ) u 10 h ( ) Since u w( ) h( ), our choice of u and w is correct. Solution B: h ( ) to be: We can take the two steps involved in the function 10 1 st : Multiply the input by nd : Subtract from the result of the 1 st step, and then raise the result to the power 10. Thus, we can define the functions u and w as follows:
Haberman MTH 111 Section I: Unit 4 1 w( ) Let s check if this choice of u and w works: u( ) ( ) 10 u w( ) u w( ) u 10 h ( ) Since u w( ) h( ), our choice of u and w is correct. In the eample above we de-composed the function 10 h( ) into two functions u and w, but you may have noticed that the function really consists of a three-step process. Thus, the most natural decomposition consists of three functions. Let s find a three-function h( ) : de-composition of the function 10 h( ), find three new functions s, u, and w so that EXAMPLE: If 10 h( ) s u w ( ). SOLUTION: First, let s notice that h( ) s u w ( ) s u w( ) so, in order to de-compose the function h( ) 10 w, we need to think of h( ) 10 into three functions s, u, and a three-step process where w represents the first step, v represents the second step, and s represents the third step. In this case, it is h ( ) are: most natural to consider that the three steps involved in the function 10 1 st : Multiply the input by. rd : Subtract from the result of the 1 st step. nd : Raise the result of the nd step to the power 10.
Haberman MTH 111 Section I: Unit 4 1 Thus, we can define the functions s, u, and w as follows: w( ) u( ) s( ) Let s check if this choice of s, u, and w works: 10 s u w( ) s u w( ) s u s ) 10 h ( ) Since s u w( ) h( ), our choice of s, u, and w is correct.