1 00:00:00,370 --> 00:00:01,510 Approximation. mmm. 2 00:00:08,110 --> 00:00:10,660 Way back in Calculus 1, we were finding 3 00:00:10,660 --> 00:00:14,620 linear approximations for a function near a point a. 4 00:00:14,620 --> 00:00:15,470 Well how did that go? 5 00:00:15,470 --> 00:00:21,590 Well it look like this, f was x is approximately f of a, 6 00:00:21,590 --> 00:00:27,600 right now linear approximation around the point a plus the derivative at a 7 00:00:27,600 --> 00:00:33,310 times how much the input has to change to go from a to x, so times x 8 00:00:33,310 --> 00:00:36,940 minus a. And why does this make sense? 9 00:00:36,940 --> 00:00:40,510 Well, the derivative is recording infinitesimally how the 10 00:00:40,510 --> 00:00:43,480 output changes as the input changes, so if 11 00:00:43,480 --> 00:00:48,340 I take the ratio of output change to input change and multiply by the input change. 12 00:00:48,340 --> 00:00:50,690 This is approximately the output change. 13 00:00:50,690 --> 00:00:54,210 Then I'm adding it to the output at the point a, 14 00:00:54,210 --> 00:00:57,690 and that'll give me about the value of the function at x. 15 00:00:57,690 --> 00:00:58,480 But let me put a little different 16 00:00:58,480 --> 00:00:59,860 spin on this. 17 00:00:59,860 --> 00:01:02,150 Instead of thinking about, you know, what the derivative 18 00:01:02,150 --> 00:01:06,750 means, the sub-ratio between output values and input values. 19 00:01:06,750 --> 00:01:09,310 Let's just think a little more naively, let's just think that 20 00:01:09,310 --> 00:01:12,220 I'm trying to write down a function which has the same 21 00:01:12,220 --> 00:01:15,950 value as my function f at the point a and which 22 00:01:15,950 --> 00:01:19,790 has the same derivative as my function f at the point a. 23 00:01:19,790 --> 00:01:21,430 We'll talk about this a little more precisely, 24 00:01:21,430 --> 00:01:24,550 let me give a name to this linear approximation. 25 00:01:24,550 --> 00:01:27,050 Let's call that g of x. 26 00:01:27,050 --> 00:01:34,410 So g of x will be f of a plus f prime of a times x minus a. 27 00:01:34,410 --> 00:01:39,270 Now, what do I know about this function g? Well, what's the value of g at a? 28 00:01:39,270 --> 00:01:43,200 Alright, what happens if I plug in a for x? 29 00:01:43,200 --> 00:01:44,650 Well then I've got a minus a. 30 00:01:44,650 --> 00:01:48,130 This is 0 in that case, so this whole term is 0. 31 00:01:48,130 --> 00:01:49,570 So g of a is just 32 00:01:49,570 --> 00:01:55,670 this, f of a. And what's the derivative of g at a? 33 00:01:56,680 --> 00:01:59,020 Well what's just the derivative of g? Alright. 34 00:01:59,020 --> 00:02:03,910 Well it's the derivative of this constant which is 0 plus the derivative of this. 35 00:02:03,910 --> 00:02:07,490 This is a constant so it's f prime of a times the 36 00:02:07,490 --> 00:02:10,910 derivative of this, but what's the derivative of this with respect to x? 37 00:02:10,910 --> 00:02:14,650 It's just 1. So the derivative of g regardless of what 38 00:02:14,650 --> 00:02:19,440 x is, is just the derivative of f at a. So look. 39 00:02:19,440 --> 00:02:24,920 The function g here is a function whose value at a is equal to the 40 00:02:24,920 --> 00:02:31,180 value of f at a and whose derivative at a is equal to the derivative of f at a. 41 00:02:31,180 --> 00:02:32,470 I can do better. 42 00:02:32,470 --> 00:02:35,620 So I'm going to define a new function. I'm also going to call it g. 43 00:02:35,620 --> 00:02:40,200 But it's going to be defined this way. So g of x 44 00:02:40,200 --> 00:02:46,330 will be defined as follows. G of x will be f of a plus 45 00:02:46,330 --> 00:02:52,370 the derivative of f at a times x minus a. 46 00:02:52,370 --> 00:02:54,480 So this is just the linear approximation to f at 47 00:02:54,480 --> 00:02:57,450 the point a, and I'm going to add an extra term. 48 00:02:57,450 --> 00:03:06,740 Plus, the second derivative of f at a divided by 2 times x minus a squared. 49 00:03:08,110 --> 00:03:09,910 Why is that a good idea? 50 00:03:09,910 --> 00:03:12,730 Well when I write it out like this, 51 00:03:12,730 --> 00:03:17,680 this new function g, has three really great properties. 52 00:03:17,680 --> 00:03:23,080 First of all, g at the point a is just equal to f of a. 53 00:03:23,080 --> 00:03:27,870 If I plug in an a for x, that kills this term, and this term. 54 00:03:27,870 --> 00:03:33,260 All that I'm left with is just f of a. Also, the derivative of 55 00:03:33,260 --> 00:03:38,920 g, at the point a, is equal to the derivative of f, at the point a. 56 00:03:38,920 --> 00:03:42,230 Now that would have been true even if I didn't have this extra term. 57 00:03:42,230 --> 00:03:47,740 But, by including this extra term, it also turns out that the second derivative 58 00:03:47,740 --> 00:03:53,660 of g at the point a is equal to the second derivative of f at the point a. 59 00:03:53,660 --> 00:03:56,000 Now, I mean actually, the second derivative of 60 00:03:56,000 --> 00:03:58,340 g at any point is equal to the second 61 00:03:58,340 --> 00:04:02,330 derivative of f at the point a. But in particular, this is true. 62 00:04:02,330 --> 00:04:06,720 So I've written down a function that not only has the same value as 63 00:04:06,720 --> 00:04:10,480 f does at a, not only has the same derivative as f does at a. 64 00:04:10,480 --> 00:04:14,210 But also has the same second derivative as f does at a. 65 00:04:14,210 --> 00:04:16,920 And, I can just keep on going. 66 00:04:16,920 --> 00:04:17,770 So, here we go. 67 00:04:17,770 --> 00:04:21,125 I'm going to define yet another function that I'll again call g of x. 68 00:04:21,125 --> 00:04:22,890 It's going to start out the exact same way. 69 00:04:22,890 --> 00:04:23,490 It's going to 70 00:04:23,490 --> 00:04:29,240 start out with f of a plus the derivative of f. 71 00:04:29,240 --> 00:04:32,260 At the point a times x minus a. 72 00:04:32,260 --> 00:04:36,110 So this is just the linear approximation to f that we're used to. 73 00:04:36,110 --> 00:04:37,660 Then, last time I added just one more 74 00:04:37,660 --> 00:04:39,410 term, I'm going to add that term again, the 75 00:04:39,410 --> 00:04:47,210 second derivative of f, at the point a divided by 2 times x minus a squared. 76 00:04:47,210 --> 00:04:48,780 But I'll add another term. 77 00:04:48,780 --> 00:04:50,040 I'm going to add this term. 78 00:04:50,040 --> 00:04:52,710 The third derivative of the function f at the 79 00:04:52,710 --> 00:04:57,570 point a divided by 6 times x minus a cubed. 80 00:04:58,780 --> 00:05:01,550 Now the idea here is that this function g is going to 81 00:05:01,550 --> 00:05:05,850 turn out to agree with the function f at the point a. 82 00:05:05,850 --> 00:05:08,800 It's also going to have the same derivative 83 00:05:08,800 --> 00:05:10,570 as the function f at the point a. 84 00:05:10,570 --> 00:05:14,000 It's also going to have the same second derivative as the function 85 00:05:14,000 --> 00:05:16,810 f at the point a, and it's going to have the 86 00:05:16,810 --> 00:05:21,040 same third derivative as the function f at the point a. 87 00:05:21,040 --> 00:05:24,700 Now to see this all I have to do is differentiate. 88 00:05:24,700 --> 00:05:30,390 Before I differentiate let me just point out that g of a is equal to what? 89 00:05:30,390 --> 00:05:35,750 Well if I plug in a for x, that kills this term, this term, and this term. 90 00:05:35,750 --> 00:05:36,920 These are all 0. 91 00:05:36,920 --> 00:05:39,400 So the only thing that's left is f 92 00:05:39,400 --> 00:05:40,770 of a. Now. 93 00:05:40,770 --> 00:05:43,260 Let's try differentiating. Let's differentiate this once. 94 00:05:43,260 --> 00:05:46,590 What's the derivative of g? 95 00:05:46,590 --> 00:05:49,135 Well the differentiate g is going to differentiate this. 96 00:05:49,135 --> 00:05:54,190 So the derivative of this constant is zero, the derivative of this constant 97 00:05:54,190 --> 00:05:59,580 times x minus a, well that's the constant f prime of a times the derivative 98 00:05:59,580 --> 00:06:04,700 of x minus a which is one. Plus what's the derivative of this term? 99 00:06:04,700 --> 00:06:09,960 Well that's this constant. F double prime of f at a divided 100 00:06:09,960 --> 00:06:14,940 by 2 times the derivative of x minus a squared, which is 101 00:06:14,940 --> 00:06:20,220 2 times x minus a, times the derivative of the inside, which is just 1. 102 00:06:20,220 --> 00:06:23,730 Alright, and then I gotta add the derivative of this term. 103 00:06:23,730 --> 00:06:25,770 Well, that's this constant. 104 00:06:25,770 --> 00:06:30,120 F triple prime at the point a divided by 6 times 105 00:06:30,120 --> 00:06:31,610 the derivative of this. 106 00:06:31,610 --> 00:06:34,800 Which is 3 times x minus a squared times 107 00:06:34,800 --> 00:06:36,890 the derivative of the inside, which is just 1. 108 00:06:36,890 --> 00:06:40,320 And now, what happens if I plug in a. 109 00:06:41,570 --> 00:06:45,150 What is g prime at a? 110 00:06:45,150 --> 00:06:47,670 Well this term and this term both have an x minus 111 00:06:47,670 --> 00:06:50,340 a so they die the only thing that survives is this. 112 00:06:50,340 --> 00:06:55,230 So the derivative of the function g at the point a is the same 113 00:06:55,230 --> 00:06:58,150 as the derivative of the function f at the point a. 114 00:06:58,150 --> 00:06:59,490 Now what about the second derivative? 115 00:06:59,490 --> 00:07:03,848 I've just got to differentiate this again. So what's g double prime of x? 116 00:07:03,848 --> 00:07:05,470 Well I don't need to differentiate the zero, that's 117 00:07:05,470 --> 00:07:09,820 just zero, this is a constant so that's also zero. 118 00:07:09,820 --> 00:07:11,480 What's the derivative of this? 119 00:07:11,480 --> 00:07:14,270 Well it's this which is just f double prime of 120 00:07:14,270 --> 00:07:17,600 a, times the derivative of x minus a which is 1. 121 00:07:17,600 --> 00:07:20,640 And then what's the derivative of this? 122 00:07:20,640 --> 00:07:26,050 Well it's this constant which is f triple prime at a divided by 2, 123 00:07:26,050 --> 00:07:31,690 times the derivative of x minus a squared. Which is 2 124 00:07:31,690 --> 00:07:37,710 times x minus a times the derivative of the inside, which is just 1. 125 00:07:37,710 --> 00:07:42,270 Now, what is this when I plug in a for x? 126 00:07:42,270 --> 00:07:46,450 All right, what's g double prime at the point a? 127 00:07:46,450 --> 00:07:49,700 Well, when I plug in a for x, that kills 128 00:07:49,700 --> 00:07:52,760 this term, and the only thing that survives is this. 129 00:07:52,760 --> 00:07:56,490 So the 2nd derivative of the function g at the point a 130 00:07:56,490 --> 00:07:59,750 is the same as the 2nd derivative of f at the point a. 131 00:07:59,750 --> 00:08:01,200 Now, what about the 3rd derivative? 132 00:08:01,200 --> 00:08:03,310 Well, then, I just gotta differentiate this. 133 00:08:03,310 --> 00:08:06,840 So, what's g triple prime at x? 134 00:08:06,840 --> 00:08:11,790 Well, it's 0 plus 0 plus the derivative of this constant is 0. 135 00:08:11,790 --> 00:08:13,680 Plus the derivative of this term. 136 00:08:13,680 --> 00:08:16,870 Well, that's this constant times the derivative of x minus a. 137 00:08:16,870 --> 00:08:20,980 Well, this constant is just f triple prime at a 138 00:08:20,980 --> 00:08:24,180 times the derivative of x minus a which is just one. 139 00:08:25,250 --> 00:08:31,820 So, the third derivative of g at the point a is equal to 140 00:08:31,820 --> 00:08:37,040 the third derivative of F at the point A. So this cubic polynomial not only 141 00:08:37,040 --> 00:08:40,840 matches the function's value, but it also matches the first, second 142 00:08:40,840 --> 00:08:44,550 and third derivative of the function f at the point a. 143 00:08:44,550 --> 00:08:46,710 Let me make this more concrete. 144 00:08:46,710 --> 00:08:51,200 Let me apply this to a specific function. Here's a specific example. 145 00:08:51,200 --> 00:08:56,260 Let's apply this to the function f of x equals sine x. 146 00:08:56,260 --> 00:08:59,030 I'm going to differentiate sine a bunch of times. 147 00:08:59,030 --> 00:09:03,200 So the derivative of sine is cosine. 148 00:09:04,480 --> 00:09:07,760 The second derivative of sine, the derivative of 149 00:09:07,760 --> 00:09:11,740 cosine, is minus sine, so that if we choke. 150 00:09:11,740 --> 00:09:14,836 What's the third derivative of sine, what's the 151 00:09:14,836 --> 00:09:18,730 derivative of minus sine, that's negative cosine x. 152 00:09:18,730 --> 00:09:21,400 Now let's evaluate those at zero. 153 00:09:21,400 --> 00:09:27,440 Well the function's value at zero and what's sine at zero, that's zero. 154 00:09:27,440 --> 00:09:29,730 What's the derivative at zero? 155 00:09:29,730 --> 00:09:34,420 What's co sin at zero, that's one. What's the second derivative at zero? 156 00:09:34,420 --> 00:09:37,750 Well, that's negative sine of zero, that's zero. 157 00:09:37,750 --> 00:09:39,970 What's the third derivative at zero? 158 00:09:39,970 --> 00:09:43,390 Well, that's negative cosine of zero, that's negative one. 159 00:09:43,390 --> 00:09:45,020 Now I've got all the pieces ready. 160 00:09:45,020 --> 00:09:48,190 I'm ready to write down a polynomial that has the same value, 161 00:09:48,190 --> 00:09:51,980 the same derivative, the same second derivative, and the same third derivative. 162 00:09:51,980 --> 00:09:54,075 As sine does at the point zero. 163 00:09:54,075 --> 00:09:58,730 Well in this case, g of x is what? 164 00:09:58,730 --> 00:10:04,920 Well if the function's value is zero, which is zero, plus the derivative of 165 00:10:04,920 --> 00:10:11,320 zero, which is one, times x minus a, which is just x plus 166 00:10:11,320 --> 00:10:18,040 the second derivative at 0, which is 0 divided by 2 times x minus a squared, 167 00:10:19,670 --> 00:10:23,480 plus the third derivative of the function at 0, which 168 00:10:23,480 --> 00:10:29,360 is negative 1, divided by 6 times x minus a cubed. 169 00:10:29,360 --> 00:10:34,100 And the a is 0 in this case, so just x cubed. 170 00:10:34,100 --> 00:10:39,745 I can simplify that a bit. We'll now just get zero, I don't have to 171 00:10:39,745 --> 00:10:46,290 write that down, x which is just zero minus x cubed over six. 172 00:10:46,290 --> 00:10:49,965 So there is my cubic polynomial. So this is pretty great. 173 00:10:49,965 --> 00:10:54,510 I've got this polynomial and it's supposed to be a pretty good approximation to sine. 174 00:10:54,510 --> 00:10:57,510 We'll let's take a look at a graph of sign just to get an idea 175 00:10:57,510 --> 00:11:01,490 just to get an idea of just how good an approximation this polynomial really is. 176 00:11:01,490 --> 00:11:04,320 Well, here's a graph of the function y equals sin of x. 177 00:11:04,320 --> 00:11:06,810 It has that familiar sinasoidal shape. 178 00:11:06,810 --> 00:11:08,954 Let me super impose on this, the graph 179 00:11:08,954 --> 00:11:12,900 of the cubic polynomial that we've been studying. 180 00:11:12,900 --> 00:11:15,010 Here's that that cubic polynomial. 181 00:11:15,010 --> 00:11:20,680 This thick, green curve is the graph of y equals x minus x cubed over six. 182 00:11:20,680 --> 00:11:22,520 And remember how I got this polynomial. 183 00:11:22,520 --> 00:11:25,940 This polynomial is rigged so that the value of this polynomial 184 00:11:25,940 --> 00:11:28,570 at zero is the same as the value of sine at zero. 185 00:11:28,570 --> 00:11:31,040 The derivative of this polynomial at zero is 186 00:11:31,040 --> 00:11:33,370 the same as the derivative of sine at zero. 187 00:11:33,370 --> 00:11:35,840 Same goes for the second derivative and the third derivative, right? 188 00:11:35,840 --> 00:11:37,910 If I differentiate this thing three times, I get 189 00:11:37,910 --> 00:11:41,190 the same thing as this, differentiated three times at zero. 190 00:11:43,160 --> 00:11:47,160 But it's interesting to note that even though I've rigged this polynomial only to 191 00:11:47,160 --> 00:11:52,040 match up with sine at zero at least in value for second or third derivative. 192 00:11:53,290 --> 00:11:56,120 This graph is sort of resembling sine. 193 00:11:56,120 --> 00:12:00,490 I mean, this green curve, especially around here, 194 00:12:00,490 --> 00:12:03,260 is a pretty good approximation to the graph 195 00:12:03,260 --> 00:12:04,080 of the sine function. 196 00:12:04,080 --> 00:12:06,010 I mean, it's obviously not great out here, 197 00:12:06,010 --> 00:12:08,760 but at least in here, it's looking pretty good. 198 00:12:08,760 --> 00:12:11,210 We can also look at this numerically. 199 00:12:11,210 --> 00:12:17,830 For example. Sine of a half a radion is approximately, 200 00:12:17,830 --> 00:12:24,550 to four decimal places, 0.4794, but what is 201 00:12:24,550 --> 00:12:28,730 this approximating function at one half? What's g 202 00:12:28,730 --> 00:12:30,340 of one half? 203 00:12:30,340 --> 00:12:35,700 Well, that's one half minus one half cubed over 6. 204 00:12:35,700 --> 00:12:38,600 Well that's one half minus what is this? 205 00:12:38,600 --> 00:12:42,290 That's one half to the third, that's an eighth 206 00:12:42,290 --> 00:12:46,530 or a sixth, that's one half minus a fourty-eighth. 207 00:12:46,530 --> 00:12:52,196 So instead of writing a half, I could write 24/48ths Minus a forty-eight. 208 00:12:52,196 --> 00:12:54,692 Well that's 23 forty-eights. 209 00:12:54,692 --> 00:13:00,448 Well what's 23 forty-eights? That's approximately 210 00:13:00,448 --> 00:13:06,680 0.4792. That is awfully close to sine of one half. 211 00:13:06,680 --> 00:13:08,430 And whether we're thinking graphically or 212 00:13:08,430 --> 00:13:11,840 numerically, we're seeing something significant here. 213 00:13:11,840 --> 00:13:16,440 Well way back in calculus 1, we thought about approximating a function like this. 214 00:13:16,440 --> 00:13:20,150 These linear approximations, but now we getting the idea 215 00:13:20,150 --> 00:13:21,728 that it'd be even better. 216 00:13:21,728 --> 00:13:24,550 To approximate f not just by a degree 217 00:13:24,550 --> 00:13:27,860 1 polynomial, but by a higher degree polynomial. 218 00:13:27,860 --> 00:13:31,540 And even better than polynomials are power series. 219 00:13:31,540 --> 00:13:32,140 Well, exactly. 220 00:13:32,140 --> 00:13:36,368 A power series is a lot like a polynomial that just keeps on going. 221 00:13:36,368 --> 00:13:40,208 So if a degree ten polynomial is doing better job than just 222 00:13:40,208 --> 00:13:45,248 a linear approximation, and if a degree of thousand polynomial would do an 223 00:13:45,248 --> 00:13:50,688 even better job, maybe the power series, if we just kept on going forever, we do 224 00:13:50,688 --> 00:13:56,129 such a good job that the function would actually be equal to some power series. 225 00:13:56,129 --> 00:13:58,343 That is a huge thing to hope for. 226 00:13:58,343 --> 00:14:00,979 But sometimes dreams come true. 227 00:14:00,979 --> 00:14:10,979 [SOUND]