Quick viewing(Text Mode)

Composition of Functions and Inverses of Functions

Composition of Functions and Inverses of Functions

Composition of Functions and Inverses of Functions

S. F. Ellermeyer June 7, 2003

1 Composition of Functions

Given two functions, f and g,wedefine the f g by ◦ f g = (x, y) x domain (g) , g (x) domain (f) ,andy = f (g (x)) . ◦ { | ∈ ∈ } In shorter form, we can write

f g (x)=f (g (x)) . ◦ The function f g is called the composition of f and g with inner function g and outer◦ function f. Its domain is

domain (f g)= x x domain (g) and g (x) domain (f) ◦ { | ∈ ∈ } As an example, suppose that f and g are the functions

f = ( 3, 6) , (2, 12) , (4, 0) , (0, 14) { − − } g = (0, 0) , (2, 0) , ( 3, 3) , (12, 4) , (1, 2) , (15, 4) . { − − } Then

f g = (0, 14) , (2, 14) , ( 3, 6) , (12, 0) , (1, 12) , (15, 0) ◦ { − − − }

1 because

f g (0) = f (g (0)) = f (0) = 14 ◦ − f g (2) = f (g (2)) = f (0) = 14 ◦ − f g ( 3) = f (g ( 3)) = f ( 3) = 6 ◦ − − − f g (12) = f (g (12)) = f (4) = 0 ◦ f g (1) = f (g (1)) = f (2) = 12 ◦ f g (15) = f (g (15)) = f (4) = 0. ◦ In general, the domain of f g is a of the domain of g and it may be a proper subset. Also, it might◦ be the case that f g = . For example, if we have the functions ◦ ∅

f = ( 3, 6) , (2, 12) , (4, 0) , (0, 14) { − − } g = (0, 5) , (2, 0) , ( 3, 12) , (12, 18) , (1, 2) , (15, 4) , { − } then f g = (2, 14) , (1, 12) , (15, 0) ◦ { − } and we see that domain (f g) is a proper subset of domain (g).Forin- stance, the number 0 is a member◦ of domain (g) but is not a member of domain (f g) because ◦ f g (0) = f (g (0)) = f (5) is not defined. ◦ As another example, if we have the functions

f = ( 3, 6) , (2, 12) , (4, 0) , (0, 14) { − − } g = (0, 5) , (2, 3) , ( 3, 12) , (12, 18) , (1, 1) , (15, 1) , { − } then f g = ◦ ∅ because no member of range (g) is a member of domain (f). Some general facts concerning domains and ranges of composite functions are given below.

1. If f and g are any two functions, then domain (f g) domain (g). ◦ ⊆ 2. If f and g are any two functions, then range (f g) range (f). ◦ ⊆ 2 3. If f and g are two functions such that range (g) domain (f),then domain (f g)=domain (g). ⊆ ◦ 4. If f and g are two functions such that range (g)=domain (f),then domain (f g)=domain (g) and range (f g)=range (f). ◦ ◦ 5. If f and g are two functions such that range (g) domain (f) = ,then f g = . ∩ 6 ∅ ◦ 6 ∅ 1.1 Forming Compositions of Functions Given by For- mulas If we have two functions, f and g,thataredefined by formulas, we can obtain a formula for the composite function, f g. This is illustrated in the examples that follow. ◦ Example 1 Let f and g be the functions f (x)=√4x 3 − g (x)=3x2 6x +1. − Find the value of f g (3) and then find a general formula for the composite function f g. After◦ having found the general formula, verify that this general value gives◦ the same value of f g (3). ◦ Solution 2 First, we find the value of f g (3): ◦ f g (3) = f (g (3)) ◦ = f (10) (because g (3) = 3 (3)2 6(3)+1=10) − = 4 (10) 3 − = p√37. Now we find a general formula for f g: ◦ f g (x)=f (g (x)) ◦ = 4g (x) 3 − = p4(3x2 6x +1) 3 − − = p√12x2 24x +4 3 − − = √12x2 24x +1. −

