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