1 00:00:00,000 --> 00:00:00,000 2 00:00:00,000 --> 00:00:08,620 PROFESSOR: Welcome back to recitation. 3 00:00:08,620 --> 00:00:10,760 In this video what I'd like us to do is 4 00:00:10,760 --> 00:00:12,350 practice Taylor series. 5 00:00:12,350 --> 00:00:14,800 So I want us to write the Taylor series for the 6 00:00:14,800 --> 00:00:18,850 following function, f of x equals 3x cubed plus 4x 7 00:00:18,850 --> 00:00:22,130 squared minus 2x plus 1. 8 00:00:22,130 --> 00:00:24,330 So why don't you pause the video, take some time to work 9 00:00:24,330 --> 00:00:27,680 on that, and then I'll come back and show you what I get. 10 00:00:27,680 --> 00:00:35,910 11 00:00:35,910 --> 00:00:37,400 All right, welcome back. 12 00:00:37,400 --> 00:00:40,000 Well we want to find the Taylor series for this 13 00:00:40,000 --> 00:00:43,160 polynomial f of x equals 3x cubed plus 4x squared 14 00:00:43,160 --> 00:00:44,860 minus 2x plus 1. 15 00:00:44,860 --> 00:00:47,933 So what I'm going to do is I'm just going to write down 16 00:00:47,933 --> 00:00:53,350 Taylor's, or the expression we have for the sum for the 17 00:00:53,350 --> 00:00:55,820 Taylor series in general and then I'm going to start 18 00:00:55,820 --> 00:00:59,220 computing what I need and I'm going to see what I get. 19 00:00:59,220 --> 00:01:00,650 So what do I need to remember? 20 00:01:00,650 --> 00:01:05,270 Well let's remind ourselves what the formula is. 21 00:01:05,270 --> 00:01:10,990 We should get f of x is equal to the sum from n equals 0 to 22 00:01:10,990 --> 00:01:17,920 infinity of the nth derivative of f at 0 over n factorial 23 00:01:17,920 --> 00:01:19,550 times x to the n. 24 00:01:19,550 --> 00:01:20,770 So that's what we want. 25 00:01:20,770 --> 00:01:24,120 So what I obviously need to start doing is figuring out 26 00:01:24,120 --> 00:01:26,440 derivatives of f at 0. 27 00:01:26,440 --> 00:01:28,790 And so what I'm going to do is I'm just going to make myself 28 00:01:28,790 --> 00:01:30,230 a little table. 29 00:01:30,230 --> 00:01:43,150 So let's see, we're going to say f0 at 0, f1 at 0, f2 at 0, 30 00:01:43,150 --> 00:01:46,810 f3 at 0, f4 at 0. 31 00:01:46,810 --> 00:01:48,070 And I'm getting tired of writing, so I'm 32 00:01:48,070 --> 00:01:49,750 going to stop there. 33 00:01:49,750 --> 00:01:52,520 OK, so let's take the function, the 0's derivative 34 00:01:52,520 --> 00:01:54,450 of f is just the function itself, so 35 00:01:54,450 --> 00:01:55,770 let's come back here. 36 00:01:55,770 --> 00:01:58,280 What is the function if I evaluate it at x 37 00:01:58,280 --> 00:02:02,250 equals 0, 0, 0, 1. 38 00:02:02,250 --> 00:02:03,500 I get 1. 39 00:02:03,500 --> 00:02:06,440 40 00:02:06,440 --> 00:02:07,460 All right. 41 00:02:07,460 --> 00:02:09,120 What is the first derivative? 42 00:02:09,120 --> 00:02:11,620 So I'm going to write out the first derivative and then I'm 43 00:02:11,620 --> 00:02:14,220 going to say I'm evaluating it at x equals 0. 44 00:02:14,220 --> 00:02:18,130 So the first derivative looks like it's 9x squared 45 00:02:18,130 --> 00:02:21,020 plus 8x minus 2. 46 00:02:21,020 --> 00:02:23,610 So I'm gonna write this down. 47 00:02:23,610 --> 00:02:28,340 9x squared plus 8x minus 2. 48 00:02:28,340 --> 00:02:31,800 Evaluate it at x equals 0, 0, 0. 49 00:02:31,800 --> 00:02:33,050 I get negative 2. 50 00:02:33,050 --> 00:02:36,680 51 00:02:36,680 --> 00:02:40,080 All right, well, let me take the second derivative. 52 00:02:40,080 --> 00:02:42,020 OK let's see what I get here. 53 00:02:42,020 --> 00:02:47,790 I get 18x plus 8. 54 00:02:47,790 --> 00:02:51,180 And I'm going to evaluate that at x equals 0. 55 00:02:51,180 --> 00:02:54,690 This is just a way to write, I'm going to evaluate what's 56 00:02:54,690 --> 00:02:57,100 here at x equal this number, so if you 57 00:02:57,100 --> 00:02:58,810 haven't seen that before. 58 00:02:58,810 --> 00:03:02,040 So I get 8. 59 00:03:02,040 --> 00:03:08,500 OK and then the third derivative is 18, oh just 18. 60 00:03:08,500 --> 00:03:10,710 Evaluate it at x equals 0. 61 00:03:10,710 --> 00:03:13,180 I get 18. 62 00:03:13,180 --> 00:03:14,640 And then the fourth derivative. 63 00:03:14,640 --> 00:03:16,230 What's the derivative of a constant function? 64 00:03:16,230 --> 00:03:18,710 It's 0. 65 00:03:18,710 --> 00:03:21,460 What do you think the fifth derivative is evaluated at 0? 66 00:03:21,460 --> 00:03:23,580 Looks like it'll be 0. 67 00:03:23,580 --> 00:03:25,190 You take the sixth derivative. 68 00:03:25,190 --> 00:03:29,940 Looks like everything bigger than 3, so the nth derivative 69 00:03:29,940 --> 00:03:37,770 at 0 is equal to 0 for n bigger than 3. 70 00:03:37,770 --> 00:03:41,270 So it looks like we should only have 4 terms in this. 71 00:03:41,270 --> 00:03:44,920 So that maybe seems a little weird, but let's keep going 72 00:03:44,920 --> 00:03:45,750 and see what happens. 73 00:03:45,750 --> 00:03:46,890 Let's start plugging things in. 74 00:03:46,890 --> 00:03:49,300 So again let's remember the formula. 75 00:03:49,300 --> 00:03:50,960 I'm going to walk over here to the right and I'm going to 76 00:03:50,960 --> 00:03:54,110 start using that formula and using these numbers that I 77 00:03:54,110 --> 00:03:56,300 have and writing it out. 78 00:03:56,300 --> 00:04:03,080 So the first term is going to be the function evaluated at 0 79 00:04:03,080 --> 00:04:05,930 divided by 0 factorial times 1. 80 00:04:05,930 --> 00:04:08,810 0 factorial is 1, so it's just going to be the function 81 00:04:08,810 --> 00:04:11,170 evaluated at 0 times 1. 82 00:04:11,170 --> 00:04:14,580 The function evaluated at 0, we said was 1, so that's the 83 00:04:14,580 --> 00:04:16,850 first term in the Taylor series. 84 00:04:16,850 --> 00:04:18,070 OK what's the next term? 85 00:04:18,070 --> 00:04:20,560 The next term remember is the first derivative evaluated at 86 00:04:20,560 --> 00:04:25,130 0 divided by 1 factorial, which is still 1, times x. 87 00:04:25,130 --> 00:04:28,170 So the first derivative, if I come back over here, evaluated 88 00:04:28,170 --> 00:04:30,750 at 0, I get negative 2. 89 00:04:30,750 --> 00:04:33,390 So I'm going to get minus 2x. 90 00:04:33,390 --> 00:04:36,390 91 00:04:36,390 --> 00:04:39,370 The next term, so I had zeroth derivative, first derivative, 92 00:04:39,370 --> 00:04:40,900 now I'm at the second derivative. 93 00:04:40,900 --> 00:04:41,840 Now it's getting confusing. 94 00:04:41,840 --> 00:04:43,430 I'm going to start writing the things above. 95 00:04:43,430 --> 00:04:46,320 The second derivative evaluated at 0 divided by 2 96 00:04:46,320 --> 00:04:48,280 factorial times x squared. 97 00:04:48,280 --> 00:04:49,725 That's what I should have here. 98 00:04:49,725 --> 00:04:50,820 Let's come over here. 99 00:04:50,820 --> 00:04:55,180 Second derivative evaluated at 0 was 8. 100 00:04:55,180 --> 00:04:59,280 So it's going to be 8 over 2, 'cause 2 101 00:04:59,280 --> 00:05:01,330 factorial is 2x squared. 102 00:05:01,330 --> 00:05:04,050 So it's going to be plus 4x squared. 103 00:05:04,050 --> 00:05:07,270 And then I have to have the third derivative evaluated at 104 00:05:07,270 --> 00:05:11,380 0 divided by 3 factorial times x cubed. 105 00:05:11,380 --> 00:05:12,130 What's 3 factorial? 106 00:05:12,130 --> 00:05:14,700 3 factorial is 6. 107 00:05:14,700 --> 00:05:16,760 What was the third derivative evaluated at 0? 108 00:05:16,760 --> 00:05:18,180 It was 18. 109 00:05:18,180 --> 00:05:20,680 18 divided by 6 is 3. 110 00:05:20,680 --> 00:05:22,940 So I get plus 3x cubed. 111 00:05:22,940 --> 00:05:26,660 And all the other terms were 0, so I'll just 112 00:05:26,660 --> 00:05:28,830 stop writing them. 113 00:05:28,830 --> 00:05:31,660 OK now if you watched the video all the way through 114 00:05:31,660 --> 00:05:35,210 here, at some point maybe you said "Christine this is 115 00:05:35,210 --> 00:05:37,440 madness." Well why is it madness? 116 00:05:37,440 --> 00:05:38,690 Because what is this? 117 00:05:38,690 --> 00:05:40,910 Well this is the function again, right? 118 00:05:40,910 --> 00:05:41,850 It's exactly what we started with. 119 00:05:41,850 --> 00:05:44,890 The order is opposite of what it was before 'cause now the 120 00:05:44,890 --> 00:05:49,500 powers go up instead of down, but it's the same polynomial. 121 00:05:49,500 --> 00:05:52,090 OK we talked about this briefly I think when we were 122 00:05:52,090 --> 00:05:54,370 doing some quadratic approximations. 123 00:05:54,370 --> 00:05:58,300 And I mentioned way back that quadratic approximations of 124 00:05:58,300 --> 00:06:03,620 polynomials at x equals 0 are just the polynomials again. 125 00:06:03,620 --> 00:06:06,270 This is the exact same kind of thing happening. 126 00:06:06,270 --> 00:06:08,090 Because what is the Taylor series? 127 00:06:08,090 --> 00:06:11,140 It's just better and better approximations as n gets 128 00:06:11,140 --> 00:06:12,300 larger and larger. 129 00:06:12,300 --> 00:06:16,630 So if I wanted to have a fourth order approximation of 130 00:06:16,630 --> 00:06:21,710 this function f of x at x equals 0, I would get the same 131 00:06:21,710 --> 00:06:22,660 function back. 132 00:06:22,660 --> 00:06:25,050 That's really the idea of what's happening here. 133 00:06:25,050 --> 00:06:28,460 So maybe you saw the sort of trick in this question, and 134 00:06:28,460 --> 00:06:31,250 when you saw this problem you laughed at me and you said, 135 00:06:31,250 --> 00:06:33,340 "Well I'm just going to write down the function again and 136 00:06:33,340 --> 00:06:36,040 I'll be done." Maybe you didn't see that right away, 137 00:06:36,040 --> 00:06:37,690 and if you didn't see that right away that's OK. 138 00:06:37,690 --> 00:06:39,150 I bet you're in good company. 139 00:06:39,150 --> 00:06:41,720 And it's totally fine because now you've seen this. 140 00:06:41,720 --> 00:06:44,050 You've seen how it works out. 141 00:06:44,050 --> 00:06:47,830 And you know, hey, now any time I see a polynomial and I 142 00:06:47,830 --> 00:06:50,830 want to do the Taylor series for this polynomial, I just 143 00:06:50,830 --> 00:06:53,130 have to write down the polynomial again. 144 00:06:53,130 --> 00:06:54,800 So that was the main goal of this video. 145 00:06:54,800 --> 00:06:57,760 It took us a long time to get there, but I think we got it. 146 00:06:57,760 --> 00:07:00,620 So the answer to the ultimate answer to the question of 147 00:07:00,620 --> 00:07:03,910 write the Taylor series of this function, it's just this 148 00:07:03,910 --> 00:07:05,950 function again. 149 00:07:05,950 --> 00:07:07,200 All right, that's where I'll stop. 150 00:07:07,200 --> 00:07:08,161