<<

2. 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 R of real 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 ) 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, ∞) 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 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) = √ . 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) = √ = . 2 5 − 1 JJ II

(b) The expression f(x + h) will come up when we talk about the 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( ) = √ , − 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) = √ . x + h − 1 Home Page The parentheses in 2(x + h) are essential. Function (c) Since the square root of a negative 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, ∞), 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 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, ∞) (which we could have determined Back without looking at the graph). In the second example, the range is [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). √ 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 √ (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, ∞). This shows that the domain of a composition can be smaller than the domain of the first function applied.

2.4. Identity function Table of Contents The simplest function is the identity function ε defined by ε(x) = x. Given the input value x, it returns the output value x, so, in effect, it does nothing. The graph of this function is the graph of the equation y = x (the 45◦ line through the origin). JJ II For any function f, we have ε ◦ f = f and f ◦ ε = f, since J I (ε ◦ f)(x) = ε(f(x)) = f(x) and (f ◦ ε)(x) = f(ε(x)) = f(x).

With composition ◦ viewed as a sort of , these equations show that ε acts like Page8 of 16 a multiplicative identity (like the number 1). This is why ε is called the identity function. Back 2.5. Inverse function Print Version √ Let f(x) = x3 and g(x) = 3 x. These functions satisfy g(f(x)) = x and f(g(x)) = x, since √ √ Home Page p3 3 g(f(x)) = f(x) = x3 = x and f(g(x)) = (g(x))3 = ( 3 x)3 = x. Function The equation g(f(x)) = x says that an input x, changed by f to f(x), gets changed back f g to x by g, that is, g undoes what f does. For example, 2 7→ 8 7→ 2. Similarly, the equation Function notation f(g(x)) = x says that f undoes what g does. We say that g is an “inverse” of f. Graph of function Composition of functions Identity function Existence of inverse function. Not every function has an inverse. For instance, the Inverse function squaring function f(x) = x2 has no inverse. One might suppose that the square root √ f g function g(x) = x undoes what f does, since, for instance, 2 7→ 4 7→ 2. However, it does f g not work for every input value. For example, −2 7→ 4 7→ 2. The problem is that the squaring function f sends two inputs to the same output (both 2 and −2 get sent to 4). Put another way, the graph of f fails the horizontal line test. (A graph is said to pass the horizontal line test if each horizontal line intersects the graph Table of Contents in at most one point.) Indeed, the horizontal line y = 4 intersects the graph of f at both (−2, 4) and (2, 4). The remedy is to use a smaller domain for f, that is, to allow fewer input values. If we JJ II declare the domain of f to be just the set [0, ∞) of nonnegative real numbers, then it is no longer the case that f sends two inputs to the same output (for example, −2 is no longer J I an allowable input). In this new situation, the left half of the graph of f disappears and we are left with a graph that passes the horizontal line test. With this adjustment, the square √ Page9 of 16 root function g(x) = x does indeed serve as an inverse for f.

2.5.1 Example Back √ (a) Find 4. Print Version

2 (b) Solve the equation x = 4. Home Page Function Solution Function notation Graph of function (a) The square√ root function is the inverse of the squaring function with reduced domain [0√, ∞), so 4 is the number in the interval [0, ∞) that you square to get 4. Therefore, Composition of functions 4 = 2. Identity function Inverse function (b) Here, we are searching for all real numbers x satisfying the equation. The answer is x = ±2.

This example is intended to serve as an illustration in a familiar setting of an analogous Table of Contents example given later in the less-familiar setting of inverse trigonometric functions√ (see Ex- ample 4.4.1). Also, it is intended to correct√ the common misconception that a is ± the number you square to get a. Rather, a is the number ≥ 0 that you square to get a. The issue of ± comes up only in solving equations like in (b). JJ II

A function f is injective if it never sends two inputs to the same output (i.e., its graph J I passes the horizontal line test). If f is injective, then it has an inverse function that sends an output of f back to the (unique) input that produced the output. Page 10 of 16 Definition of inverse function. Let f : A → B be an injective function with range −1 B. The function f : B → A defined by Back

f −1(y) = x ⇐⇒ f(x) = y (1) Print Version is called the inverse of the function f. Home Page Inverse function identities. With notation as above Function (i) f −1(f(x)) = x for all x in A, Function notation (ii) f(f −1(x)) = x for all x in B. Graph of function Composition of functions If a function is not injective, then it does not have an inverse, but we can reduce its domain Identity function in order to achieve an injective function just as we did for the squaring function. This Inverse function process is illustrated here using Venn diagrams:

Table of Contents

JJ II

J I

Page 11 of 16 |x + 2| 2.5.2 Example Let f(x) = . 3 Back

