1 00:00:00,012 --> 00:00:06,641 [MUSIC] If we care about extreme values, it would really help to know how to find 2 00:00:06,641 --> 00:00:09,924 them. We can use a theorem, a theorem of 3 00:00:09,924 --> 00:00:12,800 Fermat. Here's Fermat's theorem. 4 00:00:12,800 --> 00:00:18,792 Suppose f is a function and it's defined on the interval between a and b. 5 00:00:18,792 --> 00:00:24,330 c, is some point in this interval, this backwards e, means that c is in this 6 00:00:24,330 --> 00:00:27,153 interval. Okay, so that's the set up. 7 00:00:27,153 --> 00:00:31,520 Here's Fermat's Theorem. If f(c) is an extreme value of the 8 00:00:31,520 --> 00:00:36,684 function f, and the function is differentiable at the point c, then the 9 00:00:36,684 --> 00:00:42,557 derivitive vanishes at the point c. It's actually easier to show something 10 00:00:42,557 --> 00:00:46,864 slightly different. So, instead of dealing with this, I'm 11 00:00:46,864 --> 00:00:52,917 going to deal with a different statement. Same setup as before, but now I'm going 12 00:00:52,917 --> 00:00:57,299 to try to show that if f is differentiable at point c and the 13 00:00:57,299 --> 00:01:01,692 derivative is nonzero, then f(c) is not an extreme value. 14 00:01:01,692 --> 00:01:06,536 It's worth thinking a little bit about the relationship between the original 15 00:01:06,536 --> 00:01:11,764 statement where I'm starting off with the claim that f(c) is an extreme value and 16 00:01:11,764 --> 00:01:14,779 then concluding that the derivative vanishes. 17 00:01:14,779 --> 00:01:19,577 And here, I'm beginning, by assuming the derivative doesn't vanish and then 18 00:01:19,577 --> 00:01:22,562 concluding that f(c) is not an extreme value. 19 00:01:22,562 --> 00:01:25,500 This is the thing that I want to try to prove now. 20 00:01:25,500 --> 00:01:30,079 Why is that theorem true? I'm going to get some intuitive idea as to why this is 21 00:01:30,079 --> 00:01:32,741 true. Why is it that if you differentiable a 22 00:01:32,741 --> 00:01:37,253 point c with nonzero derivative there, then f(c) isn't an extreme value? Well, 23 00:01:37,253 --> 00:01:40,682 to get a sense of this, let's take a look at this graph. 24 00:01:40,682 --> 00:01:43,572 Here, I've drawn a graph of some random function. 25 00:01:43,572 --> 00:01:46,694 I've picked some point and f'(c) is not zero. 26 00:01:46,694 --> 00:01:49,930 Differentiable there, but the derivative's nonzero. 27 00:01:49,930 --> 00:01:53,316 It's negative. Now, what does that mean? That means if I 28 00:01:53,316 --> 00:01:57,098 wiggle the input a little bit, I actually do affect the output. 29 00:01:57,098 --> 00:02:00,195 If I increase the input a bit, the output goes down. 30 00:02:00,195 --> 00:02:03,160 If I decrease the input a bit, the output goes up. 31 00:02:03,160 --> 00:02:05,959 Consequently, that can't be an extreme value. 32 00:02:05,959 --> 00:02:10,914 That's not the biggest or the smallest value when I plug in inputs near c, and 33 00:02:10,914 --> 00:02:13,766 that's exactly what this statement is saying. 34 00:02:13,766 --> 00:02:18,568 If the derivative is not zero, that means I do have some control over the output if 35 00:02:18,568 --> 00:02:22,955 I change the input a little bit. That means this output isn't an extreme 36 00:02:22,955 --> 00:02:27,793 value because I can make the output bigger or smaller with small pervations 37 00:02:27,793 --> 00:02:31,956 to the input. I'd like to have a more formal, a more 38 00:02:31,956 --> 00:02:36,416 rigorous argument for this. So, let's suppose that f is 39 00:02:36,416 --> 00:02:42,539 differentiable at c, and the derivative is equal to L, L some nonzero number. 40 00:02:42,539 --> 00:02:48,562 Now, what that really means from the definition of derivative is that the 41 00:02:48,562 --> 00:02:53,717 limit of f(c+h)-f(c)/h as h approaches zero is equal to L. 42 00:02:53,717 --> 00:03:01,299 Now, what does this limit say? Well, the limit's saying that if h is 43 00:03:01,299 --> 00:03:10,561 near enough zero, I can make this difference quotient as close as I like to 44 00:03:10,561 --> 00:03:15,522 L. In particular, I can guarantee that 45 00:03:15,522 --> 00:03:26,317 f(c+h)-f(c)/h is between 1/2L and 3/2L. Notice what just happened. So, I started 46 00:03:26,317 --> 00:03:30,949 with infinitesimal information. I'm just starting with a limit as h 47 00:03:30,949 --> 00:03:34,493 approaches zero. And I've promoted this infinitesimal 48 00:03:34,493 --> 00:03:39,657 information to local information. Now I know that this difference quotient 49 00:03:39,657 --> 00:03:43,933 is between these two numbers as long as h is close enough to zero. 50 00:03:43,933 --> 00:03:48,567 Now, we can continue the proof. So, I know that if h is close enough to 51 00:03:48,567 --> 00:03:53,467 zero, this difference quotion is between 1/2L and 3/2L, 52 00:03:53,467 --> 00:03:58,292 I'm going to multiply all this by h. What do I find out then? Then, I find out 53 00:03:58,292 --> 00:04:09,057 that if h is near enough zero, multiplying all this by h, I find that 54 00:04:09,057 --> 00:04:18,411 f(c+h)-f(c)/h*h is between 1/2hL and 3/2hL. 55 00:04:18,411 --> 00:04:23,586 I get from here to here just by multiplying by h. 56 00:04:23,586 --> 00:04:29,161 Now, what can I do? Well, I can add f(c) to all of this. 57 00:04:29,161 --> 00:04:37,202 And I'll find out that if h is near enough zero, then f(c+h) is between 58 00:04:37,202 --> 00:04:42,267 1/2hL+f(c) and 3/2hL+f(c). Okay. 59 00:04:42,267 --> 00:04:50,448 So, this is what we've shown. We've shown that if h is small enough, f(c+h) is 60 00:04:50,448 --> 00:04:56,327 between these two numbers. Now, why would you care? Well, think 61 00:04:56,327 --> 00:05:00,135 about some possibilities. What if L is positive? 62 00:05:00,135 --> 00:05:06,192 If L is positive and h is some small but positive number, this is telling me that 63 00:05:06,192 --> 00:05:12,600 f(c+h), being between these two numbers, f(c+h) is in particular bigger than f(c). 64 00:05:12,600 --> 00:05:16,452 That means that f(c) can't be a local maximum. 65 00:05:16,452 --> 00:05:20,278 Same kind of game. What if L is positive but I picked h to 66 00:05:20,278 --> 00:05:25,152 be negative but real close to zero. Then, f(c+h) being between these two 67 00:05:25,152 --> 00:05:28,791 numbers, f(c+h) must actually be less than f(c). 68 00:05:28,791 --> 00:05:32,093 That means that f(c) can't be a local minimum. 69 00:05:32,093 --> 00:05:35,029 You play the same game when L is negative. 70 00:05:35,029 --> 00:05:39,763 Let's summarize what we've shown. So, what we've shown is this. 71 00:05:39,763 --> 00:05:45,443 We've shown that if a differentiable function has nonzero derivative at the 72 00:05:45,443 --> 00:05:48,588 point c, then f(c) is not an extreme value. 73 00:05:48,588 --> 00:05:54,040 And we can play this in reverse. That means that if f(c) is a local extrema, 74 00:05:54,040 --> 00:05:59,933 right? If f(c) is an extreme value, then either the derivative doesn't exist to 75 00:05:59,933 --> 00:06:05,403 prevent this first case from happening, where f is differentiable at c, or the 76 00:06:05,403 --> 00:06:10,795 derivatives equal to zero, which prevents this second thing, f'(c) being nonzero. 77 00:06:10,795 --> 00:06:14,424 So, this is another way to summarize what we've done. 78 00:06:14,424 --> 00:06:19,692 If f(c) is a local extremum, then one of these two possibilities occurs. 79 00:06:19,692 --> 00:06:25,866 Both of these possibilities do occur. Here's the graph of the absolute value 80 00:06:25,866 --> 00:06:29,847 function. There's a local and a global minimum at 81 00:06:29,847 --> 00:06:33,530 the point zero. The derivative of this function isn't 82 00:06:33,530 --> 00:06:37,395 defined at that point. Here's another example. 83 00:06:37,395 --> 00:06:42,206 Here's the graph of y=x^2. This function also has a local and a 84 00:06:42,206 --> 00:06:46,318 global minimum at the point zero. Here, the derivative is defined but the 85 00:06:46,318 --> 00:06:48,655 derivative is equal to zero at this point. 86 00:06:48,655 --> 00:06:53,320 We'll often want to talk about these two cases together, the situation where the 87 00:06:53,320 --> 00:06:57,819 derivative doesn't exist and the situation where the derivative vanishes. 88 00:06:57,819 --> 00:07:03,282 Let's give it a name to this phenomenon. Here we go. If either the derivative at c 89 00:07:03,282 --> 00:07:09,337 doesn't exist, meaning the function's not differentiable at c, or the derivative is 90 00:07:09,337 --> 00:07:14,722 equal to zero, then I'm going to call the point c a critical point for the function 91 00:07:14,722 --> 00:07:17,587 f. This is a great definition because it 92 00:07:17,587 --> 00:07:22,092 fits so well into Fermats theorem. Here's another way to say Fermot's 93 00:07:22,092 --> 00:07:24,812 Theorem. Suppose f is a function as defined in 94 00:07:24,812 --> 00:07:29,227 this interval and c is contained in there, then if f(c) is an extreme value 95 00:07:29,227 --> 00:07:30,907 of f, well, we know that one of two 96 00:07:30,907 --> 00:07:34,912 possibilities must occur. At that point, either the function's not 97 00:07:34,912 --> 00:07:37,387 differentiable, or the derivative's equal to zero. 98 00:07:37,387 --> 00:07:41,812 And that's exactly what we mean when I say that c is a critical point of f. 99 00:07:41,812 --> 00:07:46,106 So, giving a name to this phenomena gives us a really nice way of stating Fermat's 100 00:07:46,106 --> 00:07:48,623 Theorem. The upshot is that if you want to find 101 00:07:48,623 --> 00:07:52,193 extreme values for a function, you don't have to look everywhere. 102 00:07:52,193 --> 00:07:56,058 You only have to look at the critical points where the derivative either 103 00:07:56,058 --> 00:08:00,454 doesn't exist or the derivative vanishes. and you should probably also worry about 104 00:08:00,454 --> 00:08:03,412 the end points. In other words, if you're trying to find 105 00:08:03,412 --> 00:08:05,697 rain, you should just be looking for clouds. 106 00:08:05,697 --> 00:08:08,797 You just have to check the cloudy days to see if it's raining. 107 00:08:08,797 --> 00:08:12,877 In this same way, if you're looking for extreme values, you only need to look for 108 00:08:12,877 --> 00:08:16,742 the critical points because an extreme value gives you a critical point. 109 00:08:16,742 --> 00:08:20,860 So, this is a super concrete example. Here's a function, y=x^3-x. 110 00:08:20,860 --> 00:08:24,577 I've graphed this function. I'm going to try to find these local 111 00:08:24,577 --> 00:08:29,282 extrema, this local maximum and this local minimum, using the machinery that 112 00:08:29,282 --> 00:08:32,421 we've set up. So, if I'm looking for local extrema, I 113 00:08:32,421 --> 00:08:36,444 should be looking for critical points. So, here's the function, f(x)=x^3-x. 114 00:08:38,119 --> 00:08:41,066 I'm looking for for critical points in this function. 115 00:08:41,066 --> 00:08:46,148 Those are points whose derivative doesn't exist, function is not differentiable, or 116 00:08:46,148 --> 00:08:49,874 the derivative vanishes. But this function is differentiable 117 00:08:49,874 --> 00:08:52,219 everywhere. Its derivative is 3x^2-1. 118 00:08:52,219 --> 00:08:57,032 So, the only critical points are going to be where the derivative is equal to zero, 119 00:08:57,032 --> 00:09:00,037 right? I'm looking for solutions to 3x^2-1=0. 120 00:09:00,037 --> 00:09:03,792 I'll write one to both sides, 3x^2=1, so I am trying to solve. 121 00:09:03,792 --> 00:09:07,261 I'll divide both sides by 3, x^2=1/3. 122 00:09:07,261 --> 00:09:14,102 So, I am trying to solve. Take the square root of both sides. 123 00:09:14,102 --> 00:09:21,115 x is plus or minus the square root of a third, which is about 0.577. 124 00:09:21,115 --> 00:09:25,017 And that let's me find these critical points, 125 00:09:25,017 --> 00:09:29,547 right? These are places where the derivative is 126 00:09:29,547 --> 00:09:34,257 equal to zero. The tangent line is horizontal and now I 127 00:09:34,257 --> 00:09:38,287 know the x coordinate of these two red points. 128 00:09:38,287 --> 00:09:46,142 Here, are the x coordinates about 0.577, and here the x coordinate is -0.577, 129 00:09:46,142 --> 00:09:46,680 about.