3 Using our general formula to compute f g (3),weobtain ◦ f g (3) = 12 (3)2 24 (3) + 1 = √37. ◦ − Example 3 Let f and g be theq functions f (x)=√4x 3 − g (x)=3x2 6x +1. − Find the value of g f (3) and then find a general formula for the composite function g f. After◦ having found the general formula, verify that this general value gives◦ the same value of g f (3). ◦ Solution 4 First, we find the value of g f (3): ◦ g f (3) = g (f (3)) ◦ = g (3) (because f (3) = 4(3) 3=3) − =3(3)2 6(3)+1 − p =10. Now we find a general formula for g f: ◦ g f (x)=g (f (x)) ◦ =3(f (x))2 6f (x)+1 − 2 =3 √4x 3 6√4x 3+1 − − − =3(4x 3) 6√4x 3+1 ¡ − −¢ − =12x 9 6√4x 3+1 − − − =12x 6√4x 3 8. − − − Using our general formula to compute g f (3),weobtain ◦ g f (3) = 12 (3) 6 4(3) 3 8=10. ◦ − − − p 1.2 Using Function Composition in Problem Solving The idea of composing two functions is used very often in mathematical problem solving. Sometimes it is used in such an elementary way that the problem solver is not even aware of using it. We now give two applications in which the idea of function composition is used. The first example is quite simple and the second is more interesting.

4 Example 5 Since there are 60 seconds in 1 minute, the function for con- verting seconds to minutes is 1 m = s 60 (where s is the number of seconds and m is the corresponding number of minutes). Also, since there are 60 minutes in 1 hour, the function for converting minutes to hours is 1 h = m 60 (where m is the number of minutes and h is the corresponding number of hours). We can now obtain a formula for converting seconds to hours:

1 1 1 1 h = m = s = s. 60 60 60 3600 µ ¶ What we have actually done here is that we have formed a composition, f g, of the two functions, ◦ 1 1 g (s)= s and f (m)= m 60 60 to obtain 1 1 1 1 f g (s)=f (g (s)) = g (s)= s = s. ◦ 60 60 60 3600 µ ¶ Example 6 A rectangular swimming pool that measures

(40 ft long) (20 ft wide) (10 ft deep) × × is being filled with water at a constant rate of 5gal/ min.Since1gal 0.13 ft3 and 5(0.13) = 0.65,wewillassumethatthetankisbeingfilled at≈ the rate of 0.65 ft3 / min. Since we are dying to go swimming, we would like to know how long it will take for the depth of the water to reach 8ft so that it will be safe to dive off of the diving board. More generally, we would like to know how long it will take for the depth of the water to reach any given depth.

5 To solve our problem, we first express the volume of the water in the pool as a function of time: If t is time (in min)andV is the volume of water (in ft3) in the pool at time t,then

V =0.65t.

Next,weexpressthevolumeofwaterinthepoolasafunctionofthedepth of the water: V =40 20 D =800D · · where D is the depth of the water (in ft). Solving the first equation for t gives us 1 t = V =1.5385V . 0.65 Substituting the equation V =800D into the equation t =1.5385V , we obtain t =1.5385 (800D) = 1230.8D. The function t =1230.8D tells us the time, t, it will take for the water to reach a certain depth, D. Thetimeitwilltakeforthewatertoreachadepthof8ft is

t =1230.8(8)=9846. 4min 164 h . ≈ (It looks like we will be waiting a while to go swimming.)

1.3 Exercises 1. For the functions

f = (1, 2) , (3, 4) , (5, 6) , (0, 5) { − } g = (1, 1) , (0, 0) , ( 5, 5) , { − } find f g and g f. ◦ ◦ 6 2. Make up an example in which f g = g f. ◦ ◦ 3. Let f and g be the functions

f (x)=4x 2 − g (x)=6x +1.

Find the value of f g ( 2) and then find a general formula for the composite function f◦ g−. After having found the general formula, verify that this general◦ value gives the same value of f g ( 2). ◦ − 4. Let f and g be the functions

f (x)=4x 2 − g (x)=x2 3x 3. − − Find the value of f g (0) and then find a general formula for the composite function f◦ g. After having found the general formula, verify that this general◦ value gives the same value of f g (0). ◦ 5. Let f and g be the functions