(a) Explain why f has no inverse as is. Print Version (b) From here on, assume that the domain of f has been reduced to [−2, ∞). Then the function f :[−2, ∞) → [0, ∞) is injective and its range is [0, ∞) so that it has an Home Page inverse f −1 : [0, ∞) → [−2, ∞). Find a formula for the function f −1. Function (c) Verify that f and f −1 satisfy the inverse function identities (i) and (ii) (see 2.5). Function notation Solution Graph of function Composition of functions (a) f(−3) = 1/3 = f(−1) so f is not injective (the two inputs −3 and −1 produce the Identity function same output 1/3). Inverse function (b) For x in the restricted domain [−2, ∞), the quantity x + 2 is always greater than or equal to 0, so the absolute value sign in the formula can be dropped giving f(x) = (x + 2)/3. By (1) in the definition of inverse function, f −1(y) is the x satisfying f(x) = y, that is, the x satisfying (x + 2)/3 = y. Solving for x, we get x = 3y − 2, so f −1(y) = 3y − 2. Replacing y with the more traditional letter x, we get f −1(x) = 3x − 2. Table of Contents (c) For x ∈ [−2, ∞), we have x + 2 x + 2 f −1(f(x)) = f −1( ) = 3( ) − 2 = (x + 2) − 2 = x, JJ II 3 3 and for x ∈ [0, ∞), we have J I

|(3x − 2) + 2| 3|x| f(f −1(x)) = f(3x − 2) = = = |x| = x, 3 3 Page 12 of 16 as desired. Back

Print Version

−1 The inverse function identity (i) can be written (f ◦ f)(x) = ε(x), which says that Home Page f −1 ◦ f = ε. Similarly, (ii) can be written f ◦ f −1 = ε. With composition ◦ viewed as Function multiplication and ε viewed as a multiplicative identity (as in 2.4), these equations say that f −1 is a of f. This is the reason for the notation f −1 as well as the Function notation terminology “inverse function.” Graph of function Composition of functions The trigonometric functions (see 4.2) are not injective, but we will reduce their domains in order to achieve injective functions, just as we did for the squaring function, and this will Identity function enable us to define the inverse trigonometric functions (see 4.4). Inverse function

2 Graph of inverse function. The graph of the function f(x) = x , with domain reduced√ to [0, ∞), is shown below together with the graph of its inverse function f −1(x) = x.

Table of Contents

JJ II

J I

Page 13 of 16

Back We see that the graph of f −1 is the reflection of the graph of f across the 45◦ line y = x. If the graph of f is drawn, and the paper is folded along the dotted line before the ink dries, Print Version then the graph of f −1 is produced (albeit, in a different color here).

−1 This is a general property relating the graph of a function f to the graph of its inverse f Home Page (if such exists). It amounts to saying that the point (x, y) is on the graph of f if and only Function if the point (y, x) is on the graph of f −1, and this is precisely what (1) says. Function notation 2.5.3 Example Let f be as in Example 2.5.2, with domain [−2, ∞). Sketch the graph Graph of function −1 of f together with the graph of f . Composition of functions Identity function Solution As noted in the earlier example, for x in the domain [−2, ∞), the function f Inverse function is given by f(x) = (x + 2)/3. The graph of f is the same as the graph of the equation 1 2 1 2 y = (x + 2)/3 = 3 x + 3 , which is a line with 3 and y-intercept 3 . The graph of the inverse f −1 is obtained by reflecting across the 45◦ line y = x:

Table of Contents

JJ II

J I

Page 14 of 16

Back (By the earlier example, f −1(x) = 3x − 2, the graph of which is the same as that of y = 3x − 2, a line with slope 3 and y-intercept −2. This agrees with the graph of f −1 as Print Version shown above.) Home Page Function 2 – Exercises Function notation Graph of function Composition of functions √ 1 + 3x Identity function 2 – 1 Let f be the function given by f(x) = x2 − . x − 1 Inverse function (a) Find f(5). (b) Find f(x + h).

(c) Find the domain of f.

Table of Contents 2 – 2 Sketch the graph of the function f given by  1 − x2, x < 0, JJ II  f(x) = 1 − 2x, 0 ≤ x ≤ 1, 1/x, x > 1. J I

√ Page 15 of 16 2 – 3 Let f(x) = 2x + x2 and g(x) = x − 1. (a) Find (f ◦ g)(x). Back

(b) Find (g ◦ f)(3). Print Version

Home Page Function 2 – 4 Let f(x) = (x − 1)2 − 1. Function notation (a) Explain why f has no inverse as is. Graph of function (b) From here on, assume that the domain of f has been reduced to [1, ∞). Then the Composition of functions function f : [1, ∞) → [−1, ∞) is injective and its range is [−1, ∞) so that it has an Identity function inverse f −1 :[−1, ∞) → [1, ∞). Sketch the graph of f together with the graph of Inverse function f −1. (c) Find a formula for the function f −1.

(d) Verify that f and f −1 satisfy the inverse function identities (i) and (ii) (see 2.5).

Table of Contents

JJ II

J I

Page 16 of 16

Back

Print Version

Home Page