Unformatted text preview: FIRST YEAR CALCULUS
W W L CHEN
c
W W L Chen, 1982, 2005. This chapter originates from material used by the author at Imperial College, University of London, between 1981 and 1990. It is available free to all individuals, on the understanding that it is not to be used for ﬁnancial gain, and may be downloaded and/or photocopied, with or without permission from the author. However, this document may not be kept on any information storage and retrieval system without permission from the author, unless such system is not accessible to any individuals other than its owners. Chapter 2
FUNCTIONS 2.1. Introduction Let us begin with two very simple examples which everybody can understand. Example 2.1.1. Consider a simple test where there are 4 questions each of which is marked 1 (correct) or 0 (incorrect), and a student is awarded a mark equal to the number of correct answers obtained. Now the possible results that a student can get are the following: 1111 1011 0111 0011 More formally, we may consider a set A = {1111, 1110, 1101, 1100, 1011, 1010, 1001, 1000, 0111, 0110, 0101, 0100, 0011, 0010, 0001, 0000} of all the possible markings, as well as a set B = {0, 1, 2, 3, 4} of the marks awarded. The rule is then given by a function f : A → B , where f (1111) = 4, f (1011) = 3, f (0111) = 3, f (0011) = 2, f (1110) = 3, f (1010) = 2, f (0110) = 2, f (0010) = 1, f (1101) = 3, f (1001) = 2, f (0101) = 2, f (0001) = 1, f (1100) = 2, f (1000) = 1, f (0100) = 1, f (0000) = 0. 1110 1010 0110 0010 1101 1001 0101 0001 1100 1000 0100 0000 Example 2.1.2. The set of even natural numbers can be obtained by taking the set N of all natural numbers and multiplying each of them by 2. More precisely, we can considering a function f : N → N, where f (x) = 2x for every x ∈ N.
Chapter 2 : Functions page 1 of 8 First Year Calculus c W W L Chen, 1982, 2005 More formally, let A and B be sets. A function f from A to B assigns to each x ∈ A an element f (x) in B . We write f : A → B : x → f (x) or simply f : A → B . The set A is called the domain of f , and the set B is called the codomain of f . The element f (x) is called the image of x under f . Furthermore, the set f (A) = {y ∈ B : y = f (x) for some x ∈ A} is called the range of f . Two functions f : A → B and g : A → B are said to be equal, denoted by f = g , if f (x) = g (x) for every x ∈ A. It is sometimes convenient to express a function f by its graph G. This is deﬁned by G = {(x, f (x)) : x ∈ A} = {(x, y ) : x ∈ A and y = f (x) ∈ B }. Example 2.1.3. Consider the function f : R → R deﬁned by f (x) = 2x for every x ∈ R. Then the domain and codomain of f are R, while the range of f is also R. Also, we have f (1) = 2 and f (−2) = −4. Example 2.1.4. Consider the function f : N → N deﬁned by f (x) = 2x for every x ∈ N, as discusssed in Example 2.1.2. Then the domain and codomain of f are N, while the range of f is the set of all even natural numbers. Also, we have f (1) = 2, while it is inappropriate to discuss f (−2), since −2 does not belong to the domain of the function. Example 2.1.5. Consider the function f : R → R deﬁned by f (x) = x2 for every x ∈ R. Then the domain and codomain of f are R, while the range of f is the set of all nonnegative real numbers. Example 2.1.6. Denote by S the set of all nonnegative real numbers. Consider the function f : R → S deﬁned by f (x) = x2 for every x ∈ R. Then the domain of f is R, the codomain of f is S , while the range of f is also S . The functions in Examples 2.1.5 and 2.1.6 are diﬀerent, although they share the same deﬁning formula and domain. In Example 2.1.6, we have, by our careful choice of the codomain, ensured that the range is the whole of the codomain. This is a very important point in the deﬁnition of a function. The choice of domain and codomain is entirely at our disposal. Sometimes, we make our choice to suit our precise needs. Example 2.1.7. In the previous four examples, the functions have deﬁning formulas. However, this need not necessarily be the case. Suppose that A = {1, 2} and B = {a, b, c}. Then we can deﬁne a function f : A → B simply by writing, for example, f (1) = a and f (2) = c. Example 2.1.8. The speed of light is denoted by c. It follows that the distance travelled by light in time t is given by the formula f (t) = ct. This can formally be made a function, but we must be careful with our domain to ensure that t is nonnegative. An appropriate choice for the domain may be the set S of all nonnegative real numbers, in which case an appropriate choice for the codomain will be S again. Strictly speaking, we may also choose our codomain to be R or any set that contains S , although these choices are in some sense not natural, since distance is represented by a nonnegative real number. Example 2.1.9. Suppose that we wish to study the temperature on a metal disc of radius 1 metre. Then it is convenient to represent each point on the disc in polar coordinates r and θ, where 0 ≤ r ≤ 1 and 0 ≤ θ < 2π . In this case, we may take the domain A = [0, 1] × [0, 2π ), and consider a function f : A → B , where B is a suitable range of real numbers suﬃcient to represent all possible temperature of the metal disc. For instance, we may take B = R. Example 2.1.10. Suppose that the air resistence that an object encounters is proportional to the speed of the object. Then the resistence may be given by r = kv , where v represents the speed of the object and k is a positive proportionality constant. The domain must be a set of the form [0, V ], where V is a suitably chosen number not exceeding the speed of light. The codomain may be an interval of the form [0, R], where R ≥ kV . Then we have a function f : [0, V ] → [0, R], where f (v ) = kv for every v ∈ [0, V ].
Chapter 2 : Functions page 2 of 8 First Year Calculus c W W L Chen, 1982, 2005 2.2. Composition of Functions We begin by discussing a practical problem in which functions play an important role. Example 2.2.1. Consider the problem of producing a map of the world to show the altitude of land and the depth of sea, and let us simplify our problem by assuming that no land is below sea level. We may ﬁrst represent the altitude of land by a nonnegative real number and the depth of sea by a negative real number. Now the position of any point on earth can be represented by two numbers (x, y ), where x is the degree in longitude and y is the degree in latitude, with the convention that east and north are positive and west and south are negative. Then (x, y ) ∈ [−180, 180] × [−90, 90], and we can represent the altitude or depth at the point (x, y ) by a real number which we denote by h(x, y ). More formally, we take the domain P = [−180, 180] × [−90, 90] and consider a function h : P → R, where for every (x, y ) ∈ P , the value h(x, y ) represents the altitude or depth of the earth at the point (x, y ). Next, we may use some colour to denote the ranges of altitude and depth. For instance, we may choose the following scheme: dbr: lbr: yll: grn: wht: lbl: mbl: dbl: dark brown, representing altitude of 5000 metres or higher light brown, representing altitude of 3000 metres or higher, but below 5000 metres yellow, representing altitude of 1000 metres or higher, but below 3000 metres green, representing altitude below 1000 metres white, representing depth of under 1000 metres light blue, representing depth of 1000 metres or more, but under 3000 metres medium blue, representing depth of 3000 metres or more, but under 5000 metres dark blue, representing depth of 5000 metres or more More formally, we take a codomain C = {dbl, mbl, lbl, wht, grn, yll, lbr, dbr}, and consider a function s : R → C , where for every x ∈ R, we have dbl if x ≤ −5000, mbl if −5000 < x ≤ −3000, lbl if −3000 < x ≤ −1000, wht if −1000 < x ≤ 0, s(x) = grn if 0 ≤ x < 1000, yll if 1000 ≤ x < 3000, lbr if 3000 ≤ x < 5000, dbr if x ≥ 5000. To produce a map, we now need to associate position of any point on earth with the colour that represents its altitude of depth. We need to ﬁnd some way to combine these two functions that we have constructed. Suppose that A, B and C are sets and f : A → B and g : B → C are functions. We deﬁne the composition function g ◦ f : A → C by writing (g ◦ f )(x) = g (f (x)) for every x ∈ A. Put simply, for every x ∈ A, in order to ﬁnd (g ◦ f )(x), we apply the function f ﬁrst to x, followed by the function g to f (x). The picture x −→ f (x) −→ g (f (x)) = (g ◦ f )(x) describes this composition. Example 2.2.2. Continuing with Example 2.2.1, recall that we have two function h : P → R and s : R → C . The ﬁrst of these give the altitude or depth of points on earth, while the second one gives colours corresponding to ranges of these altitudes and depths. To produce a map, we need to consider the composition s ◦ h : P → C , given by (s ◦ h)(x, y ) = s((h(x, y )) for every (x, y ) ∈ P . The picture (x, y ) −→ h(x, y ) −→ s(h(x, y )) = (s ◦ h)(x, y ) describes this composition. The ﬁrst arrow gives the altitude or depth, the second assigns the colour.
Chapter 2 : Functions page 3 of 8 h s f g First Year Calculus c W W L Chen, 1982, 2005 Example 2.2.3. Suppose that the functions f : R → R and g : R → R are deﬁned by f (x) = x2 and g (x) = x − 1 for every x ∈ R. Then (1) (g ◦ f )(x) = g (f (x)) = g (x2 ) = x2 − 1. Here there is a slight unease with the notation. It will be a little clearer if we think of the question as follows. Clearly we can say that the function g : R → R is deﬁned by g (y ) = y − 1 for every y ∈ R. After all, x and y are “dummy” variables which we simply use to represent arbitrary elements of R. Then as before, we have (2) Now write y = f (x) = x2 , so that (3) Clearly (1) follows from (2) and (3). Example 2.2.4. Next, let us consider the composition f ◦ g , where f and g are as in Example 2.2.3. We have (f ◦ g )(x) = f (g (x)) = f (x − 1) = (x − 1)2 . Note that (x − 1)2 = x2 − 1 if and only if x = 1. This simple example shows that (g ◦ f )(x) = (f ◦ g )(x) does not hold in general. Example 2.2.5. Suppose that the functions f : R → R, g : R → R and h : R → R are deﬁned by f (x) = x2 , g (x) = x − 1 and h(x) = x3 + 3x for every x ∈ R. Let us consider the composition h ◦ (g ◦ f ). Here it is convenient to think of the functions g : R → R and h : R → R as deﬁned by g (y ) = y − 1 for every y ∈ R and h(z ) = z 3 + 3z for every z ∈ R. To study h ◦ (g ◦ f ), we ﬁrst study g ◦ f . Then (g ◦ f )(x) = x2 − 1 as before, so that (4) (h ◦ (g ◦ f ))(x) = h((g ◦ f )(x)) = h(x2 − 1). g (x2 ) = g (y ) = y − 1 = x2 − 1. (g ◦ f )(x) = g (f (x)) = g (x2 ). Now write z = (g ◦ f )(x) = x2 − 1, so that (5) h(x2 − 1) = h(z ) = z 3 + 3z = (x2 − 1)3 + 3(x2 − 1). On combining (4) and (5), we obtain (6) (h ◦ (g ◦ f ))(x) = (x2 − 1)3 + 3(x2 − 1). Next, let us consider the composition (h ◦ g ) ◦ f . To do so, we ﬁrst study h ◦ g . Clearly (7) (h ◦ g )(y ) = h(g (y )) = h(y − 1). Now write z = g (y ) = y − 1, so that (8) h(y − 1) = h(z ) = z 3 + 3z = (y − 1)3 + 3(y − 1). On combining (7) and (8), we obtain (9) However, (10)
Chapter 2 : Functions (h ◦ g )(y ) = (y − 1)3 + 3(y − 1). ((h ◦ g ) ◦ f )(x) = (h ◦ g )(f (x)) = (h ◦ g )(x2 ).
page 4 of 8 First Year Calculus c W W L Chen, 1982, 2005 Now write y = f (x) = x2 . In view of (9), we have (11) (h ◦ g )(x2 ) = (h ◦ g )(y ) = (y − 1)3 + 3(y − 1) = (x2 − 1)3 + 3(x2 − 1). Combining (10) and (11), we have (12) ((h ◦ g ) ◦ f )(x) = (x2 − 1)3 + 3(x2 − 1). Note that the right hand sides of (6) and (12) are identical. In fact, the above is an example of the following rule. ASSOCIATIVE LAW. Suppose that A, B , C and D are sets, and that f : A → B , g : B → C and h : C → D are functions. Then h ◦ (g ◦ f ) = (h ◦ g ) ◦ f . It follows that no matter whether we are considering h ◦ (g ◦ f ) or (h ◦ g ) ◦ f , the answer is the same. On the other hand, we clearly have (h ◦ (g ◦ f ))(x) = h((g ◦ f )(x)) = h(g (f (x))). The picture x −→ f (x) −→ g (f (x)) −→ h(g (f (x))) = (h ◦ (g ◦ f ))(x) describes this composition.
f g h 2.3. Real Valued Functions We are primarily interested in real valued functions. In other words, we take the codomain to be the set R of all real numbers. Suppose now that some deﬁning formula is given. We may then ask how large we can make the domain. We illustrate this point by a number of examples. Example 2.3.1. We wish to ﬁnd the largest set D of real numbers such that f : D → R, deﬁned by √ √ f (x) = x for every x ∈ D, is a function. Then for x to be real valued, we must make sure that x ≥ 0. However, as long as x ≥ 0, and as long as we specify which square root we take, then the function is clearly deﬁned. In this case, we can therefore take D to be the set of all nonnegative real numbers. Example 2.3.2. We wish to ﬁnd the largest set D of real numbers such that f : D → R, deﬁned by √ √ f (x) = x2 + x for every x ∈ D, is a function. Then for x2 + x to be real valued, we must make sure that x2 + x = x(x + 1) ≥ 0; in other words, we must have x ≥ 0 or x ≤ −1. However, as long as x ≥ 0 or x ≤ −1, and as long as we specify which square root we take, then the function is clearly deﬁned. In this case, we can therefore take D = {x ∈ R : x ≥ 0 or x ≤ −1}. Example 2.3.3. We wish to ﬁnd the largest set D of real numbers such that f : D → R, deﬁned by f (x) = (x2 − 4)−1 for every x ∈ D, is a function. Then for (x2 − 4)−1 to be real valued, we must make sure that x2 − 4 = 0. However, as long as x2 − 4 = 0, then the function is clearly deﬁned. In this case, we can therefore take D = {x ∈ R : x = ±2}. Example 2.3.4. We wish to ﬁnd the largest set D of real numbers such that f : D → R, deﬁned by f (x) = (x2 − 4)−1/2 for every x ∈ D, is a function. Then for (x2 − 4)−1 to be real valued, we must make sure that x2 − 4 = 0 (to ensure that we do not divide by 0) and x2 − 4 ≥ 0 (to ensure that the square root is real). In other words, we must make sure that x2 − 4 > 0. However, as long as x2 − 4 > 0, and as long as we specify which square root we take, then the function is clearly deﬁned. In this case, we can therefore take D = {x ∈ R : x > 2}.
Chapter 2 : Functions page 5 of 8 First Year Calculus c W W L Chen, 1982, 2005 We can in fact vary the question somewhat. Example 2.3.5. Consider the set N = {1, 2, 3, . . .} of all natural numbers. We wish to ﬁnd the largest set D of real numbers such that f : D → N, deﬁned by f (x) = x − 1 for every x ∈ D, is a function. Then for x − 1 to be a natural number, we must make sure that x is a natural number at least 2. However, as long as x ≥ 2, then the function is clearly deﬁned. In this case, we can therefore take D = {2, 3, 4, . . .}. In Chapters 3–5, we shall adopt the following convention. All functions will have codomain R; in other words, all functions are of the from f : D → R. Furthermore, the domain D is a set of real numbers, and is chosen to be the largest such set so that f : D → R is a function. 2.4. OnetoOne and Onto Functions Recall a very important point in our deﬁnition of a function. The choice of domain and codomain is entirely at our disposal. In this section, we shall show how we can make our choices to suit our precise needs. However, we need two deﬁnitions. Definition. A function f : A → B is said to be onetoone if x1 = x2 whenever f (x1 ) = f (x2 ). Definition. A function f : A → B is said to be onto if for every y ∈ B , we can ﬁnd x ∈ A such that f (x) = y . The deﬁnitions can be more easily understood if we note the following. A function f : A → B is onetoone if no two diﬀerent elements in the domain can share the same image. A function f : A → B is onto if every element in the codomain is the image of some element in the domain; in other words, if the range is the same as the codomain. Example 2.4.1. The function f : R → R, deﬁned by f (x) = 2x for every x ∈ R, is onetoone and onto. Example 2.4.2. The function f : N → N, deﬁned by f (x) = 2x for every x ∈ N, is onetoone but not onto. Example 2.4.3. The function f : R → R, deﬁned by f (x) = x2 for every x ∈ R, is neither onetoone nor onto. Example 2.4.4. Denote by S the set of all nonnegative real numbers. Then the function f : R → S , deﬁned by f (x) = x2 for every x ∈ R, is onto but not onetoone. Suppose now that the function f : A → B is onetoone and onto. Let y ∈ B . Since f is onto, we can ﬁnd some x ∈ A such that f (x) = y . Since f is onetoone, there cannot be more than one such x ∈ A, for otherwise they would share the same image y . It follows that there is exactly one x ∈ A such that f (x) = y . This means that we can deﬁne a function g : B → A, with domain B and codomain A and such that g (y ) = x precisely when f (x) = y . Such a function g : B → A is called the inverse function of the function f : A → B . It is not diﬃcult to see that g : B → A is also onetoone and onto. We have proved the following result. PROPOSITION 2A. Suppose that A and B are sets. If the function f : A → B is onetoone and onto, then there exists a function g : B → A such that g (y ) = x whenever f (x) = y . Furthermore, the function g : B → A is onetoone and onto. Example 2.4.5. Recall that the function f : R → R, deﬁned by f (x) = 2x for every x ∈ R, is onetoone and onto. Clearly the inverse function g : R → R is deﬁned by g (y ) = y/2 for every y ∈ R.
Chapter 2 : Functions page 6 of 8 First Year Calculus c W W L Chen, 1982, 2005 Example 2.4.6. Consider the function f : R− → R+ , where f (x) = x2 for every x ∈ R− . Here R− denotes the set of all negative real numbers, and R+ denotes the set of all positive real numbers. It is not diﬃcult to see that the function is onetoone and onto. Also, the inverse function is given by √ g : R+ → R− , where g (y ) = − y for every y ∈ R+ . Example 2.4.7. Consider the function f : N → N, given by f (x) = x + 1 if x is odd, x − 1 if x is even. Note that f (1) = 2, f (3) = 4, f (5) = 6, . . . and f (2) = 1, f (4) = 3, f (6) = 5, . . . . Hence f is onetoone and onto. Try also to convince yourself that f is its own inverse. Problems for Chapter 2 1. Consider the functions f : Z → R, g : R → Z and h : Z → Z, deﬁned by f (x) = 2x+2 and h(x) = x 2x+1 for every x ∈ Z, and by g (x) = [x] for every x ∈ R. Here [x] denotes the greatest integer not exceeding x, so that, for example, [5] = 5, [4 1 ] = 4 and [−4 1 ] = −5. 2 2 a) What is the domain and codomain of f ? b) What is the domain and codomain of g ? c) What is the domain and codomain of h? d) What is the range of f ? e) What is the range of g ? f) What is the range of h? g) Describe the function g ◦ f : Z → Z. h) Describe the function f ◦ g : R → R. i) Describe the function h ◦ (g ◦ f ) : Z → Z. j) Show that h ◦ h = h. 2. Consider the functions f : R → R, g : R → R and h : R → R, deﬁned by f (x) = sin x, g (x) = x − π and h(x) = x2 + 1 for every x ∈ R. a) What is g ◦ f ? b) What is f ◦ g ? c) Show that (g ◦ f )(0) = (f ◦ g )(0). d) What is h ◦ (g ◦ f )? √ 3. Given f (x) = sin x, g (x) = x2 + 1 and h(x) = 3x + x, ﬁnd each of the following composite functions: a) f ◦ g b) f ◦ h c) g ◦ f d) g ◦ h e) h ◦ f f) h ◦ g g) f ◦ f h) g ◦ g i) h ◦ h j) f ◦ g ◦ h k) g ◦ h ◦ f l) h ◦ f ◦ g 4. Given f (x) = cos x and g (x) = x2 − x + 1, ﬁnd each of the following composite functions: a) f ◦ g b) f ◦ f c) g ◦ g d) g ◦ f 5. For each of the following, determine the largest set D of real numbers for which f : D → R is a function: a) f (x) = (x3 + 1)−1 b) f (x) = tan x c) f (x) = sin x + tan x √ 1 e) f (x) = 5 − x + √ x+1
Chapter 2 : Functions d) f (x) = 1− 1 x f) f (x) = loge (1 − x2 )
page 7 of 8 First Year Calculus c W W L Chen, 1982, 2005 6. Find the largest possible domain and corresponding range for each of the following functions as a real valued function: √ x+1 a) f (x) = x2 − 4x + 3 b) f (x) = 4 − x2 c) f (x) = x−2 √ 1 d) f (x) = x + 2 − 1 e) f (x) = x + 1 f) g (x) = x x 3 h) g (x) = x + 1 g) f (x) = e 7. Sketch the following curves: a) f (x) = x + 4 d) f (x) = cos 2x 1 g) f (x) = 2 x +1 b) f (x) = x2 − 7x + 6 e) f (x) = loge x √ h) f (x) = x2 + 1 c) f (x) = x3 − x x−1 f) f (x) = x+2 Chapter 2 : Functions page 8 of 8 ...
View
Full
Document
This note was uploaded on 02/01/2009 for the course MATH 123414 taught by Professor Staff during the Spring '09 term at UCSD.
 Spring '09
 staff
 Math, Calculus

Click to edit the document details