f (x)=4x 2 − g (x)=x2 3x 3. − − Find the value of g f (0) and then find a general formula for the composite function g◦ f. After having found the general formula, verify that this general◦ value gives the same value of g f (0). ◦ 6. Let f be the function

f (x)=2x2 x +2 − Find the value of f f (1) and then find a general formula for the composite function f◦ f. After having found the general formula, verify that this general◦ value gives the same value of f f (1). ◦ 7. In the swimming pool example given above, the pool had a uniform depth of 10 feet. Most real swimming pools are not like this. A slightly more realistic swimming pool is pictured below.

7 Assuming that this pool is being filled with a garden hose at the rate of 5 gallons per minute, how long will it take for the water depth to reach 8 feet? If you would like to pursue this type of problem further, draw a more realistic swimming pool design and try to solve the problem.

2TheInverseofaRelation

1 Suppose that f is a . We define the inverse of f,denotedbyf − ,to be the relation whose pairs are the pairs of f in the reverse order. Specifically,

1 f − = (x, y) (y, x) f . { | ∈ } For example, if f is the relation

f = (2, 1) , ( 3, 2) , (6, 5) , (4, 1) , { − − } 1 then f − is the relation

1 f − = (1, 2) , (2, 3) , ( 5, 6) , (1, 4) . { − − } If f is any relation, then

1 domain f − = range (f) and ¡ ¢ 1 range f − = domain (f) . ¡ ¢ 8 1 Also, if f is any relation, then the graphs of f and f − are symmetric with respect to the line y = x (meaning that these graphs are “mirror images” of each other with the line y = x serving as the mirror). The reason for this is as follows: If (a, b) is a pair belonging to the relation f,then(b, a) is a 1 pair belonging to the relation f − ,anditcanbeseen(inthefigure below) that the points (a, b) and (b, a) are the opposite corners of a square that is bisected by the line y = x.

Thegraphsof

f = (2, 1) , ( 3, 2) , (6, 5) , (4, 1) { − − } and 1 f − = (1, 2) , (2, 3) , ( 5, 6) , (1, 4) { − − } 1 are shown below with points of f marked as squares and points of f − marked as circles. The line y = x is also pictured.

9 In the example

f = (2, 1) , ( 3, 2) , (6, 5) , (4, 1) 1 { − − } f − = (1, 2) , (2, 3) , ( 5, 6) , (1, 4) , { − − } observe that the relation f is a function because no two of its pairs have 1 the same first component, but the relation f − is not a function because it contains both of the pairs (1, 2) and (1, 4). In order for the inverse of a function, f,tobeafunction,itmustbethecasethatnotwopairsoff have the same second component. This type of function is what we call a one—to—one function. An example of a one—to—one function

g = (2, 1) , ( 3, 2) , (6, 5) , (4, 0) . { − − } The inverse of g is

1 g− = (1, 2) , (2, 3) , ( 5, 6) , (0, 4) . { − − } Note that the inverse of any one—to—one function is in fact also a one—to—one function. Recalling the “Vertical Line Test” for testing whether or not a certain relation is a function, we observe that there is a similar “Horizontal Line Test” for testing whether or not a certain function is a one—to—one function.

Horizontal Line Test: If f is a function and no horizontal line intersects the graph of f more than once, then f is a one—to—one

10 function. If, however, there is a least one horizontal line that intersects the graph of f more than once, then f is not a one—to— one function.

We now summarize the most basic facts concerning the inverses of rela- tions:

1 1 1. If f is a relation, then domain (f − )=range (f) and range (f − )= domain (f).

1 2. If f is a relation, then the graphs of f and f − are symmetric with respect to the line y = x.

1 3. If f is a function that is not a one—to—one function, then f − is not a function.

1 4. If f is a one—to—one function, then f − is also a one—to—one function.

2.1 Exercises 1. Give an example of a relation, f, that is not a function but such that 1 f − is a function.

1 2. Give an example of a relation, f, such that neither f nor f − is a function.

3. Explain why the linear function f (x)=2x 3 is a one—to—one function. Are all linear functions one—to—one functions?− If not, then which ones are not?

4. Is the function f (x)=x2 with domain (f)=( , ) a one—to—one function? Explain your answer. −∞ ∞

