1 00:00:00,012 --> 00:00:07,060 , I want to differentiate really complicated functions. As a concrete 2 00:00:07,072 --> 00:00:15,019 example take a look at the function f of x equals 1 plus 2x to the fifth power. Let's 3 00:00:15,031 --> 00:00:22,541 try to differentiate this function. We could approach this in a couple different 4 00:00:22,553 --> 00:00:29,839 ways. First of all, I could just expand it out. Alright. So I'm just going to expand 5 00:00:29,851 --> 00:00:37,493 this out 1 to the fifth is just one, plus ten x, plus 40 x squared, plus 80 x cubed, 6 00:00:37,633 --> 00:00:45,101 plus 80 x to the fourth, plus 32 x to the 5th. Now, it's just a polynomial so I can 7 00:00:45,113 --> 00:00:52,259 fearlessly differentiate it. So, f prime of x, by differentiate this, the 8 00:00:52,271 --> 00:00:59,031 derivative of one is zero, the derivative of ten x is ten, the derivative of 40 x 9 00:00:59,043 --> 00:01:09,630 squared is 80 x, and 240 x squared, 320 x cubed, and 160 x to the fourth. Of course, 10 00:01:09,642 --> 00:01:21,675 if we're clever at this point, we can also see that this mess factors. So it's sort 11 00:01:21,687 --> 00:01:29,949 of believable as a factor of ten here, since all of these coefficients end in a 12 00:01:29,961 --> 00:01:37,227 zero. This is ten times one plus eight x plus 24 x squared plus 32 x cubed plus 16 13 00:01:37,227 --> 00:01:43,711 x to the fourth. What's way less obvious, I mean not obvious at all, is that this 14 00:01:43,723 --> 00:01:48,560 mess also factors. It happens to be one plus two x to the fourth power. This is 15 00:01:48,572 --> 00:01:53,807 not an accident. What if we instead applied the change rule to original 16 00:01:53,819 --> 00:01:59,602 problem? So let's compute the derivative to the change rule. The first step is 17 00:01:59,614 --> 00:02:05,314 we're going to split up the function f into a composition of two functions, g and 18 00:02:05,326 --> 00:02:10,797 h, g here, the outside function is the fifth power function, and h, the inside 19 00:02:10,809 --> 00:02:15,250 function is one plus two x. So if I combine those two functions, save the 20 00:02:15,262 --> 00:02:20,690 composition, I get back f. Now, I want to differentiate f and, by the chain rule, 21 00:02:20,803 --> 00:02:26,562 that's the derivative of the outside, add the inside function, times the derivative 22 00:02:26,574 --> 00:02:33,240 of the inside function. In this case, what is the derivative of the outside function? 23 00:02:33,369 --> 00:02:38,566 The derivative of g is five x to the fourth. So I'm going to take that but if 24 00:02:38,578 --> 00:02:43,984 evaluate it at h. five h of x to the fourth multiply by the derivative of h. 25 00:02:44,113 --> 00:02:50,306 What is the derivative of h? Well, it's two. Well, look what I got here. I've got 26 00:02:50,318 --> 00:02:54,477 five, h of x is one plus two x to the fourth times two, that's ten times one 27 00:02:54,489 --> 00:02:59,976 plus two x to the fourth, that's exactly what we calculated before. It's really 28 00:02:59,988 --> 00:03:05,593 nice example, because it shows that we're doing the same calculation. We're 29 00:03:05,605 --> 00:03:11,151 calculating derivative of the function one plus two x to the fifth power, but we're 30 00:03:11,163 --> 00:03:16,280 doing it in two different ways, nevertheless, we get the same answer. 31 00:03:16,402 --> 00:03:22,825 Somehow, mathematics is conspiring to be consistent. Okay, well, let's try another 32 00:03:22,837 --> 00:03:29,115 example. Well, here's a more complicated function, f of x equals the square root of 33 00:03:29,127 --> 00:03:34,569 x squared plus 0.0001. What's the derivative of f? We can't simply expand 34 00:03:34,581 --> 00:03:40,089 this function out, and in fact, if you graph the function, you might think that 35 00:03:40,101 --> 00:03:45,743 the function is not differential, because the graph of the function has this sharp 36 00:03:45,755 --> 00:03:51,238 corner at the origin, but let's zoom in and see what this actually looks like if 37 00:03:51,250 --> 00:03:59,158 we zoom in close enough. If we zoom in close enough, the thing doesn't look like 38 00:03:59,170 --> 00:04:06,911 it has a sharp corner anymore. It actually looks like it's curved and if we zoom in 39 00:04:06,923 --> 00:04:12,868 any further, the thing would look more and more like a straight line. What we're 40 00:04:12,880 --> 00:04:16,853 really seeing is the function is differentiable. Now, we can verify this 41 00:04:16,865 --> 00:04:21,279 algebraically, we can use our derivative laws, like a change rule, to actually 42 00:04:21,291 --> 00:04:26,054 calculate the derivative of this function. We'll differentiate this by using the 43 00:04:26,066 --> 00:04:30,382 change rule since this is really a composition of two functions. This is a 44 00:04:30,394 --> 00:04:34,995 composition of the square root function and this polynomial, x squared plus 45 00:04:35,007 --> 00:04:39,951 0.0001. Alright, so the derivative of f is the derivative of the outside function, 46 00:04:40,055 --> 00:04:44,622 which is the derivative of the square root, which is 1 over 2 square root And 47 00:04:44,634 --> 00:04:49,619 it's the derivative of the outside function evaluated at the inside, which is 48 00:04:49,631 --> 00:04:55,178 x squared plus 0.0001. I have to multiply by the derivative of the inside function. 49 00:04:55,292 --> 00:05:00,941 What is the derivative of x squared plus 0.0001? Well, that's the derivative of the 50 00:05:00,953 --> 00:05:06,415 x squared, since it's a constant and the derivative of x squared is two x. So the 51 00:05:06,427 --> 00:05:13,833 dirivitave of f is one over two t imes the square root of x squared plus 0.0001 times 52 00:05:13,845 --> 00:05:20,918 two x. I could make that a little bit nicer looking. I could cancel these twos 53 00:05:20,930 --> 00:05:28,583 and write this as x over the square root of x squared plus 0.0001. What happens at 54 00:05:28,595 --> 00:05:34,880 zero? So let compute the derivative at zero. Well, if I plug in zero for x, I've 55 00:05:34,892 --> 00:05:40,080 got zero over zero squared plus 0.0001. The denominator is not zero, the numerator 56 00:05:40,092 --> 00:05:45,085 is zero, the derivative at zero is zero and you can see that from the graph. If I 57 00:05:45,097 --> 00:05:50,391 look at when x equals zero, the tangent line at that point is horizontal, the 58 00:05:50,403 --> 00:05:54,848 slope of that tangent line is zero. The derivative at zero is zero, and there's 59 00:05:54,860 --> 00:06:00,025 more awesome things that you can see by looking at the derivative. If you look at, 60 00:06:00,134 --> 00:06:05,202 say, the limit of the derivative as x approaches infinity, that's the limit of 61 00:06:05,214 --> 00:06:10,379 this quantity, which is one, and the limit of the derivative as x approaches minus 62 00:06:10,391 --> 00:06:15,707 infinity is negative one and you can see this visibly on the graph of the function. 63 00:06:15,813 --> 00:06:20,366 If you plug in a really big number and look at the tangent line there, that 64 00:06:20,378 --> 00:06:25,483 tangent line has slope close to one. And, if you plug in areally negative number and 65 00:06:25,495 --> 00:06:30,556 look at the tangent line there, That tangent line has slope close to minus one. 66 00:06:30,822 --> 00:06:36,270 Our derivative rules are revealing facts that are hidden. This function looks like 67 00:06:36,282 --> 00:06:41,513 it's got a sharp corner, but we know, by applying our differentiation rules, by 68 00:06:41,525 --> 00:06:46,846 using the change rule, that this function is in fact differentiable. And we know 69 00:06:46,858 --> 00:06:52,126 that if we zoom in close enough, the thing looks like a straight line, the derivative 70 00:06:52,138 --> 00:06:55,801 rules really revealing this structure at very small scales.