Two functions f and g with domains D and E can be combined arithmetically as f (x) + g(x), f (x) − g(x), f (x)g(x), and The domains of the first three will be D ∩ E, where D ∩ E denotes the intersection of the sets D and E: the set of all numbers which belong to both sets, while that of the last function will be D ∩ E less all values of x for which g(x) = 0. Students may practice graphical addition with a Sa New Functions From Old Ones Arithmetic Combinations of Functions sk DEO PAT- ET RIÆ atc h sis iversitas Un e w ane n 2001 Doug MacLean f (x) . g(x) Java applet . Transformations of Functions Vertical & Horizontal Shifts Suppose the graph of a function y = f (x) is given. If c is a positive number there are a number of simple ways we may modify the function. be the graph shifted up a distance c, and y = f (x) − c will be the graph shifted operating on the function outside the brackets causes a What happens if we perform the same operations It is fairly clear that y = f (x) + c will down a distance c. In other words, vertical shift. inside the brackets? In other words, how are the graphs of y = f (x + c) and y = f (x − c) related to the graph y = f (x)? The easy way to figure this out is to let x = 0. Then y = f (0 + c) = f (0), so the value of f (x) at c is shifted to be the value of f at 0. Thus the graph is shifted a distance c to the left . Similarly, the graph of y = f (x − c) is that of y = f (x) shifted a distance c to the right. In other words, operating on the function Students may practice graph shifting with a inside the brackets causes a Java applet . 1 horizontal shift. Sa Stretching & Reflecting Functions sk PAT- ET RIÆ atc h e w ane n 2001 Doug MacLean If c > 1, there some more simple ways we may modify the function. It is fairly clear that y = cf (x) will be the graph 1 or magnified vertically by the factor c, and y = f (x) will be the graph compressed or shrunk c by the factor c. What happens if we perform the same operations inside the brackets? 1 In other words, how are the graphs of y = f (cx) and y = f ( x) related to the graph y = f (x)? c to let x = 1. Then y = f (c(1)) = f (c), so the value of f (x) at 1 is shifted to be the value at 1. factor c horizontally . 1 1 Similarly, the graph of y = f x is that of y = f (x) scaled by the factor horizontally . c c DEO sis iversitas Un stretched vertically The easy way to figure this out is Thus the graph is scaled by the What happens if c < 0? To make things simple, we assume c = −1. Then the graph of y = −f (x) is just that of y = f (x) reflected about the x-axis, a vertical effect, while the graph of y = f (−x) is that of y = f (x) reflected about the y-axis, a horizontal effect. Remember: Operations while those outside the brackets have a inside the brackets have a vertical effect, horizontal effect. 2 Whenever we take a function of a function, we say we are composing them. Example 1: Suppose f (x) = x 2 and g(x) = x + 1. 2 Then f g(x) = g(x) = (x + 1)2 = x 2 + 2x + 1 is denoted by f ◦ g(x), so that we have 2 f ◦ g(x) = f g(x) = g(x) = (x + 1)2 = x 2 + 2x + 1. Note that order is important: g ◦ f (x) = g(f (x)) = (f (x)) + 1 = x 2 + 1 is quite different! Definition: the composition of two functions f and g is defined to be the function f ◦ g defined by the rule f ◦ g(x) = f g(x) Students may practice graphical composition with a Java applet . It is convenient to think of functions in this context as processing machines connected is series. x f f(x) g g(f(x)) 3 Sa Composition of Functions sk DEO PAT- ET RIÆ atc h sis iversitas Un e w ane n 2001 Doug MacLean iversitas Un DEO PAT- ET RIÆ sk atc h y x −5 −4 −3 −2 −1 0 1 2 3 4 5 f (x) 6 5 4 3 2 1 0 1 2 3 4 g(x) −3 −2 −1 0 1 2 3 4 3 2 1 f (f (x)) U 4 3 2 1 0 1 0 1 2 3 , where U =“Undefined”. f (g(x)) 4 3 2 1 0 1 2 3 2 1 0 g(f (x)) U 1 2 3 4 3 2 3 4 3 2 g(g(x)) −1 0 1 2 3 4 3 2 3 4 3 6 5 4 3 2 1 -5 -4 -3 -2 0 -1 0 -1 1 2 3 4 -2 -3 The graphs of all four composite functions are made up of straight line segments. Why? They are shown in green: y -5 -4 -3 -2 y 6 6 5 5 4 4 3 3 2 2 1 1 -2 -3 1 2 3 4 5 x -5 f ◦f -4 -3 -2 0 -1 0 -1 -2 -3 4 e w ane n 2001 Doug MacLean It is always a good idea to make up a table of values for the functions to be graphed: 0 -1 0 -1 sis Sa Example The graph of f is shown in blue, and the graph of g is shown in red. Draw the graphs of f ◦ f , f ◦ g, g ◦ f , and g ◦ g. 1 2 3 4 5 f ◦g x 5 x Sa sk DEO PAT- ET RIÆ atc h sis iversitas Un e w ane n 2001 Doug MacLean y -5 -4 -3 -2 y 6 6 5 5 4 4 3 3 2 2 1 1 0 -1 0 -1 -2 -3 1 2 3 4 5 x -5 -4 -3 -2 0 -1 0 -1 -2 g◦f -3 1 2 3 4 5 x g◦g Problems like these have become very common on final exams lately, because they test for understanding, not computational ability. Both skills are, of course, very important. Compositions of three or more functions: By f ◦ g ◦ h(x) we mean f g (h(x)) . Example Let f (x) = x 2 , g(x) = 2x + 1, and h(x) = x+1 . x−1 2 x+1 x+1 2 Then (g ◦ h)(x) = 2h(x) + 1 = 2 + 1, and (f ◦ g ◦ h)(x) = ((g ◦ h)(x)) = 2 +1 x−1 x−1 5