5.1 Calculating the Slope of a Curve and Instantaneous Rate of Change 171 4 256 t (seconds) s (feet) position versus time Figure 5.2 Position vs. time The rock hits the ground in 4 seconds. What is its average velocity in the first second? In each consecutive second? Recall that the average velocity is given by position time = s t . average velocity in the 1st second = s t = s(1)−s(0) 1−0 = 240−256 1 =−16 ft/sec average velocity in the 2nd second = s t = s(2)−s(1) 2−1 = 192−240 1 =−48 ft/sec average velocity in the 3rd second = s t = s(3)−s(2) 3−2 = 112−192 1 =−80 ft/sec average velocity in the 4th second = s t = s(4)−s(3) 4−3 = 0−112 1 =−112 ft/sec Why are these velocities negative? Velocity carries information about both speed and direction; the sign indicates direction, while the magnitude (size, or absolute value) gives the speed. A positive velocity indicates that the height of the rock was increasing and a negative velocity indicates that the rock is falling. We see that the speed itself is increasing as the rock is falling; on the other hand, the velocity is decreasing because it is becoming more and more negative. Suppose we are interested in the rock’s velocity at t = 2. Simply knowing that at t = 2 the rock’s height is 192 feet doesn’t help us determine the instantaneous velocity; a snapshot of a rock in midair gives us virtually no clue as to its speed and direction. However, from the computations above we see that the velocity should lie between the average velocity on the interval [1, 2] and that on the interval [2, 3]. The velocity at t = 2 is between −48 ft/sec and −80 ft/sec. Graphically, the average velocity on the interval [1, 2] can be represented by the slope of the secant line through the points (1, s(1)) and (2, s(2)). Similarly, the average velocity on the interval [2, 3] can be represented by the slope of the secant line through the points (2, s(2)) and (3, s(3)). 172 CHAPTER 5 The Derivative Function 1 2 3 4 256 t (seconds) s ( feet) slope = – 48 ft/sec = average velocity on [1,2] slope = – 80 ft/sec = average velocity on [2,3] Figure 5.3 We’d like to find better approximations to the instantaneous velocity at t = 2byfinding better upper and lower bounds, but without more information we can make little progress. It would be helpful to have more information about the position ofthe rock in the neighborhood of time t = 2. The average velocity of the rock over the interval [2, 2.1], for instance, will give us a better estimate of the rock’s velocity at t = 2 than did the average velocity over the interval [2, 3]. The average speed of the rock will still be a little greater than its speed at t = 2 because speed increases with time (its average velocity will be more negative than the instantaneous velocity), but we will have a better approximation. Looking at the interval [2, 2.01] will give us an even better estimate, although again the average speed will be greater on the interval than at t = 2 because the rock is traveling faster as time goes on. From a graphical perspective we are asserting that we can get better and better approximations to the instantaneous velocity at t = 2 by looking at the slopes of secant lines passing through (2, 192) and a second point on the graph of s that gets closer and closer to the point (2, 192), as shown in Figure 5.4 below. 2 2.1 192 185.4 (2, 192) (2.1, 185.44) t (seconds) s ( feet) = = Figure 5.4 Suppose we ask for more data about the position of the rock around t = 2 and we are supplied with the following: 5.1 Calculating the Slope of a Curve and Instantaneous Rate of Change 173 t (in seconds) s (position in feet) 1.9 198.24 1.99 192.6384 2 192 2.01 191.3584 2.1 185.44 (2, 192) t (seconds) position versus time s ( feet) 2 192 Figure 5.5 The average velocity on [2, 2.1] is s t = s(2.1) − s(2) 2.1 − 2 = 185.44 − 192 2.1 − 2 =−65.6 ft/sec, so the instantaneous velocity at t = 2 is less negative than −65.6. We can improve on this. The average velocity on [2, 2.01] is s t = s(2.01) − s(2) 2.01 − 2 = 191.3584 − 192 2.01 − 2 =−64.16 ft/sec, so the instantaneous velocity at t = 2 is less negative than −64.16. We’ve put a higher floor on the instantaneous velocity at t = 2. First we said that the instantaneous velocity was greater than −80 ft/sec, then we said that it was greater than −65.6 ft/sec, and now we have determined that it is greater than −64.16 ft/sec. As a lid on the value of the instantaneous velocity we can use −48 ft/sec, the average velocity on [1, 2]. We can lower the lid and get a better upper bound by computing the average velocity on [1.9, 2] or get an even better answer using [1.99, 2]. The average velocity on [1.99, 2] is s t = s(2) − s(1.99) 2 − 1.99 = 192 − 192.6384 2 − 1.99 =−63.84 ft/sec. We now know that the instantaneous velocity at t = 2 is between −63.84 ft/sec and −64.16 ft/sec. That’s a much higher degree of accuracy than we had without the additional data. To close in further on the instantaneous velocity of the rock at t = 2 we need more data. If only there were an algebraic formula to give us position as a function of time Indeed, there is such a formula: s(t) =−16t 2 + 256. 174 CHAPTER 5 The Derivative Function This formula can be derived using a combination of physics and mathematics; you will be able to derive it on your own by the end of the course. 1 Armed with a formula for position as a function of time, we can find the average velocity over the intervals, say, [2, 2.0001] and [1.9999, 2] to get lower and upper bounds. We could get better and better approximations by taking smaller and smaller time intervals. Let’s save ourselves a bit of work. We’ll find the average velocity on the interval between 2 and 2 + h, where h = 0. For the interval [2, 2.0001] we have h = 0.0001; for [1.9999, 2] we have h =−0.0001. The smaller the magnitude (absolute value) 2 of h, the better the average velocity will approximate the instantaneous velocity at t = 2. Average velocity on the interval between 2 and 2 + h = s t = s(2 + h) − s(2) 2 + h − 2 Since s(t) =−16t 2 + 256, we can find s(2 + h). = −16(2 + h) 2 + 256 − [−16(2) 2 + 256] h Simplify. = −16(4 + 4h + h 2 ) + 256 + 16 · 4 − 256 h = −16 · 4 − 64h − 16h 2 + 16 · 4 h = −64h − 16h 2 h = h(−64 − 16h) h As long as h = 0, we know h/h = 1. =−64 − 16h In particular, the average velocity on [2, 2.0001] is −64.0016 ft/sec and the average velocity on [1.9999, 2] is −63.9984 ft/sec. Now we can see what will happen as h approaches 0. If h is positive we are looking at the average velocity on [2, 2 + h]. This number, −64 − 16h, will be more negative than −64 and will provide a lower bound for the velocity at t = 2. The smaller the magnitude of h, the closer −64 − 16h gets to −64. If h is negative we are looking at the average velocity on [2 + h, 2]. This number, −64 − 16h, will be less negative than −64 and will provide an upper bound for the velocity at t = 2. Again, the smaller the magnitude of h, the closer −64 − 16h gets to −64. We have constructed a vise, an upper bound (ceiling) and a lower bound (floor) between which the velocity at t = 2 is trapped. As h gets increasingly close to zero both the upper bound and the lower bound approach −64. The instantaneous velocity of the rock is −64 ft/sec. 1 This equation can be derived from the facts that: i. The downward acceleration due to gravity is −32 ft/sec 2 . ii. The rock was dropped from a height of 256 ft and given no initial velocity. 2 |h| is a handy notation for “the size of h” or “the magnitude of h.” 5.1 Calculating the Slope of a Curve and Instantaneous Rate of Change 175 (2+h, s(2+h)) where h>0 (2, 192) (2+h, s(2+h)) where h<0 2 192 t (seconds) s ( feet) Figure 5.6 Graphically, we have a set of secant lines all going through (2, 192); we choose a second point on the graph of s to be (2 + h, s(2 + h)). This point lies to the right of (2, 192) if h is positive and to the left if h is negative. As we take values of h closer and closer to zero, this second point slides along the graph of s closer and closer to (2, 192). The slope of the secant line corresponds to the average velocity of the rock on the interval between 2 and 2 + h. We make the following observations about h. h must be nonzero. If we try to calculate the average velocity on [2, 2] we will get s t = 0 0 ; we can’t make sense of this. Furthermore, in our calculations above we said h/h = 1; this is true only if h = 0. There is no smallest possible magnitude for h. If you think you might have the smallest h, just divide it by two and you’ll get something half the size. We’ ll introduce some notation that allows us to summarize what we’ve done less verbosely. 3 The average rate of change of the position of the rock on the interval between 2 and 2 + h, where h = 0, is given by s(2+h)−s(2) (2+h)−2 or s(2+h)−s(2) h .Ashapproaches zero, s(2+h)−s(2) h approaches the instantaneous rate of change of position with respect to time at t = 2. We can write this in shorthand as follows: As h → 0, s(2+h)−s(2) h → (the instantaneous velocity at t = 2). Or, equivalently, lim h→0 s(2 + h) − s(2) h = (the instantaneous velocity at t = 2). Note: Built into this lim h→0 notation is the notion that h = 0. Unraveling the notation (an intuitive approach): lim x→5 f(x)=7isread “the limit as x approaches 5 of f(x)is 7.” As x approaches 5, f(x)approaches 7, is equivalent to saying or writing as x → 5, f(x)→7. 3 Modern mathematicians relish being concise and precise. We’ll start working on the former now and postpone the latter for Chapter 7. 176 CHAPTER 5 The Derivative Function In words this means that f(x)can be made arbitrarily close to 7 provided x is close enough to 5 but not equal to 5. 4 Summary and Generalization If y = f(x),then The average rate of change of f on [a, b] = f(b)−f(a) b−a . Graphically, this corresponds to the slope of the secant line through (a, f(a))and (b, f(b)). The instantaneous rate of change of f at x = a can be approximated by the average rate of change of f on [a, a + h] for h very close to zero. As h gets closer and closer to zero, the average rate of change over the tiny interval approaches the instantaneous rate of change at x = a. The instantaneous rate of change of f at x = a ≈ f(a +h) − f(a) (a + h) − a for h small. The instantaneous rate of change of f at x = a = lim h→0 f(a +h) − f(a) h , if this limit exists. Graphically the instantaneous rate of change of f at x = a corresponds to the slope of the line tangent to the graph of f at x = a. The tangent line to f at x = a is defined to be the limit of the secant lines through (a, f(a))and (a + h, f(a+h)) as h approaches zero, provided this limit exists. A typical misconception is that a tangent line can touch the graph only at one point. The picture below should dissuade you of this notion. P y = f(x) tangent line at point P Figure 5.7 Taking Inventory The strategy of successive approximation combined with a limiting process has given us a method of tackling (and defining) two important and closely linked problems: 5 1. How can we find the instantaneous rate of change of a function? 2. How can we define the slope of a curve at a point? Or, equivalently, how can we find the slope of the line tangent to a curve at a point? 4 We will take up limits later and make this more precise. Loosely speaking, “arbitrarily close” is “as close as anyone could conceivably insist upon.” And how close is “close enough”? Close enough to satisfy whatever conditions have been insisted upon. 5 The strategy of successive approximation in combination with a limiting process will continue to be a keystone in calculus. This is only the beginning. 5.1 Calculating the Slope of a Curve and Instantaneous Rate of Change 177 Both problems encompass the same computational challenge. We need two data points in order to compute a rate of change, and we need two points in order to compute the slope of a line. A snapshot tells us nothing about an average rate of change, and a single point gives no information about slope. Our strategy allowed us to see our way through this dilemma. We found that lim h→0 f(a +h) − f(a) h = slope of the tangent line tof at x = a = the instantaneous rate of change off at x = a. We introduce some shorthand notation for this expression. Definition Let c be in the domain of the function f .Wedefine f (c) to be f (c) = lim h→0 f(c+h) − f(c) h if the limit exists. We refer to this as the limit definition of the derivative of f (c). f (c) is called the derivative of f at x = c. We read f (c) aloud as “f prime of c.” f (c) can be interpreted as the rate of change of f at x = c or as the slope of the tangent line to the graph of f at x = c. Recall that informally speaking, “locally linear” means that if the graph were magnified enormously and you were a miniscule bug positioned on the curve, the curve would appear, from your bug’s-eye perspective, to be a straight line. If f is locally linear and nonvertical at x = c, then f (c) exists and gives the slope of the tangent line, the best linear approximation to the curve, at x = c. A function f is differentiable at c if f (c) is defined. We say f is differentiable on the open interval (a, b) if f is defined for all x in the interval. Since the derivative is defined as the limit of a quotient and the quotient is the quotient of differences, sometimes the derivative is referred to as the limit of a difference quotient. Cases in Which f (c) Is Undefined If f (c) is undefined, then the limit of the difference quotient does not exist. f (c) is undefined if the graph of f has a vertical tangent at the point (c, f(c)) or if the graph of f is not locally linear at x = c. f is not locally linear at x = c if f is not continuous at x = c or if there is a sharp corner at x = c. If the graph of f has a sharp corner (like the “V” of the absolute value function as opposed to the “U” of the squaring function), then the corner will look sharp regardless of how greatly it is magnified. Notice that f (c) is undefined if c is not in the domain of f ; we cannot write the difference quotient, f(c+h)−f(c) h . 178 CHAPTER 5 The Derivative Function g x g′is undefined at x =1 1 3 g(x) = (x –1) 12 34 x f ' f ' is undefined at x = 1, 2, 3, 4 Figure 5.8 At present we do not have this on very solid ground. We’ll need to discuss the notion of limits to get a more sturdy foundation. But historically, neither Isaac Newton nor Gottfreid Leibniz, both of whom developed the fundamentals of calculus in the decade from 1665 to 1675, had a rigorous notion of limit and, nevertheless, they made enormous mathematical strides. Following the spirit of the historical development, we will proceed with our informal notion for the time being. In Chapter 7 we will make our notion of limit more precise. Below we work a few examples. We’ll reiterate the entire line of reasoning in the first example and concentrate on the mechanics of the computation in the second one. ◆ EXAMPLE 5.1 Find the slope of the tangent line to the graph of f(x)=x 2 +3x at x = 2. SOLUTION Let’s run through the line of reasoning again. Choose a point on the graph of f near (2, 10). We choose (2 + h, f(2+h)), i.e., (2 + h, (2 + h) 2 + 3(2 + h)), where h is very small. The slope of the secant line through (2, 10) and (2 + h, (2 + h) 2 + 3(2 + h)) approximates the slope of the tangent line to f at x = 2. We will denote by m sec the slope of the secant line and by m tan the slope of the tangent line. 5.1 Calculating the Slope of a Curve and Instantaneous Rate of Change 179 m sec = f(2+h) − f(2) (2 + h) − 2 = (2 + h) 2 + 3(2 + h) − (2 2 + 2 · 3) h = 4 + 4h + h 2 + 6 + 3h − 10 h = 7h + h 2 h = h(7 + h) h f(2+h) f(2)=10 2 2+h h f(2+h)-f(2) x f Figure 5.9 Since h = 0, we can cancel to get m sec = 7 + h. As h tends toward zero, the point (2 + h, (2 + h) 2 + 3(2 + h)) slides along the graph of f toward (2, 10). As h tends toward zero, the slope of the secant line tends toward the slope of the tangent line. As h tends toward zero, the slope of the secant line tends toward 7: lim h→0 7 + h = 7. Notice that we’ve computed lim h→0 f(2+h)−f(2) h by first simplifying the difference quotient and then computing the limit. ◆ The next example is a wonderful way to practice your algebra skills. Work it out on your own and then compare your work with the solution given. ◆ EXAMPLE 5.2 Find the equation of the tangent line to the graph of y = 5 x 2 at x =−3. SOLUTION First let’s find the slope of the tangent line at x =−3. Let y = f(x).Wewantf (−3). 180 CHAPTER 5 The Derivative Function x y –3 Figure 5.10 f (−3) = lim h→0 f(−3+h) − f(−3) h We know f(x)= 5 x 2 ; use this. = lim h→0 5 (−3 + h) 2 − 5 (−3) 2 h = lim h→0 5 (−3 + h) 2 − 5 9 h Get a common denominator. = lim h→0 45 9(−3 + h) 2 − 5(−3 + h) 2 9(−3 + h) 2 h Simplify. = lim h→0 45 9(−3 + h) 2 − 5(9 − 6h + h 2 ) 9(−3 + h) 2 h We must multiply out the numerator in order to combine like terms. = lim h→0 45 − 45 + 30h − 5h 2 9(−3 + h) 2 · 1 h We pull out the 1/h to make this easier to read. = lim h→0 30h − 5h 2 9(−3 + h) 2 · 1 h Notice that we have not multiplied out the denominator. It is rarely in our interest to do so. 6 = lim h→0 h(30 − 5h) 9(−3 + h) 2 · 1 h Factor out an h. = lim h→0 (30 − 5h) 9(−3 + h) 2 Since h = 0, h h = 1. = 30 9(−3) 2 = 10 3(−3) 2 = 10 27 6 Many beginners waste a lot of time and energy multiplying out denominators that are factored. Yet, when getting a common denominator or simplifying an expression, one factors. Therefore the effort expended is not a badge of virtue; rather, it is counterproductive. . close to zero. As h gets closer and closer to zero, the average rate of change over the tiny interval approaches the instantaneous rate of change at x = a. The instantaneous rate of change of f. this corresponds to the slope of the secant line through (a, f(a) )and (b, f(b)). The instantaneous rate of change of f at x = a can be approximated by the average rate of change of f on [a, a +. us a method of tackling (and defining) two important and closely linked problems: 5 1. How can we find the instantaneous rate of change of a function? 2. How can we define the slope of a curve at