1 00:00:07,470 --> 00:00:10,720 GILBERT STRANG: OK, what I want to do today is show you 2 00:00:10,720 --> 00:00:13,735 two different ways that derivatives are used. 3 00:00:16,860 --> 00:00:21,920 In one of them, the problem is to find a close approximation 4 00:00:21,920 --> 00:00:25,110 to the value f at a point x. 5 00:00:25,110 --> 00:00:26,730 f of x. 6 00:00:26,730 --> 00:00:29,830 The second application is to solve an 7 00:00:29,830 --> 00:00:31,800 equation, where often-- 8 00:00:31,800 --> 00:00:35,420 and I use a different letter, capital F, just because it's a 9 00:00:35,420 --> 00:00:37,360 different function and there will be different 10 00:00:37,360 --> 00:00:39,890 examples for this one. 11 00:00:39,890 --> 00:00:43,690 So I just chose capital F to keep them separate. 12 00:00:43,690 --> 00:00:47,420 This is the problem of solving an equation. 13 00:00:47,420 --> 00:00:53,060 And Newton had an idea and it's survived all these 14 00:00:53,060 --> 00:00:55,880 centuries and it's still the good way. 15 00:00:55,880 --> 00:00:59,690 OK, what's this based on, both of them? 16 00:00:59,690 --> 00:01:00,460 That's the point. 17 00:01:00,460 --> 00:01:05,510 They're both based on the same idea. 18 00:01:05,510 --> 00:01:13,070 Suppose at a point, which is near the x we want, or near 19 00:01:13,070 --> 00:01:17,400 the solution to this problem, at some point, let me call it 20 00:01:17,400 --> 00:01:24,690 a, suppose we know the slope, the derivative, at that point. 21 00:01:24,690 --> 00:01:29,320 So I'm using f prime for the derivative. 22 00:01:29,320 --> 00:01:34,160 At that point, well, we know what the definition is. 23 00:01:34,160 --> 00:01:39,270 But I'm also supposing that we've got that number. 24 00:01:39,270 --> 00:01:45,850 And now I want to use this knowledge of the slope at that 25 00:01:45,850 --> 00:01:52,580 nearby point a to come close to the solution, the f of x, 26 00:01:52,580 --> 00:01:54,660 or the x there. 27 00:01:54,660 --> 00:02:00,660 OK, well you remember this is delta f divided by delta x. 28 00:02:00,660 --> 00:02:06,160 You recognize that before we take the limit this is two 29 00:02:06,160 --> 00:02:09,509 nearby points, delta x apart. 30 00:02:09,509 --> 00:02:13,570 Their values, the values of f at those points. 31 00:02:13,570 --> 00:02:16,970 It's the change in f divided by the change in x-- 32 00:02:16,970 --> 00:02:18,930 that's what the derivative is-- 33 00:02:18,930 --> 00:02:23,840 as one point approaches the point a 34 00:02:23,840 --> 00:02:26,740 where we know the slope. 35 00:02:26,740 --> 00:02:28,060 Here's the idea. 36 00:02:28,060 --> 00:02:33,620 I'm just going to erase that stuff. 37 00:02:33,620 --> 00:02:37,840 Well, now I won't have an equal sign anymore. 38 00:02:37,840 --> 00:02:41,680 I'll have an approximately equal. 39 00:02:41,680 --> 00:02:43,850 So the slope-- 40 00:02:43,850 --> 00:02:48,300 this is delta f over delta x-- 41 00:02:48,300 --> 00:02:52,410 is not the same as df dx, which is this. 42 00:02:52,410 --> 00:02:58,790 But if x is close to a this will normally be close to the 43 00:02:58,790 --> 00:03:01,930 correct slope, the instant slope at the point. 44 00:03:01,930 --> 00:03:08,820 I'm just going to use this approximation to find a good 45 00:03:08,820 --> 00:03:11,050 approximation for f of x. 46 00:03:11,050 --> 00:03:17,410 So in this application on the left I know the x and I want 47 00:03:17,410 --> 00:03:20,090 to find what is f at that point? 48 00:03:20,090 --> 00:03:23,390 So I look at this. 49 00:03:23,390 --> 00:03:27,140 I multiply up by x minus a. 50 00:03:27,140 --> 00:03:30,380 I move the f of a to the other side. 51 00:03:30,380 --> 00:03:31,630 And what do I have? 52 00:03:33,840 --> 00:03:37,570 I still have an approximation sign. 53 00:03:37,570 --> 00:03:42,240 So when I move the f of a to the other side, there it is. 54 00:03:42,240 --> 00:03:52,770 And then, the other part is x minus a times f prime at a. 55 00:03:52,770 --> 00:03:57,300 That's my formula. 56 00:03:57,300 --> 00:04:00,200 Let me just talk about that formula for a minute and then 57 00:04:00,200 --> 00:04:03,190 give examples. 58 00:04:03,190 --> 00:04:06,970 What that says is that if I want to find the value of f at 59 00:04:06,970 --> 00:04:14,360 a nearby point, a good thing to do is use this linear 60 00:04:14,360 --> 00:04:15,270 approximation. 61 00:04:15,270 --> 00:04:17,320 I use the word "linear" because the graph 62 00:04:17,320 --> 00:04:19,480 of that is a line. 63 00:04:19,480 --> 00:04:22,100 I'm following a straight line instead of following the 64 00:04:22,100 --> 00:04:23,970 curved graph. 65 00:04:23,970 --> 00:04:25,800 That's the message of today's lecture. 66 00:04:25,800 --> 00:04:28,510 Follow the line. 67 00:04:28,510 --> 00:04:30,170 So it's a line. 68 00:04:30,170 --> 00:04:33,680 It starts out at the correct point at x equal a. 69 00:04:33,680 --> 00:04:36,670 It has the corrects slope f prime of a. 70 00:04:36,670 --> 00:04:39,630 And if I don't go too far that line won't be too 71 00:04:39,630 --> 00:04:41,140 far from the curve. 72 00:04:41,140 --> 00:04:41,720 Good. 73 00:04:41,720 --> 00:04:44,040 You'll see it now in examples. 74 00:04:44,040 --> 00:04:47,200 Let me get the corresponding idea here. 75 00:04:47,200 --> 00:04:54,720 Now I have to remember to use capital F. So let me create 76 00:04:54,720 --> 00:05:00,240 the formula that helps to solve, approximately solves, 77 00:05:00,240 --> 00:05:02,030 this equation. 78 00:05:02,030 --> 00:05:03,480 What's the difference? 79 00:05:03,480 --> 00:05:06,950 Now x is what I'm looking for. 80 00:05:06,950 --> 00:05:10,930 x is what I'm looking for and F of x is what I know. 81 00:05:10,930 --> 00:05:12,930 I know it's to be 0. 82 00:05:12,930 --> 00:05:18,440 So I'm going to use this with capital F. I know F of x 83 00:05:18,440 --> 00:05:20,340 should be 0 and x is the unknown. 84 00:05:20,340 --> 00:05:25,110 So can I just move that equation around again to get 85 00:05:25,110 --> 00:05:26,000 an equation? 86 00:05:26,000 --> 00:05:30,550 I'll bring the x minus a up as I did before. 87 00:05:30,550 --> 00:05:34,290 And I have to use an approximation sign as always. 88 00:05:34,290 --> 00:05:42,330 The F of x is 0, so I have minus F of a, and then I'm 89 00:05:42,330 --> 00:05:44,630 dividing by F prime of a. 90 00:05:48,910 --> 00:05:50,670 There you have it. 91 00:05:50,670 --> 00:05:53,360 That is Newton's insight. 92 00:05:53,360 --> 00:05:59,160 Newton and then somebody named Raphson helped out, made it 93 00:05:59,160 --> 00:06:00,600 work for general functions. 94 00:06:00,600 --> 00:06:03,230 And once again, I forgot. 95 00:06:03,230 --> 00:06:05,190 I should be using capital F there. 96 00:06:07,750 --> 00:06:11,260 Because in the right side of the board I'm calling the 97 00:06:11,260 --> 00:06:19,220 function capital F. This is the little movement of x away 98 00:06:19,220 --> 00:06:22,130 from a, which will bring us closer to the answer. 99 00:06:22,130 --> 00:06:25,960 You'll see is this formula work in a picture. 100 00:06:25,960 --> 00:06:32,150 So I'm ready for an example starting with approximation. 101 00:06:32,150 --> 00:06:33,600 So here's my problem. 102 00:06:33,600 --> 00:06:34,850 Here's my example. 103 00:06:37,180 --> 00:06:43,260 Find the square root of-- 104 00:06:43,260 --> 00:06:48,210 so my problem is going to be find the square root or 105 00:06:48,210 --> 00:06:51,210 approximate square root of 9. 106 00:06:51,210 --> 00:06:54,120 I'm going to shift away from 9 a little bit. 107 00:06:54,120 --> 00:06:58,570 9.06. 108 00:06:58,570 --> 00:07:01,150 OK, how does that fit this example? 109 00:07:01,150 --> 00:07:08,760 My function is the square root function, x to the 1/2. 110 00:07:08,760 --> 00:07:12,310 It's derivative, f prime. 111 00:07:12,310 --> 00:07:16,990 I know the derivative of that is 1/2 x to one 112 00:07:16,990 --> 00:07:20,100 lower power minus 1/2. 113 00:07:20,100 --> 00:07:23,810 So that's 1 over 2 square root of x. 114 00:07:23,810 --> 00:07:25,590 Good. 115 00:07:25,590 --> 00:07:26,600 I know my function. 116 00:07:26,600 --> 00:07:28,590 I know its derivative. 117 00:07:28,590 --> 00:07:36,090 Now I pick a point a, which is close and easy. 118 00:07:36,090 --> 00:07:42,760 So close, I'm looking for a point a, which is near 9.06 119 00:07:42,760 --> 00:07:44,880 and has a nice square root. 120 00:07:44,880 --> 00:07:47,200 Well, 9. 121 00:07:47,200 --> 00:07:55,230 So I'll choose a to be 9. 122 00:07:55,230 --> 00:07:59,680 The correct value f at the point a is the 123 00:07:59,680 --> 00:08:01,730 square root of 9. 124 00:08:01,730 --> 00:08:02,470 3. 125 00:08:02,470 --> 00:08:03,410 That's the point. 126 00:08:03,410 --> 00:08:08,001 We can evaluate the function easily at 9. 127 00:08:08,001 --> 00:08:19,620 And f prime at a is 1 over 2 square root of a. 128 00:08:19,620 --> 00:08:20,180 9. 129 00:08:20,180 --> 00:08:21,450 Square root of 9. 130 00:08:21,450 --> 00:08:22,740 So what do I have for that? 131 00:08:22,740 --> 00:08:24,700 That's the easy number, 3. 132 00:08:24,700 --> 00:08:25,950 That's 1/6. 133 00:08:28,660 --> 00:08:33,799 In other words, I know what's happening at x equal 9. 134 00:08:33,799 --> 00:08:37,710 And that's a particular point I'm calling a and I'm working 135 00:08:37,710 --> 00:08:38,630 from there. 136 00:08:38,630 --> 00:08:41,460 Then what does my approximation say? 137 00:08:41,460 --> 00:08:46,000 It says that f at this nearby point. 138 00:08:46,000 --> 00:08:47,950 So x is 9.06. 139 00:08:47,950 --> 00:08:54,040 This is the x where I want to know the square root. 140 00:08:54,040 --> 00:08:58,010 So this is saying that the square root of 9.06-- 141 00:08:58,010 --> 00:09:00,560 that's my f of x-- 142 00:09:00,560 --> 00:09:06,120 is approximately f at a. 143 00:09:06,120 --> 00:09:07,970 That's the square root of 9. 144 00:09:07,970 --> 00:09:09,990 That's the 3. 145 00:09:09,990 --> 00:09:11,570 So far reasonable. 146 00:09:11,570 --> 00:09:16,090 That's the approximation I started with just using the 9. 147 00:09:16,090 --> 00:09:20,650 But now I'm improving it by the difference 148 00:09:20,650 --> 00:09:22,710 between x minus 3. 149 00:09:22,710 --> 00:09:25,290 Oh, what is x? 150 00:09:25,290 --> 00:09:28,250 So I'm plugging in x is 9.06. 151 00:09:28,250 --> 00:09:31,090 That's where I really want the square root. 152 00:09:31,090 --> 00:09:33,120 That's my x. 153 00:09:33,120 --> 00:09:37,150 Minus a, which is the 9. 154 00:09:37,150 --> 00:09:40,390 Times f prime, which we figured out as 1/6. 155 00:09:43,730 --> 00:09:47,960 That's the linear approximation following this 156 00:09:47,960 --> 00:09:52,540 line to this number, which is what? 157 00:09:52,540 --> 00:09:54,330 3 plus-- 158 00:09:54,330 --> 00:09:56,880 That's 0.06 divided by 6. 159 00:09:56,880 --> 00:09:57,780 That's 3. 160 00:09:57,780 --> 00:09:59,870 What do I have there? 161 00:09:59,870 --> 00:10:02,880 This difference is 0.06. 162 00:10:02,880 --> 00:10:07,550 Divided by 6 and its 0.01. 163 00:10:07,550 --> 00:10:10,150 That's the approximation. 164 00:10:10,150 --> 00:10:12,000 Closer than 3. 165 00:10:12,000 --> 00:10:13,920 That comes from following the line. 166 00:10:13,920 --> 00:10:16,300 Let me draw a graph to show you what I mean by 167 00:10:16,300 --> 00:10:18,150 following the line. 168 00:10:18,150 --> 00:10:19,895 Here is my square root function. 169 00:10:23,120 --> 00:10:25,860 The square root looks something like that. 170 00:10:25,860 --> 00:10:32,430 And here is the point x equals 9, where I know that the 171 00:10:32,430 --> 00:10:33,680 height is 3. 172 00:10:36,110 --> 00:10:38,350 What else do I know? 173 00:10:38,350 --> 00:10:42,550 Here is 9.06, a little further over, and I'm 174 00:10:42,550 --> 00:10:45,660 looking for that point. 175 00:10:45,660 --> 00:10:49,910 I'm looking for the square root of 9.06. 176 00:10:49,910 --> 00:10:55,290 So this was 9 here and this was 9.06. 177 00:10:55,290 --> 00:11:00,040 And how am I getting close to that point? 178 00:11:00,040 --> 00:11:04,440 Well, I'm not going to follow the curve to do square root of 179 00:11:04,440 --> 00:11:07,300 9.06 exactly, any more than your 180 00:11:07,300 --> 00:11:09,700 calculator or computer does. 181 00:11:09,700 --> 00:11:13,320 I'm going to follow this line. 182 00:11:13,320 --> 00:11:17,050 So that line is the tangent line. 183 00:11:17,050 --> 00:11:23,300 It's the line that goes through the right thing at a 184 00:11:23,300 --> 00:11:25,550 with the right slope. 185 00:11:25,550 --> 00:11:30,670 So you can see that by following the line 186 00:11:30,670 --> 00:11:31,526 that gave me the 3. 187 00:11:31,526 --> 00:11:32,776 And then here is the little-- you see what I'm-- 188 00:11:36,690 --> 00:11:39,760 I'm missing by a very small amount, practically 189 00:11:39,760 --> 00:11:42,020 too small to see. 190 00:11:42,020 --> 00:11:49,185 I'm picking the point on the line and that was this across, 191 00:11:49,185 --> 00:11:53,220 this delta x was the 0.06. 192 00:11:53,220 --> 00:11:56,560 The little tiny bit here is the 0.06. 193 00:11:56,560 --> 00:12:03,840 And this delta f is the little piece that I 194 00:12:03,840 --> 00:12:09,790 added on the 0.01. 195 00:12:09,790 --> 00:12:11,120 How did that come from? 196 00:12:11,120 --> 00:12:14,570 It came from the fact that the correct slope is 1/6. 197 00:12:14,570 --> 00:12:18,330 If I go over 0.06, I should go up 0.01. 198 00:12:18,330 --> 00:12:19,520 So you see what I'm doing? 199 00:12:19,520 --> 00:12:28,210 I'm taking that point as my close approximation to the 200 00:12:28,210 --> 00:12:28,760 square root. 201 00:12:28,760 --> 00:12:34,830 Closer than 3 to the square root of 9.06. 202 00:12:34,830 --> 00:12:34,950 OK. 203 00:12:34,950 --> 00:12:35,990 That's a first example. 204 00:12:35,990 --> 00:12:37,870 I'll give a second one. 205 00:12:37,870 --> 00:12:44,180 But first, I'd like to give an example that's like this one 206 00:12:44,180 --> 00:12:46,430 of Newton's method. 207 00:12:46,430 --> 00:12:48,120 May I change now to Newton's method? 208 00:12:48,120 --> 00:12:51,030 So I want to create an equation. 209 00:12:51,030 --> 00:12:54,270 And actually, I want it to solve the same problem. 210 00:12:54,270 --> 00:12:58,440 So I'm going to take my function to be x squared minus 211 00:12:58,440 --> 00:13:05,870 9.06 and I'll set that to 0. 212 00:13:05,870 --> 00:13:09,670 I'm just keeping my two examples 213 00:13:09,670 --> 00:13:12,775 close because the answer-- 214 00:13:16,440 --> 00:13:22,450 in both problems, I'm looking for the square root of 9.06. 215 00:13:22,450 --> 00:13:25,300 Of course, that's the solution to this equation, the square 216 00:13:25,300 --> 00:13:27,190 root of 9.06. 217 00:13:27,190 --> 00:13:34,210 OK again, I pick a point a close to the solution. 218 00:13:34,210 --> 00:13:39,830 And again, I'm going to take a to be 3. 219 00:13:39,830 --> 00:13:42,070 So 3 is close to the correct solution. 220 00:13:46,110 --> 00:13:49,370 The correct x is the square root of 9.06. 221 00:13:49,370 --> 00:13:55,100 But I'm starting close to it. 222 00:13:55,100 --> 00:14:01,040 OK, at that point I figure out F of a. 223 00:14:01,040 --> 00:14:03,700 Newton wants to know F of a, the value. 224 00:14:03,700 --> 00:14:06,740 And Newton also wants to know the slope. 225 00:14:06,740 --> 00:14:09,360 So the value at a is-- 226 00:14:09,360 --> 00:14:11,200 3 squared is 9. 227 00:14:11,200 --> 00:14:20,200 9 minus 9.06 is minus 0.06. 228 00:14:20,200 --> 00:14:29,160 F prime of a is-- what's the derivative of F? 229 00:14:29,160 --> 00:14:33,980 Capital F. Well, the derivative is certainly 2x. 230 00:14:33,980 --> 00:14:38,710 And at the point a it's 6. 231 00:14:38,710 --> 00:14:40,220 This is the 2x. 232 00:14:40,220 --> 00:14:42,300 2a. 233 00:14:42,300 --> 00:14:46,340 This is the 2a because I'm evaluating the slope 234 00:14:46,340 --> 00:14:47,140 at the point a. 235 00:14:47,140 --> 00:14:51,060 Actually, if you want a picture, it's quite 236 00:14:51,060 --> 00:14:53,390 interesting to see the picture. 237 00:14:53,390 --> 00:14:57,610 Let me graph this f of x now. 238 00:14:57,610 --> 00:15:00,170 What does my function f of x look like? 239 00:15:00,170 --> 00:15:00,920 x squared. 240 00:15:00,920 --> 00:15:03,150 That's a parabola going up. 241 00:15:03,150 --> 00:15:04,900 It starts below here. 242 00:15:04,900 --> 00:15:10,335 It starts somewhere down here and it curves up like so. 243 00:15:13,930 --> 00:15:15,270 So this is the point I want. 244 00:15:18,110 --> 00:15:21,370 There is the square root of 9.06. 245 00:15:21,370 --> 00:15:26,060 I've graphed a function x squared minus 9.06. 246 00:15:26,060 --> 00:15:29,140 That's the point I'd like to find. 247 00:15:29,140 --> 00:15:32,740 I'm not expecting to find it exactly. 248 00:15:32,740 --> 00:15:37,200 What I do is I have a nearby point 3. 249 00:15:40,490 --> 00:15:47,130 At 3 I do know the exact value and I know the slope. 250 00:15:52,080 --> 00:15:52,175 Ha. 251 00:15:52,175 --> 00:15:57,750 Even my bad art is telling me what's going to happen. 252 00:15:57,750 --> 00:15:59,980 Let me write that 3 better. 253 00:15:59,980 --> 00:16:02,490 a equals 3. 254 00:16:02,490 --> 00:16:04,770 This is where I know what's happening. 255 00:16:04,770 --> 00:16:11,320 I know the value of F. It's actually pretty small, but 256 00:16:11,320 --> 00:16:12,780 it's negative. 257 00:16:12,780 --> 00:16:14,510 I know the value of the slope. 258 00:16:14,510 --> 00:16:20,010 So this is like I've blown up this picture here. 259 00:16:23,060 --> 00:16:31,640 This F is the negative 0.06. 260 00:16:31,640 --> 00:16:37,550 Is the value of F. The slope is 6. 261 00:16:37,550 --> 00:16:41,060 And what's the x? 262 00:16:41,060 --> 00:16:46,160 What is my improved guess at the solution? 263 00:16:46,160 --> 00:16:49,610 My improved guess, I don't follow that curve because that 264 00:16:49,610 --> 00:16:51,120 would be perfect. 265 00:16:51,120 --> 00:16:53,240 But curves are hard to follow. 266 00:16:53,240 --> 00:17:01,140 I'll follow the straight line and that's my next x. 267 00:17:01,140 --> 00:17:03,460 My better x. 268 00:17:03,460 --> 00:17:07,170 You see, that's a lot better. 269 00:17:07,170 --> 00:17:09,089 Let me do the numbers here and you'll see 270 00:17:09,089 --> 00:17:10,329 that it's a lot better. 271 00:17:10,329 --> 00:17:12,930 What is the x that Newton's method gives us? 272 00:17:12,930 --> 00:17:16,109 I'm using Newton's formula here. 273 00:17:16,109 --> 00:17:22,710 So Newton's formula says that x minus the a is 3. 274 00:17:22,710 --> 00:17:27,589 And Newton's formula is going to take equal to get an 275 00:17:27,589 --> 00:17:29,440 approximate x. 276 00:17:29,440 --> 00:17:30,920 Minus F of a. 277 00:17:30,920 --> 00:17:32,810 So what's minus F of a? 278 00:17:32,810 --> 00:17:36,860 That will be plus 0.06. 279 00:17:36,860 --> 00:17:42,250 Divided by F prime of a, the slope, which was 6. 280 00:17:42,250 --> 00:17:43,010 What do I get? 281 00:17:43,010 --> 00:17:46,680 I did 0.01. 282 00:17:46,680 --> 00:17:51,270 Actually, the two examples, of course, are parallel. 283 00:17:51,270 --> 00:17:55,880 In a way, the graph of that square root function kind of 284 00:17:55,880 --> 00:18:01,390 got just flipped to this graph of the x squared function. 285 00:18:01,390 --> 00:18:03,930 The square root function and the x squared function are 286 00:18:03,930 --> 00:18:06,980 just sort of inverses to each other. 287 00:18:06,980 --> 00:18:14,370 Their graphs flip and so now the slope is 6 instead of 1/6. 288 00:18:14,370 --> 00:18:22,940 And do you see that that distance, this is the x minus 289 00:18:22,940 --> 00:18:29,320 a distance that has to be 0.01. 290 00:18:29,320 --> 00:18:31,930 That's what I concluded. 291 00:18:31,930 --> 00:18:38,360 I go across 1 if I'm going up/down by 6 because 292 00:18:38,360 --> 00:18:42,910 the slope is 6. 293 00:18:42,910 --> 00:18:45,250 OK, good. 294 00:18:45,250 --> 00:18:47,390 Now, how close am I? 295 00:18:47,390 --> 00:18:50,440 Well, I can't resist asking. 296 00:18:50,440 --> 00:18:58,010 Suppose I multiply 3.01 by 3.01. 297 00:18:58,010 --> 00:19:04,450 Am I close to the 9.06 that was my whole goal? 298 00:19:04,450 --> 00:19:05,680 And how close? 299 00:19:05,680 --> 00:19:07,550 Of course, I'm not going to be exact. 300 00:19:07,550 --> 00:19:12,530 If I do that multiplication I get 301, 903. 301 00:19:12,530 --> 00:19:21,810 Combined I get 9 and the decimal put it in there, 0601. 302 00:19:21,810 --> 00:19:28,940 So by that method or by that method I ended up with 3.01 as 303 00:19:28,940 --> 00:19:34,590 much closer to the square root of 9.06. 304 00:19:34,590 --> 00:19:40,300 You see when I square 3.01, it slightly overshot. 305 00:19:40,300 --> 00:19:43,800 It slightly overshot the 9.06. 306 00:19:43,800 --> 00:19:50,030 This little error there, this is the overshoot error. 307 00:19:50,030 --> 00:19:55,000 And when I square it, it's way out in the ten thousandths 308 00:19:55,000 --> 00:19:59,890 place, the fourth decimal place. 309 00:19:59,890 --> 00:20:00,010 OK. 310 00:20:00,010 --> 00:20:02,240 So those are the two parallel examples. 311 00:20:02,240 --> 00:20:07,700 May I go back to the linear approximation? 312 00:20:07,700 --> 00:20:11,370 Because I think another example's appropriate there. 313 00:20:11,370 --> 00:20:14,450 And then I'll come back and give another Newton example. 314 00:20:14,450 --> 00:20:17,250 So that's my plan here. 315 00:20:17,250 --> 00:20:19,620 Two examples of each. 316 00:20:19,620 --> 00:20:22,480 So those examples were parallel, the next two 317 00:20:22,480 --> 00:20:25,520 examples will be a little different. 318 00:20:25,520 --> 00:20:29,420 So let me show you example two. 319 00:20:29,420 --> 00:20:42,620 So linear approximation example two. 320 00:20:49,160 --> 00:20:49,298 So I want-- 321 00:20:49,298 --> 00:20:50,440 OK, I'm going to look for something that 322 00:20:50,440 --> 00:20:52,770 I don't know exactly. 323 00:20:52,770 --> 00:20:58,980 Let me take e to the 0.01. 324 00:20:58,980 --> 00:21:06,160 What's the value of e to the power of 0.01? 325 00:21:06,160 --> 00:21:11,930 So the function is e to the x. 326 00:21:17,080 --> 00:21:24,080 And I'm looking at x is 0.01. 327 00:21:24,080 --> 00:21:25,700 That's what I want. 328 00:21:25,700 --> 00:21:29,550 I am not going to get an exact number here. 329 00:21:29,550 --> 00:21:32,960 I'm going to follow the tangent line. 330 00:21:32,960 --> 00:21:35,710 I'm going to get a close number. 331 00:21:35,710 --> 00:21:38,120 So where shall I start? 332 00:21:38,120 --> 00:21:43,510 I'll start with a number that's close to that and where 333 00:21:43,510 --> 00:21:45,530 I do you know the correct e. 334 00:21:45,530 --> 00:21:48,030 And a number close to that is take-- 335 00:21:48,030 --> 00:21:52,630 I'll choose a to be 0. 336 00:21:52,630 --> 00:21:55,110 That's close to 0.01. 337 00:21:55,110 --> 00:22:00,770 Then f of a is e to the 0 power. 338 00:22:00,770 --> 00:22:03,790 So that's 1. 339 00:22:03,790 --> 00:22:07,260 Now for the straight line approximation, I also need the 340 00:22:07,260 --> 00:22:09,020 correct slope. 341 00:22:09,020 --> 00:22:12,360 Correct slope at a? 342 00:22:12,360 --> 00:22:14,610 Well, I do know the slope of this. 343 00:22:14,610 --> 00:22:18,460 f prime at 0. 344 00:22:18,460 --> 00:22:19,970 That's my a. 345 00:22:19,970 --> 00:22:21,410 f prime at 0. 346 00:22:21,410 --> 00:22:23,320 0 is my a. 347 00:22:23,320 --> 00:22:25,640 Well, I know the derivative of e to the x. 348 00:22:25,640 --> 00:22:27,130 That's one thing I like. 349 00:22:27,130 --> 00:22:29,510 It's e to the x. 350 00:22:29,510 --> 00:22:34,500 So at x equals 0, again I get a 1 for the derivative, which 351 00:22:34,500 --> 00:22:36,410 is the same, I get e to the 0. 352 00:22:36,410 --> 00:22:38,460 I get also a 1. 353 00:22:38,460 --> 00:22:42,620 So now I know what's happening at a equals 0. 354 00:22:42,620 --> 00:22:46,740 I want to know approximately what's happening at the nearby 355 00:22:46,740 --> 00:22:53,360 point, 0.01. 356 00:22:53,360 --> 00:22:56,780 e to the 0.01, e to the x. 357 00:22:56,780 --> 00:22:59,940 This is the e to the x. 358 00:22:59,940 --> 00:23:02,070 That's my function. 359 00:23:02,070 --> 00:23:06,740 And I'm only going to get it approximately, is the value at 360 00:23:06,740 --> 00:23:09,930 this known point. 361 00:23:09,930 --> 00:23:18,880 The value at the known point 0, the exact exponential is 1. 362 00:23:18,880 --> 00:23:26,900 Plus x minus a times the slope, the corrects slope, at 363 00:23:26,900 --> 00:23:30,640 this not quite perfect point, 0. 364 00:23:30,640 --> 00:23:32,090 And the correct slope is 1. 365 00:23:34,880 --> 00:23:38,660 And of course, a was 0. 366 00:23:38,660 --> 00:23:42,310 So you see I'm using all the facts at a to get an 367 00:23:42,310 --> 00:23:44,720 approximate fact at x. 368 00:23:44,720 --> 00:23:46,340 And what have I got here? 369 00:23:46,340 --> 00:23:47,590 I've just got 1 plus x. 370 00:23:51,990 --> 00:23:54,310 You know, in a way, that's perfect. 371 00:23:54,310 --> 00:23:58,540 Because it shows what the linear approximation is doing. 372 00:23:58,540 --> 00:24:00,930 You remember the series for e to the x? 373 00:24:00,930 --> 00:24:03,320 My correct function is e to the x. 374 00:24:03,320 --> 00:24:06,900 My approximate function is 1 plus x. 375 00:24:06,900 --> 00:24:08,450 What's the connection? 376 00:24:08,450 --> 00:24:12,750 You remember that e to the x, the series for e to the x 377 00:24:12,750 --> 00:24:21,290 started out 1 plus x plus 1/2 x squared, 1/6 x cubed. 378 00:24:21,290 --> 00:24:25,270 Those are the guys, those are the higher order corrections 379 00:24:25,270 --> 00:24:30,440 that following the line misses. 380 00:24:30,440 --> 00:24:35,510 Those are the parts where the function, the curve e to the 381 00:24:35,510 --> 00:24:38,020 x, has left the line. 382 00:24:44,340 --> 00:24:48,410 But if I don't go to far--So this is 1.01. 383 00:24:48,410 --> 00:24:49,980 x is 0.01. 384 00:24:49,980 --> 00:24:51,240 That's my approximation. 385 00:24:51,240 --> 00:24:52,390 1 plus x. 386 00:24:52,390 --> 00:24:55,320 That's the thing to notice. 387 00:24:55,320 --> 00:25:00,410 That linear approximations and you could come back to that-- 388 00:25:00,410 --> 00:25:04,200 the formula for any f and any a. 389 00:25:04,200 --> 00:25:11,030 Linear approximations are just like those power series. 390 00:25:11,030 --> 00:25:14,940 Just like the e to the x equal 1 plus x plus 1/2 x squared 391 00:25:14,940 --> 00:25:17,110 plus so on. 392 00:25:17,110 --> 00:25:22,810 Except we cut them off after just the constant term and the 393 00:25:22,810 --> 00:25:23,810 linear term. 394 00:25:23,810 --> 00:25:28,150 That's what this linear approximation is about. 395 00:25:28,150 --> 00:25:31,000 And you might say, what's the next term? 396 00:25:31,000 --> 00:25:35,980 And of course we know that the next term is 1/2 x squared and 397 00:25:35,980 --> 00:25:39,310 you could ask, what's the next term in this? 398 00:25:39,310 --> 00:25:43,430 In the general case, actually let me tell you the next term. 399 00:25:43,430 --> 00:25:45,630 Next would be-- 400 00:25:45,630 --> 00:25:47,630 but we're not using it. 401 00:25:47,630 --> 00:25:49,660 Would be the 1/2. 402 00:25:49,660 --> 00:25:54,200 It would be the x minus a squared and it would be the 403 00:25:54,200 --> 00:25:55,950 second derivative at a. 404 00:25:59,010 --> 00:26:02,670 If we kept it that's what we would keep. 405 00:26:02,670 --> 00:26:04,980 OK, good. 406 00:26:04,980 --> 00:26:08,600 You saw the main point of linear approximation stop at 407 00:26:08,600 --> 00:26:09,670 the linear term. 408 00:26:09,670 --> 00:26:14,690 Finally, I go back to an example of Newton's method. 409 00:26:14,690 --> 00:26:16,900 A second example of Newton's method. 410 00:26:16,900 --> 00:26:19,990 So I've been thinking, what should I do? 411 00:26:19,990 --> 00:26:24,520 Let me use Newton's method the way it's really used. 412 00:26:24,520 --> 00:26:29,840 The way you use Newton's method is you do this to come 413 00:26:29,840 --> 00:26:32,360 close to the solution. 414 00:26:32,360 --> 00:26:35,360 And then, you do it again. 415 00:26:35,360 --> 00:26:40,140 You do it again starting at 3.01. 416 00:26:40,140 --> 00:26:44,170 So I planned to do just the same thing for the next step 417 00:26:44,170 --> 00:26:48,135 of Newton's method, except the a. 418 00:26:52,210 --> 00:26:59,810 I'm still aiming to solve this same equation, but I'm going 419 00:26:59,810 --> 00:27:02,130 to get closer than 3.01. 420 00:27:02,130 --> 00:27:05,090 I got closer than 3 to 3.01. 421 00:27:05,090 --> 00:27:07,660 Now I'm going to restart there. 422 00:27:07,660 --> 00:27:11,150 a is now going to be 3.01. 423 00:27:11,150 --> 00:27:16,350 I need to compute F of a for Newton's method. 424 00:27:16,350 --> 00:27:20,900 So I have to do 3.01 squared and take away that to see how 425 00:27:20,900 --> 00:27:22,350 wrong I am. 426 00:27:22,350 --> 00:27:22,470 HA. 427 00:27:22,470 --> 00:27:23,980 We did 3.01 squared. 428 00:27:23,980 --> 00:27:26,300 Actually, right there. 429 00:27:26,300 --> 00:27:30,970 So if I take away the 9.06, the F of a is-- well, that was 430 00:27:30,970 --> 00:27:32,330 the whole point. 431 00:27:32,330 --> 00:27:34,910 That it was pretty darn close. 432 00:27:34,910 --> 00:27:37,750 But nothing compared to the closeness we're going to get 433 00:27:37,750 --> 00:27:39,600 at the second term. 434 00:27:39,600 --> 00:27:40,850 And what's F prime of a? 435 00:27:44,420 --> 00:27:46,650 Take the derivative 2x. 436 00:27:46,650 --> 00:27:49,350 At the point a it's 2a. 437 00:27:49,350 --> 00:27:52,560 And a is now 3.01. 438 00:27:52,560 --> 00:27:56,030 So the slope is 6.02. 439 00:27:56,030 --> 00:27:57,720 You see what I'm doing. 440 00:27:57,720 --> 00:28:05,310 I'm just moving over to this point, which that has become 441 00:28:05,310 --> 00:28:10,470 now the a in the second try. 442 00:28:10,470 --> 00:28:13,230 a in the second cycle of Newton's method. 443 00:28:13,230 --> 00:28:15,760 This is how Newton's method really is used. 444 00:28:15,760 --> 00:28:21,170 And now let's find the new x, the highly improved 445 00:28:21,170 --> 00:28:24,470 x, better than 3.01. 446 00:28:24,470 --> 00:28:29,190 So Newton's method says x, the new x, minus a. 447 00:28:29,190 --> 00:28:32,160 I'm just using Newton's formula. 448 00:28:32,160 --> 00:28:37,280 x minus the a is supposed to be minus the F of a. 449 00:28:37,280 --> 00:28:47,340 So that's 0.0001 divided by F prime of a, 6.02. 450 00:28:47,340 --> 00:28:50,330 This is the delta x you could say. 451 00:28:50,330 --> 00:28:52,000 This is the little correction. 452 00:28:52,000 --> 00:28:52,810 It's negative. 453 00:28:52,810 --> 00:28:55,890 It means that we need to pull back a little. 454 00:28:55,890 --> 00:28:57,130 And you see that. 455 00:28:57,130 --> 00:29:02,260 We slightly, slightly overshot by following the tangent line. 456 00:29:02,260 --> 00:29:05,050 The curve went up a little across 0 a little before the 457 00:29:05,050 --> 00:29:07,020 tangent line. 458 00:29:07,020 --> 00:29:08,770 This is extremely close. 459 00:29:08,770 --> 00:29:17,980 So now this gives me the new x right here, 3.01 minus this 460 00:29:17,980 --> 00:29:20,360 tiny little bit. 461 00:29:20,360 --> 00:29:25,170 And so that's what the calculator will do. 462 00:29:25,170 --> 00:29:27,120 I hope you'll do it on a calculator. 463 00:29:27,120 --> 00:29:31,740 Just make the calculator take that quantity, then 464 00:29:31,740 --> 00:29:33,030 make it square it. 465 00:29:35,610 --> 00:29:38,740 Then just go through this. 466 00:29:38,740 --> 00:29:39,910 Find the new x. 467 00:29:39,910 --> 00:29:40,530 Square it. 468 00:29:40,530 --> 00:29:41,840 Subtract 9.06. 469 00:29:41,840 --> 00:29:43,560 Let's see how close it is. 470 00:29:43,560 --> 00:29:45,260 I believe that the error-- 471 00:29:48,450 --> 00:29:51,430 I don't know what it is. 472 00:29:51,430 --> 00:29:55,930 That's more than I can do in my head, squaring that 3.01 473 00:29:55,930 --> 00:29:57,880 minus this little tiny bit. 474 00:29:57,880 --> 00:30:07,590 But I am confident that the error, the x new squared. 475 00:30:07,590 --> 00:30:13,010 This is the formula for x new, the second 476 00:30:13,010 --> 00:30:15,570 cycle of Newton's method. 477 00:30:15,570 --> 00:30:21,340 I think that minus the 9.06, I don't know-- 478 00:30:21,340 --> 00:30:22,915 can I just put a bunch of zeros? 479 00:30:28,010 --> 00:30:30,270 Somebody will want me to put in a 1 here, so 480 00:30:30,270 --> 00:30:32,410 I'll put in a 1. 481 00:30:32,410 --> 00:30:35,320 I bet it's way out there. 482 00:30:35,320 --> 00:30:38,480 So Newton's method is really a terrific success. 483 00:30:38,480 --> 00:30:41,370 Follow the line, then follow the next tangent line. 484 00:30:41,370 --> 00:30:46,260 Then follow the next one and you home in very, very quickly 485 00:30:46,260 --> 00:30:48,560 on the exact answer. 486 00:30:48,560 --> 00:30:52,400 You get more and more decimal places correct. 487 00:30:52,400 --> 00:30:55,630 OK, that's two uses of calculus coming 488 00:30:55,630 --> 00:30:58,080 from the same idea. 489 00:30:58,080 --> 00:31:02,120 The same idea delta f over delta x. 490 00:31:02,120 --> 00:31:06,070 In one case, it was f that we didn't know. 491 00:31:06,070 --> 00:31:09,440 In this case, it was x that we didn't know. 492 00:31:09,440 --> 00:31:13,390 In both cases that formula gives a terrific and a 493 00:31:13,390 --> 00:31:18,010 terrifically simple and close approximation 494 00:31:18,010 --> 00:31:20,030 to the exact answer. 495 00:31:20,030 --> 00:31:21,210 Good. 496 00:31:21,210 --> 00:31:23,290 Thank you very much. 497 00:31:23,290 --> 00:31:25,100 ANNOUNCER: This has been a production of MIT 498 00:31:25,100 --> 00:31:27,490 OpenCourseWare and Gilbert Strang. 499 00:31:27,490 --> 00:31:29,760 Funding for this video was provided by the Lord 500 00:31:29,760 --> 00:31:30,980 Foundation. 501 00:31:30,980 --> 00:31:34,110 To help OCW continue to provide free and open access 502 00:31:34,110 --> 00:31:37,190 to MIT courses, please make a donation at 503 00:31:37,190 --> 00:31:38,750 ocw.mit.edu/donate.