5. Is the function f (x)=x2 with domain (f)=[0, ) a one—to—one function? Explain your answer. ∞

6. Is the function f (x)=x3 with domain (f)=( , ) a one—to—one function? Explain your answer. −∞ ∞

7. Is the function f (x)=√x with domain (f)=[0, ) a one—to—one function? Explain your answer. ∞

11 8. Is the function f (x)= x with domain (f)=( , ) a one—to—one function? Explain your| answer.| What if we change−∞ ∞ the domain to [ 4, 2]? What if we change the domain to [ 4, 2]? − − − 9. Is the function f (x)=1/x with domain (f)=( , 0) (0, ) a one—to—one function? Explain your answer. −∞ ∪ ∞ 10. Give an example of a function, f,withdomain (f)=( , ) that is not one—to—one and such that there is no way to restrict−∞ its∞ domain in order to make it be one—to—one.

2.2 Finding a Formula for the Inverse of a Function That is Defined By a Formula Consider the function

f = (x, y) y =4x 7 . { | − } This is a function that is defined by a formula and we can describe it more brieflybysimplywriting f (x)=4x 7. − Furthermore, since the graph of f is a line with slope 4,wecansee(by applying the Horizontal Line Test) that f is a one—to—one function. This 1 1 implies that f − is also a one—to—one function. Since the pairs of f − are the pairs of f with the components reversed, we see that

1 f − = (x, y) x =4y 7 . { | − } By solving the equation x =4y 7 − for y:

4y = x +7 1 7 y = x + , 4 4 1 we obtain a brief description of the function f − : 1 7 f 1 (x)= x + . − 4 4 12 The functions f (x)=4x 7 − and 1 7 f 1 (x)= x + − 4 4 are pictured below (along with the line y = x so that the symmetric relation 1 between the graphs of f and f − can be demonstrated).

10 8 6 4 2

0 -10-8-6-4-2 246810x -2 -4 -6 -8 -10

In general, if f is a one—to—one function that is defined by a formula

f = (x, y) formula 1 , { | } then 1 f − = (x, y) formula 2 { | } whereformula2isformula1withx and y interchanged. If we can solve formula2fory, then we will have arrived at an explicit formula for the 1 function f − . This has been illustrated in the preceding example and we illustrate it again in the two examples that follow.

Example 7 Find a formula for the inverse of the function

f (x)=x2, x [0, ). ∈ ∞ Solution 8 By looking at the graph of f (shown below), we observe that f is a one—to—one function.

13 20

15

10

5

0 -4 -2 2x 4

Since f = (x, y) y = x2 and x 0 , | ≥ then © ª 1 2 f − = (x, y) x = y and y 0 . | ≥ Solving the equation © ª x = y2 for y,weobtain y = √x. ± However, due to the additional constraint y 0,weobtain ≥ y = √x.

1 Thus, a formula for f − is 1 f − (x)=√x.

1 The graphs of f and f − (along with the line y = x)areshownbelow.

4

3 y 2

1

0 12345x

14 Example 9 A graph of the quadratic function

f (x)=2x2 4x +5, x ( , ) − ∈ −∞ ∞ is shown below.

50

40

30

20

10

0 -4 -3 -2 -1 1 2x 3 4 f (x)=2x2 4x +5, x ( , ) − ∈ −∞ ∞ Since the graph of f does not pass the Horizontal Line Test, we see that f is not a one—to—one function. However, we can restrict the domain of f so that it becomes a one—to—one function. There is more than one way to do this. We will do it by finding the vertex, (h, k), of the (which is the graph of f) and then restricting the domain to the [h, ).In informal terms, what we will do is “erase” the left half of the graph of∞f. The vertex of the graph of f is at (h, k) where 4 h = − =1 −2(2) and k =2(1)2 4(1)+5=3. − Therefore, the function

f (x)=2x2 4x +5, x [1, ) − ∈ ∞ is a one—to—one function. A graph of this function is shown below.

15 70

60

50

40

30

20

10

