1 00:00:00,012 --> 00:00:05,512 [MUSIC] Suppose I've got some function given by a rule and I want to make a 2 00:00:05,512 --> 00:00:10,307 graph of that function. I wanted to plot say this function f(x) 3 00:00:10,307 --> 00:00:13,557 equals 2x cubed minus 3x squared minus 12. 4 00:00:13,557 --> 00:00:17,342 First thing I might do is just plug in some values. 5 00:00:17,342 --> 00:00:21,384 All right I'll pick. Pick some inputs and I'll see what the 6 00:00:21,384 --> 00:00:26,248 function outputs at those inputs. And once I've got this table of values, I 7 00:00:26,248 --> 00:00:31,331 could then plot those points on a graph. The issue is, how do I really know what 8 00:00:31,331 --> 00:00:36,123 happens between these points that I plotted on the graph? How do I know the 9 00:00:36,123 --> 00:00:41,275 graph isn't doing some crazy wiggling in between? How do I know that I've really 10 00:00:41,275 --> 00:00:46,792 picked enough input points to really get a good idea of what this graph is doing? 11 00:00:46,792 --> 00:00:51,545 We're going to use derivatives to make sure that we're really capturing the 12 00:00:51,545 --> 00:00:56,348 qualitative features of the function. I might have been trying to graph a 13 00:00:56,348 --> 00:01:01,253 function, like f(x) equals sin Pi x, and if I just plugged in some whole number 14 00:01:01,253 --> 00:01:04,037 inputs, the function would always output 0. 15 00:01:04,037 --> 00:01:08,708 That might trick me into making a graph like this, where I plot 0 as the output 16 00:01:08,708 --> 00:01:13,312 for all these whole number inputs. I might, then, be tempted to just fill in 17 00:01:13,312 --> 00:01:16,083 this graph by drawing a straight line across. 18 00:01:16,083 --> 00:01:21,039 But that's totally ridiculous, right? This graph, you know, actually looks like 19 00:01:21,039 --> 00:01:23,744 this. Not a horizontal straight line. 20 00:01:23,744 --> 00:01:28,933 There's all kinds of extra wiggling that's happening that I missed because I 21 00:01:28,933 --> 00:01:33,286 chose my in points badly. We're going to use derivatives to make 22 00:01:33,286 --> 00:01:38,602 sure that we're really capturing the qualitative features of the function and 23 00:01:38,602 --> 00:01:41,512 there's a ton of different ways to do this. 24 00:01:41,512 --> 00:01:45,402 So let's work this out in one specific concrete example. 25 00:01:45,402 --> 00:01:51,021 So let's keep working on the graph of this function, f(x) equals 2x cubed minus 26 00:01:51,021 --> 00:01:54,309 3x squared minus 12x. First thing I'm going to do is 27 00:01:54,309 --> 00:01:58,921 differentiate this, the derivative is 6x^2-6x-12, 28 00:01:58,921 --> 00:02:03,412 cause' the derivative of 2x^3 is 6x^2, the derivative of minus 3x^2 is minus 6x, 29 00:02:04,740 --> 00:02:07,223 and the derivative of minus 12x is minus 12. 30 00:02:07,223 --> 00:02:12,780 There's a common factor of 6 here which I can pull out, and then I'm left with this 31 00:02:12,780 --> 00:02:17,292 quadratic, and I can factor that quadratic into (x+1) times (x-2). 32 00:02:17,292 --> 00:02:22,455 Now once I've got this nice factorized version of the derivative, I can then 33 00:02:22,455 --> 00:02:26,429 figure out where the derivative is positive and negative. 34 00:02:26,429 --> 00:02:31,491 The derivative is positive when the input is more negative than minus and it's 35 00:02:31,491 --> 00:02:34,982 positive when the input is more positive than 2. 36 00:02:34,982 --> 00:02:38,457 In between -1 and 2, the derivative is negative. 37 00:02:38,457 --> 00:02:42,642 And at the point -1, and at the point 2, the derivative is equal to zero. 38 00:02:42,642 --> 00:02:47,317 Now, since this function is differentiable everywhere, the only 39 00:02:47,317 --> 00:02:50,582 critical points are where the derivative is equal to zero. 40 00:02:50,582 --> 00:02:53,682 These are the critical points, minus 1 and 2. 41 00:02:53,682 --> 00:02:56,389 Alright. So I found the critical points. 42 00:02:56,389 --> 00:03:00,729 I found the derivative. Now, I'll also find the second derivative 43 00:03:00,729 --> 00:03:04,264 of this function. Which I get by differentiating this 44 00:03:04,264 --> 00:03:07,728 derivative. If I differentiate 6x^2 I get 12x, if I 45 00:03:07,728 --> 00:03:11,826 differentiate minus 6x I get minus 6, and if I differentiate minus 12 I get 46 00:03:11,826 --> 00:03:14,979 zero. Again, I've got a common factor of six so 47 00:03:14,979 --> 00:03:17,915 I'll pull that out and I'm left with 2x-1. 48 00:03:17,915 --> 00:03:22,348 And now I can think about the SIGN of the second derivative. 49 00:03:22,348 --> 00:03:27,933 And what do I know about that? Well, the second derivative is negative if I plug 50 00:03:27,933 --> 00:03:33,335 in an x value which is less than 1/2 and the second derivative is positive if I 51 00:03:33,335 --> 00:03:36,542 plug in an x value which is bigger than 1/2. 52 00:03:36,542 --> 00:03:41,310 All right, now I know a lot of information about the SIGN of the first 53 00:03:41,310 --> 00:03:46,730 and the second derivative, so I can use this information to say something about 54 00:03:46,730 --> 00:03:50,515 the function. Let me look back to my preliminary graph 55 00:03:50,515 --> 00:03:54,222 that I made with just plugging in a few points. 56 00:03:54,222 --> 00:04:00,066 All right, so here I plugged in a few points and what I'd like to be able to 57 00:04:00,066 --> 00:04:04,891 say now is where is the function increasing and decreasing. 58 00:04:04,891 --> 00:04:10,999 And by looking at the sign of the first derivative I know that the function's 59 00:04:10,999 --> 00:04:14,932 increasing, decreasing, and then increasing. 60 00:04:14,932 --> 00:04:19,103 Minus 1 and 2 are my critical point and in fact, they're local extrema. 61 00:04:19,103 --> 00:04:24,323 This is a local maximum value, and this is a local minimum value down here, and I 62 00:04:24,323 --> 00:04:29,053 can also see that by considering the information given in the sine of the 63 00:04:29,053 --> 00:04:32,976 second derivative. Since the second derivative's negative 64 00:04:32,976 --> 00:04:37,555 here, the functions concave down. And since the second derivative is 65 00:04:37,555 --> 00:04:40,485 positive over here, the function is concave up. 66 00:04:40,485 --> 00:04:44,880 And that makes this point into a local maximum and this point into a local 67 00:04:44,880 --> 00:04:47,609 minimum. Alright, now that I've got all that 68 00:04:47,609 --> 00:04:51,376 information I can try to just fix the graph here filling it in. 69 00:04:51,376 --> 00:04:55,737 So let's see, so I've got these points here and what do I know? I know the 70 00:04:55,737 --> 00:05:01,412 function is increasing here, and now I know that it's decreasing here. 71 00:05:01,412 --> 00:05:05,377 And I know that it's concaved down in this region. 72 00:05:05,377 --> 00:05:09,522 Over the rest of the graph the rest concave up. 73 00:05:09,522 --> 00:05:15,797 There's an inflection point here when x=1/2 and this point over here is a local 74 00:05:15,797 --> 00:05:20,469 minumum. The function's decreasing by looking at 75 00:05:20,469 --> 00:05:26,470 the sign of the first derivative, until I get to two. 76 00:05:26,470 --> 00:05:34,633 And then when I get to two, the first derivative tells me the function's 77 00:05:34,633 --> 00:05:37,844 increasing. So there we go, 78 00:05:37,844 --> 00:05:43,242 I've drawn a graph of my function. The point here is not to capture a 79 00:05:43,242 --> 00:05:47,758 perfect picture of the function. It's like an impressionistic painting, 80 00:05:47,758 --> 00:05:51,805 the point is to capture all of the meaning all of the emotion of the 81 00:05:51,805 --> 00:05:54,954 function. Compare that to a photograph which might 82 00:05:54,954 --> 00:05:59,445 be a perfectly accurate portrayal, but somehow misses everything that's 83 00:05:59,445 --> 00:06:02,608 essential. So here's the graph that I drew in red, 84 00:06:02,608 --> 00:06:07,166 and here is a more perfect graph admittedly, that the soulless robot drew. 85 00:06:07,166 --> 00:06:10,238 And you'll see that my graph really is just as good. 86 00:06:10,238 --> 00:06:15,035 I mean, it captures all the qualitative information which is really what a human 87 00:06:15,035 --> 00:06:19,047 being cares about. Functions increasing, decreasing, 88 00:06:19,047 --> 00:06:22,307 increasing. You can see where it's concave down and 89 00:06:22,307 --> 00:06:25,967 where it's concave up. And you can kind of see roughly where 90 00:06:25,967 --> 00:06:30,262 this function crosses the x axis. Let's summarize the situation. 91 00:06:30,262 --> 00:06:34,890 There's really 4 basic pieces that you're just gluing together when you're doing a 92 00:06:34,890 --> 00:06:39,047 lot of these curve sketching problems. It depends on the SIGN of the first 93 00:06:39,047 --> 00:06:41,963 derivative, and the SIGN of the second derivative. 94 00:06:41,963 --> 00:06:46,430 If the derivative is positive, and the second derivative is positive, then the 95 00:06:46,430 --> 00:06:50,992 function is increasing, and the slopes of the tangent lines are increasing. 96 00:06:50,992 --> 00:06:55,397 If the function's derivative is negative but the second derivative is positive, 97 00:06:55,397 --> 00:06:59,537 that means although the function's decreasing, the slopes of those tangent 98 00:06:59,537 --> 00:07:03,027 lines are increasing. We've got kind of complementary pictures 99 00:07:03,027 --> 00:07:07,467 over here when the second derivative's negative, here the function's increasing 100 00:07:07,467 --> 00:07:12,007 but the slopes of those tangent lines are decreasing, and here both the function is 101 00:07:12,007 --> 00:07:15,522 decreasing and the slopes of the tangent lines are decreasing. 102 00:07:15,522 --> 00:07:20,558 A lot of the curve sketching problems amount to just gluing together these four 103 00:07:20,558 --> 00:07:22,826 basic pieces in the appropriate way.