1 00:00:00,012 --> 00:00:05,022 [music]. We've seen a little bit of this linear 2 00:00:05,022 --> 00:00:11,865 approximation business already. A long time ago, we saw this. 3 00:00:11,865 --> 00:00:16,847 That, f of x plus h is approximately f of x. 4 00:00:16,847 --> 00:00:21,259 Well, that much at least is really just because f is say continuous, right? 5 00:00:21,259 --> 00:00:25,605 Nearby inputs should be sent to nearby outputs, but let's suppose that f is 6 00:00:25,605 --> 00:00:28,423 differential, then we can say more, all right? 7 00:00:28,423 --> 00:00:31,755 I'm going to add to this h times the derivative of f at x. 8 00:00:31,755 --> 00:00:36,269 What is the derivative measure, right? It's the ratio of how much the output 9 00:00:36,269 --> 00:00:38,996 changes to an input change infinitesimally. 10 00:00:38,996 --> 00:00:43,893 But for an actual input change of h, if I take this, which is the ratio of output 11 00:00:43,893 --> 00:00:48,359 change to input change and I multiply it by how much the input change is. 12 00:00:48,359 --> 00:00:53,676 This quantity should tell me how much I expect the output to change when I go from 13 00:00:53,676 --> 00:00:56,973 X to X plus H. Where does this formula actually come 14 00:00:56,973 --> 00:00:59,991 from? Well, let's think back to the definition 15 00:00:59,991 --> 00:01:01,508 of derivative. Right? 16 00:01:01,508 --> 00:01:07,040 What's the definition of derivative? The derivative of F at X is the limit as h 17 00:01:07,040 --> 00:01:10,982 approaches 0 of f of x plus h minus f of x, all over h. 18 00:01:10,982 --> 00:01:14,742 Alright, that's the definition of derivative. 19 00:01:14,742 --> 00:01:20,273 Now how does that help us here? Well, if I just pick some value of h, an 20 00:01:20,273 --> 00:01:26,673 actual value of h, that's not 0 but close to 0, then I get that f prime of x should 21 00:01:26,673 --> 00:01:32,773 be approximately f of x plus h for that small but p-, you know, non, non zero 22 00:01:32,773 --> 00:01:38,849 value of h, minus f of x over h. So this is approximately equal, as long as 23 00:01:38,849 --> 00:01:42,315 h is small. Now I multiply both sides of this 24 00:01:42,315 --> 00:01:48,015 approximate quantity by h and I'll find that h times f prime of x should be 25 00:01:48,015 --> 00:01:53,945 approximately F of X plus H minus F of X. And then I'll add F of X to both sides, 26 00:01:53,945 --> 00:01:59,990 and what I'll get is that H times F prime of X plus F of X should be approximately F 27 00:01:59,990 --> 00:02:04,935 of X plus H, and that's the statement that we had before, right? 28 00:02:04,935 --> 00:02:10,743 That the value of function X plus H is approximately the value of the function of 29 00:02:10,743 --> 00:02:14,493 X plus something I'm getting from the derivative. 30 00:02:14,493 --> 00:02:18,218 The derivative of f at x times how much I wiggled the input by. 31 00:02:18,218 --> 00:02:22,395 So I've got this formula, but why do I care about this formula at all? 32 00:02:22,395 --> 00:02:26,999 Well, I care because this is really what I wanted in the first place, right? 33 00:02:26,999 --> 00:02:31,493 I really wanted to understand how wiggling the input would effect the output, and 34 00:02:31,493 --> 00:02:36,113 fundamentally, you know, the derivative isn't just some random limit that I cooked 35 00:02:36,113 --> 00:02:39,857 up for you to evaluate. It's supposed to say something meaningful 36 00:02:39,857 --> 00:02:44,081 about the function, and this is what's telling us what the derivative means, 37 00:02:44,081 --> 00:02:46,525 right? The derivative really means something 38 00:02:46,525 --> 00:02:49,148 about how wiggling the input affects the output. 39 00:02:49,148 --> 00:02:52,084 There's another reason to care about this formula. 40 00:02:52,084 --> 00:02:57,106 We can use this formula, in fact we've already used this formula to numerically 41 00:02:57,106 --> 00:03:01,236 approximate a function that might be hard to compute otherwise. 42 00:03:01,236 --> 00:03:08,587 Um,, let's look at a function f of x will be say, the cube root of x, and let's look 43 00:03:08,587 --> 00:03:14,375 at the input 125 and f at 125, right? What's the cube of 125? 44 00:03:14,375 --> 00:03:18,756 That's 5, because 5 times 5 times 5, that's 125. 45 00:03:18,756 --> 00:03:23,334 So the cube of 125 is 5. Now let's try to wiggle the input and see 46 00:03:23,334 --> 00:03:26,672 what happens. Let's wiggle by h, which will be three. 47 00:03:26,672 --> 00:03:31,059 Three's not all that small, but compared to 125, three's pretty small. 48 00:03:31,059 --> 00:03:34,018 And I'd like to know what f of a plus h is, right? 49 00:03:34,018 --> 00:03:37,249 I want to know what the cube root of 125 plus 3, 128 is. 50 00:03:37,249 --> 00:03:40,269 And you know that's going to be hard to know, right? 51 00:03:40,269 --> 00:03:44,726 So I'm only going to know Approximately. But I can use the derivative here, right? 52 00:03:44,726 --> 00:03:48,516 Because the derivative tells me how wiggling the input affects the output. 53 00:03:48,516 --> 00:03:51,751 So as you can get the derivative of this function at the input A. 54 00:03:51,751 --> 00:03:55,520 So let's differentiate this function. And this is X to the one third, so the 55 00:03:55,520 --> 00:03:58,796 derivative is one third times X to the minus two thirds, right? 56 00:03:58,796 --> 00:04:02,446 This minus 2 3rd as 1 3rd minus 1. It's a power rule. 57 00:04:02,446 --> 00:04:06,376 Let's compute the derivative at the input 125. 58 00:04:06,376 --> 00:04:11,963 So that means I look at 1 3rd times 125 to the negative 2 3rd power. 59 00:04:11,964 --> 00:04:17,469 Well, 125 to the negative 3rd, the negative 2 3rds power. 60 00:04:17,469 --> 00:04:22,447 That's 1 25th, and 1 3rd times 1 25th, that is 1 75th. 61 00:04:22,447 --> 00:04:28,363 So this tells me what the derivative is at a 125, now how does that help? 62 00:04:28,363 --> 00:04:35,163 Remember the other formula for this linear approximation game, that f of a plus h, 63 00:04:35,163 --> 00:04:41,463 which is what I'm trying to compute, should be approximately f of a plus h 64 00:04:41,463 --> 00:04:46,991 times f prime of a, and I know what all of these quantities are now. 65 00:04:46,991 --> 00:04:52,795 F of a is 5, h is 3. And F prime at A is 1 75 and 5 plus 3 66 00:04:52,795 --> 00:04:59,945 times 1 75 that's 5.04. Now, how close is that to the actual 67 00:04:59,945 --> 00:05:09,424 retail value of the cube root of 128. Well, it turns out that the cube root of 68 00:05:09,424 --> 00:05:19,390 128 is actually about 5.0396841 and it keeps on going, which is awfully close to 69 00:05:19,390 --> 00:05:22,953 5.04. So our layer approximation game is working 70 00:05:22,953 --> 00:05:26,784 really quite well. This idea that the complicated function 71 00:05:26,784 --> 00:05:31,572 like the cube root function, with its curved graph can be approximated very 72 00:05:31,572 --> 00:05:35,481 well, at least for short intervals by straight lines, right? 73 00:05:35,481 --> 00:05:42,899 This idea of replacing curved object with perfectly straight lines, that's a key 74 00:05:42,899 --> 00:05:48,506 idea of calculus. In short, curves are way too complicated 75 00:05:48,506 --> 00:05:54,435 for us to understand. Lines, on the other hand, just straight 76 00:05:54,435 --> 00:05:58,795 lines, are much easier for us to think about.