0 -4-3-2-1 1234x f (x)=2x2 4x +5, x [1, ) − ∈ ∞ In addition, we see that we can write the formula for f as f (x)=2(x 1)2 +3, x [1, ) − ∈ ∞ or as f = (x, y) y =2(x 1)2 +3and x 1 . | − ≥ The inverse of f is © ª 1 2 f − = (x, y) x =2(y 1) +3and y 1 . | − ≥ We now solve the equation© ª x =2(y 1)2 +3 − for y: 2(y 1)2 = x 3 − − x 3 (y 1)2 = − − 2 x 3 y 1= − 2 − ±r x 3 y =1 − . 2 ± r Sincewehavetheconstrainty 1,weseethatwemustchoosethe“+”in the above formula. This gives us≥ x 3 y =1+ − . 2 r 16 1 Aformulaforf − is thus

1 x 3 f − (x)=1+ − . 2 r 1 1 Note that domain (f − )=range (f)=[3, ).Graphsoff, f − ,andthe line y = x are shown below. ∞

10

8

6

4

2

0 246810x

2.3 Exercises 1. Find formulas for the inverses of each of the following functions. Draw the graph of each function and its inverse along with the line y = x. 1 Also, for each, state the domain and range of both f and f − .

(a) f (x)=4x 8, x ( , ) − ∈ −∞ ∞ (b) f (x)= 1 x +2, x ( , ) 4 ∈ −∞ ∞ (c) f (x)=5x, x ( , ) ∈ −∞ ∞ (d) f (x)=x, x ( , ) ∈ −∞ ∞ (e) f (x)= x +7, x ( , ) − ∈ −∞ ∞ (f) f (x)=√x, x [0, ) ∈ ∞ (g) f (x)=√x +4+5, x [ 4, ) ∈ − ∞ (h) f (x)=x2, x ( , 0] ∈ −∞ (i) f (x)=2x2 4x +5, x ( , 1] − ∈ −∞ (j) f (x)= 1 , x ( , 0) (0, ). x ∈ −∞ ∪ ∞

17 2. Explain why an even function cannot be a one—to—one function.

3. Is it possible for an odd function to be a one—to—one function? Are all odd functions one—to—one functions? Explain.

3 A Fundamental Property of Inversion

Suppose that f is a one—to—one function and suppose that x is any number in domain (f). Furthermore, suppose that

f (x)=y.

Then the pair (x, y) is a member of f, which means that the pair (y, x) is a 1 1 member of f − .Since(y, x) is a member of f − ,wecanwrite

1 f − (y)=x.

By combining the above two equations, we obtain

1 f − (f (x)) = x.

This equation holds true for any number x domain (f). In summary, if f is any one—to—one function,∈ then

1 f − (f (x)) = x for all x domain (f) . ∈ Another way to state this is to say that if f is any one—to—one function, then 1 f − f is the (with domain restricted to the domain of f). We◦ illustrate with some examples.

Example 10 We have seen that the function

f (x)=4x 7 − has inverse 1 7 f 1 (x)= x + . − 4 4 1 Demonstrate that f − f is the identity function. ◦

18 Solution 11 For any x, we have 1 7 f 1 (f (x)) = f (x)+ − 4 4 1 7 = (4x 7) + 4 − 4 7 7 = x + − 4 4 = x. 1 This shows that f − f is the identity function. ◦ Example 12 We have seen that the function f (x)=2x2 4x +5, x [1, ) − ∈ ∞ has inverse 1 x 3 f − (x)=1+ − , x [3, ). 2 ∈ ∞ 1 r Demonstrate that f − f is the identity function with domain restricted to [1, ). ◦ ∞ Solution 13 If x is any number in the interval [1, ),then ∞ 1 f (x) 3 f − (f (x)) = 1 + − r 2 (2x2 4x +5) 3 =1+ − − r 2 2x2 4x +2 =1+ − r 2 =1+√x2 2x +1 − =1+ (x 1)2 − =1+(qx 1) − = x. 1 This shows that f − f (x)=x for all x [1, ). Note that we did◦ have to use the assumption∈ ∞ that x 1 in doing the above computations. In particular, we used the fact that ≥

(x 1)2 = x 1. − − If x<1, then the above equationq is not correct.

19 3.1 Exercises For each of the ten functions in Exercise 1 of the previous exercise set, verify 1 that f − f is the identity function. ◦

20