2. Function Function Function Notation Graph of Function 2.1
Total Page:16
File Type:pdf, Size:1020Kb
2. Function Function Function notation Graph of function 2.1. Function notation Composition of functions Identity function The equation Inverse function f(x) = x2 + 3 defines a function f from the set R of real numbers to itself (written f : R ! R). This function accepts an input value x and returns an output value f(x), which, according to the equation, is obtained by squaring the input value and adding 3. For instance, when the input is 5, the output is f(5), which is 28. One way to study a given function is to make a table of input values x versus output values f(x), here illustrated for the function f(x) = x2 + 3: Table of Contents f(x) 7 4 3 4 7 JJ II x −2 −1 0 1 2 J I Input values can be chosen to be anything, but they are usually chosen to be convenient numbers (often integers) close to the region of interest (often not far from 0). Page1 of 16 A Venn diagram provides a useful way to think about a function. Pictured below is a Venn Back diagram representation of the function f(x) = x2 + 3. It shows a general input value x being mapped to the corresponding output value f(x) as well as how this mapping works for the chosen inputs. Print Version Home Page Function Function notation Graph of function Composition of functions Identity function Inverse function Table of Contents The bubble on the left represents the domain of f (here, R), which is the set of input JJ II values. The bubble on the right represents the codomain of f (here, R), which is a set containing the output values. J I The range of f is the set of all values that actually occur as outputs. Here, the range is the set [3; 1) of all numbers greater than or equal to 3 (the smallest x2 can be is 0). Page2 of 16 If a function f has domain A and codomain B we write f : A ! B and say that f is a function from A to B. Strictly speaking, in order to define a function, one must specify the Back domain and the codomain as we did above when we said that f was a function from the set R of real numbers to itself. However, if a function is given by means of a formula, like Print Version f(x) = x2 + 3, we assume that the domain is taken to be the set of all real numbers x for which the expression on the right makes sense (usually meaning no division by 0 or even roots of negative numbers), and the codomain is taken to be the set of all real numbers. Home Page Function Instead of saying something like \the function f given by f(x) = x2 + 3," we will often say \the function f(x) = x2 + 3," or even just \the function x2 + 3" when there is no need to Function notation give the function a name. Graph of function Composition of functions 2x − 3 2.1.1 Example Let f(x) = p . Identity function x − 1 Inverse function (a) Find f(5). (b) Find f(x + h). (c) Find the domain of f. Solution (a) We get f(5) by replacing every occurrence of x in the formula by 5: Table of Contents 2(5) − 3 7 f(5) = p = : 2 5 − 1 JJ II (b) The expression f(x + h) will come up when we talk about the derivative of a function. J I It is computed just as before: Replace every occurrence of x in the formula by x + h. If this is found to be confusing, it might help to imagine the formula as being Page3 of 16 2( ) − 3 f( ) = p ; − 1 Back so that f(x + h) is obtained by putting x + h in every box: 2(x + h) − 3 Print Version f(x + h) = p : x + h − 1 Home Page The parentheses in 2(x + h) are essential. Function (c) Since the square root of a negative number is undefined, the formula requires x − 1 ≥ 0. But division by zero is also undefined, so there is the further requirement x−1 6= 0. Putting Function notation these together, we get x − 1 > 0, which is the same as saying x > 1. Therefore, the domain Graph of function of f is (1; 1), the set of all real numbers greater than 1. Composition of functions Identity function Incidentally, the codomain of f in the example is taken to be R as usual. It is usually Inverse function not an easy task to find the range of a function, and that is the case in this example. An accurate graph of the function (see 2.2) usually helps considerably; we will find that calculus provides a means for producing accurate graphs. 2.2. Graph of function Table of Contents Let f be a function (by which we always mean a function from some subset of R to R). The graph of f is the set of all points (x; f(x)) with x in the domain of f. JJ II 2.2.1 Example Sketch the graph of the function f given by f(x) = x2. J I Solution We are to depict all points in the plane of the form (x; f(x)) (that is, (x; x2)), with x in the domain of f, which is R. We make a table of inputs versus outputs for some Page4 of 16 conveniently chosen input values, plot those points, and then connect them to form the graph: Back Print Version Home Page Function Function notation x f(x) Graph of function Composition of functions −2 4 Identity function −1 1 Inverse function 0 0 1 1 2 4 Table of Contents This method of plotting points and connecting them to form the graph brings up a question: How do we know that the graph proceeds smoothly between the points we plotted and does JJ II not have, say, ripples? It turns out that calculus gives the answer; it shows that the graph is in fact smooth. We will see why later, but for now we will take it on faith that this is J I the case. The graph of the function f(x) = x2 is the same as the graph of the equation y = x2 (so, Page5 of 16 replace f(x) by y). The graph of y = x2 is the set of all points (x; y) that satisfy the equation. More generally, the graph of a function f is the graph of the equation y = f(x). Back 2.2.2 Example Sketch the graph of the function f given by Print Version ( 1 − x; x ≤ 0 f(x) = Home Page 2; x > 0: Function Solution This is what is called a “piecewise-defined” function. For x ≤ 0, the function is given by f(x) = 1 − x, and for x > 0, the function is given by f(x) = 2. The graph is Function notation the same as that of the line y = 1 − x all the way up to and including x = 0, and then it Graph of function changes to the graph of the horizontal line y = 2 from that point on: Composition of functions Identity function Inverse function Table of Contents JJ II J I It was mentioned earlier that having an accurate graph aids one in the determination of the range of a function. Since the graph of f consists of all points (x; f(x)), the range of f is the set of y-coordinates of the points on the graph. As a practical matter, one can Page6 of 16 quickly visualize the range by projecting the graph horizontally (from both directions) onto the y-axis. In the first example above, the range is [0; 1) (which we could have determined Back without looking at the graph). In the second example, the range is [1; 1). Print Version Home Page Function 2.3. Composition of functions Function notation The function f(x) = (2x + 3)2 can be thought of as being built up from the two simpler Graph of function functions g(x) = 2x + 3 and h(x) = x2: Composition of functions Identity function f(x) = (2x + 3)2 = (g(x))2 = h(g(x)): Inverse function For a given input x, the function g produces the output g(x). With this output used as input, the function h produces the output h(g(x)). According to the equation above, the function f has the same effect as this two-step process. The composition of the functions g and h is the function h ◦ g given by (h ◦ g)(x) = h(g(x)): Table of Contents Here is a Venn diagram depiction of the composition h ◦ g: JJ II J I Page7 of 16 Back Print Version For the particular functions defined above, we have the relationship f = h◦g (which means Home Page that f(x) = (h ◦ g)(x) for all x). p Function 2.3.1 Example Find (h ◦ g)(x), given that g(x) = x + 1 and h(x) = x − 2x. Function notation Solution We have Graph of function p (h ◦ g)(x) = h(g(x)) = pg(x) − 2g(x) = x + 1 − 2(x + 1): Composition of functions Identity function Inverse function In the example, g has domain R, while h ◦ g has domain [−1; 1). This shows that the domain of a composition can be smaller than the domain of the first function applied. 2.4.