1 00:00:00,660 --> 00:00:02,930 In the last video, we took the Maclaurin series 2 00:00:02,930 --> 00:00:04,180 of cosine of x. 3 00:00:04,180 --> 00:00:06,670 We approximated it using this polynomial. 4 00:00:06,670 --> 00:00:08,560 And we saw this pretty interesting pattern. 5 00:00:08,560 --> 00:00:10,310 Let's see if we can find a similar pattern 6 00:00:10,310 --> 00:00:14,360 if we try to approximate sine of x using a Maclaurin series. 7 00:00:14,360 --> 00:00:16,000 And once again, a Maclaurin series 8 00:00:16,000 --> 00:00:18,240 is really the same thing as a Taylor series, 9 00:00:18,240 --> 00:00:20,800 where we are centering our approximation 10 00:00:20,800 --> 00:00:23,740 around x is equal to 0. 11 00:00:23,740 --> 00:00:26,830 So it's just a special case of a Taylor series. 12 00:00:26,830 --> 00:00:29,870 So let's take f of x in this situation 13 00:00:29,870 --> 00:00:31,410 to be equal to sine of x. 14 00:00:36,380 --> 00:00:38,890 And let's do the same thing that we did with cosine of x. 15 00:00:38,890 --> 00:00:40,598 Let's just take the different derivatives 16 00:00:40,598 --> 00:00:42,450 of sine of x really fast. 17 00:00:42,450 --> 00:00:46,240 So if you have the first derivative of sine of x, 18 00:00:46,240 --> 00:00:48,490 is just cosine of x. 19 00:00:48,490 --> 00:00:51,160 The second derivative of the sine of x 20 00:00:51,160 --> 00:00:55,880 is the derivative of cosine of x, which is negative sine of x. 21 00:00:55,880 --> 00:00:58,790 The third derivative is going to be the derivative of this. 22 00:00:58,790 --> 00:01:00,437 So I'll just write a 3 in parentheses 23 00:01:00,437 --> 00:01:02,270 there, instead of doing prime, prime, prime. 24 00:01:02,270 --> 00:01:04,310 So the third derivative is the derivative 25 00:01:04,310 --> 00:01:07,790 of this, which is negative cosine of x. 26 00:01:07,790 --> 00:01:11,570 The fourth derivative is the derivative 27 00:01:11,570 --> 00:01:15,020 of this, which is positive sine of x again. 28 00:01:15,020 --> 00:01:17,950 So you see, just like cosine of x, it kind of cycles 29 00:01:17,950 --> 00:01:19,990 after you take the derivative enough times. 30 00:01:19,990 --> 00:01:22,550 And we care-- in order to do the Maclaurin, series-- we care 31 00:01:22,550 --> 00:01:26,840 about evaluating the function, and each of these derivatives 32 00:01:26,840 --> 00:01:28,450 at x is equal to 0. 33 00:01:28,450 --> 00:01:30,220 So let's do that. 34 00:01:30,220 --> 00:01:32,510 So for this, let me do this in a different color, not 35 00:01:32,510 --> 00:01:34,030 that same blue. 36 00:01:34,030 --> 00:01:36,320 I'll do it in this purple color. 37 00:01:36,320 --> 00:01:38,810 So f-- that's hard to see, I think 38 00:01:38,810 --> 00:01:40,930 So let's do this other blue color. 39 00:01:40,930 --> 00:01:45,620 So f of 0, in this situation, is 0. 40 00:01:45,620 --> 00:01:50,280 And f, the first derivative evaluated at 0, is 1. 41 00:01:50,280 --> 00:01:52,880 Cosine of 0 is 1. 42 00:01:52,880 --> 00:01:57,300 Negative sine of 0 is going to be 0. 43 00:01:57,300 --> 00:02:01,210 So f prime prime, the second derivative evaluated at 0 is 0. 44 00:02:01,210 --> 00:02:06,335 The third derivative evaluated at 0 is negative 1. 45 00:02:06,335 --> 00:02:08,411 Cosine of 0 is 1. 46 00:02:08,411 --> 00:02:09,660 You have a negative out there. 47 00:02:09,660 --> 00:02:10,850 It is negative 1. 48 00:02:10,850 --> 00:02:14,850 And then the fourth derivative evaluated at 0 49 00:02:14,850 --> 00:02:16,594 is going to be 0 again. 50 00:02:16,594 --> 00:02:18,385 And we could keep going, but once again, it 51 00:02:18,385 --> 00:02:19,593 seems like there's a pattern. 52 00:02:19,593 --> 00:02:21,130 0, 1, 0, negative 1, 0, then you're 53 00:02:21,130 --> 00:02:22,920 going to go back to positive 1. 54 00:02:22,920 --> 00:02:24,750 So on and so forth. 55 00:02:24,750 --> 00:02:28,230 So let's find its polynomial representation 56 00:02:28,230 --> 00:02:29,510 using the Maclaurin series. 57 00:02:29,510 --> 00:02:31,380 And just a reminder, this one up here, 58 00:02:31,380 --> 00:02:34,210 this was approximately cosine of x. 59 00:02:34,210 --> 00:02:36,220 And you'll get closer and closer to cosine of x. 60 00:02:36,220 --> 00:02:37,960 I'm not rigorously showing you how 61 00:02:37,960 --> 00:02:40,760 close, in that it's definitely the exact same thing as cosine 62 00:02:40,760 --> 00:02:42,710 of x, but you get closer and closer and closer 63 00:02:42,710 --> 00:02:44,975 to cosine of x as you keep adding terms here. 64 00:02:44,975 --> 00:02:46,350 And if you go to infinity, you're 65 00:02:46,350 --> 00:02:48,920 going to be pretty much at cosine of x. 66 00:02:48,920 --> 00:02:51,490 Now let's do the same thing for sine of x. 67 00:02:51,490 --> 00:02:52,960 So I'll pick a new color. 68 00:02:52,960 --> 00:02:54,980 This green should be nice. 69 00:02:54,980 --> 00:02:56,820 So this is our new p of x. 70 00:02:56,820 --> 00:02:58,590 So this is approximately going to be 71 00:02:58,590 --> 00:03:01,600 sine of x, as we add more and more terms. 72 00:03:01,600 --> 00:03:06,820 And so the first term here, f of 0, that's just going to be 0. 73 00:03:06,820 --> 00:03:09,050 So we're not even going to need to include that. 74 00:03:09,050 --> 00:03:11,090 The next term is going to be f prime 75 00:03:11,090 --> 00:03:13,800 of 0, which is 1, times x. 76 00:03:13,800 --> 00:03:15,880 So it's going to be x. 77 00:03:15,880 --> 00:03:18,450 Then the next term is f prime, the second derivative 78 00:03:18,450 --> 00:03:21,220 at 0, which we see here is 0. 79 00:03:21,220 --> 00:03:23,020 Let me scroll down a little bit. 80 00:03:23,020 --> 00:03:24,340 It is 0. 81 00:03:24,340 --> 00:03:26,610 So we won't have the second term. 82 00:03:26,610 --> 00:03:29,590 This third term right here, the third derivative 83 00:03:29,590 --> 00:03:32,920 of sine of x evaluated at 0, is negative 1. 84 00:03:32,920 --> 00:03:36,830 So we're now going to have a negative 1. 85 00:03:36,830 --> 00:03:39,490 Let me scroll down so you can see this. 86 00:03:39,490 --> 00:03:42,240 Negative 1-- this is negative 1 in this case-- 87 00:03:42,240 --> 00:03:45,505 times x to the third over 3 factorial. 88 00:03:50,880 --> 00:03:52,860 And then the next term is going to be 0, 89 00:03:52,860 --> 00:03:55,850 because that's the fourth derivative. 90 00:03:55,850 --> 00:03:59,660 The fourth derivative evaluated at 0 is the next coefficient. 91 00:03:59,660 --> 00:04:03,052 We see that that is going to be 0, so it's going to drop off. 92 00:04:03,052 --> 00:04:04,510 And what you're going to see here-- 93 00:04:04,510 --> 00:04:06,825 and actually maybe I haven't done enough terms for you, 94 00:04:06,825 --> 00:04:08,300 for you to feel good about this. 95 00:04:08,300 --> 00:04:10,330 Let me do one more term right over here. 96 00:04:10,330 --> 00:04:12,690 Just so it becomes clear. 97 00:04:12,690 --> 00:04:15,450 f of the fifth derivative of x is 98 00:04:15,450 --> 00:04:17,440 going to be cosine of x again. 99 00:04:17,440 --> 00:04:20,209 The fifth derivative-- we'll do it in that same color, 100 00:04:20,209 --> 00:04:27,180 just so it's consistent-- the fifth derivative evaluated at 0 101 00:04:27,180 --> 00:04:29,570 is going to be 1. 102 00:04:29,570 --> 00:04:33,470 So the fourth derivative evaluated at 0 is 0, 103 00:04:33,470 --> 00:04:36,860 then you go to the fifth derivative evaluated at 0, 104 00:04:36,860 --> 00:04:38,814 it's going to be positive 1. 105 00:04:38,814 --> 00:04:40,730 And if I kept doing this, it would be positive 106 00:04:40,730 --> 00:04:44,440 1-- I have to write the 1 as the coefficient-- times x 107 00:04:44,440 --> 00:04:47,770 to the fifth over 5 factorial. 108 00:04:47,770 --> 00:04:50,530 So there's something interesting going on here. 109 00:04:50,530 --> 00:04:55,500 For cosine of x, I had 1, essentially 1 times x to the 0. 110 00:04:55,500 --> 00:04:58,420 Then I don't have x to the first power. 111 00:04:58,420 --> 00:05:00,240 I don't have x to the odd powers, actually. 112 00:05:00,240 --> 00:05:02,830 And then I just essentially have x to all of the even powers. 113 00:05:02,830 --> 00:05:06,650 And whatever power it is, I'm dividing it by that factorial. 114 00:05:06,650 --> 00:05:09,400 And then the sines keep switching. 115 00:05:09,400 --> 00:05:12,300 I shouldn't say this is an even power, because 0 really isn't. 116 00:05:12,300 --> 00:05:14,440 Well, I guess you can view it as an even number, 117 00:05:14,440 --> 00:05:17,540 because-- well I won't go into all of that. 118 00:05:17,540 --> 00:05:22,440 But it's essentially 0, 2, 4, 6, so on and so forth. 119 00:05:22,440 --> 00:05:24,200 So this is interesting, especially 120 00:05:24,200 --> 00:05:25,440 when you compare to this. 121 00:05:25,440 --> 00:05:26,760 This is all of the odd powers. 122 00:05:26,760 --> 00:05:29,060 This is x to the first over 1 factorial. 123 00:05:29,060 --> 00:05:30,300 I didn't write it here. 124 00:05:30,300 --> 00:05:32,580 This is x to the third over 3 factorial 125 00:05:32,580 --> 00:05:34,477 plus x to the fifth over 5 factorial. 126 00:05:34,477 --> 00:05:35,810 Yeah, 0 would be an even number. 127 00:05:35,810 --> 00:05:39,830 Anyway, my brain is in a different place right now. 128 00:05:39,830 --> 00:05:40,890 And you could keep going. 129 00:05:40,890 --> 00:05:43,190 If we kept this process up, you would then 130 00:05:43,190 --> 00:05:44,280 keep switching sines. 131 00:05:44,280 --> 00:05:48,200 X to the seventh over 7 factorial plus x 132 00:05:48,200 --> 00:05:49,527 to the ninth over 9 factorial. 133 00:05:49,527 --> 00:05:51,110 So there's something interesting here. 134 00:05:51,110 --> 00:05:55,280 You once again see this kind of complimentary nature 135 00:05:55,280 --> 00:05:56,930 between sine and cosine here. 136 00:05:56,930 --> 00:05:58,630 You see almost this-- they're kind 137 00:05:58,630 --> 00:06:00,960 of filling each other's gaps over here. 138 00:06:00,960 --> 00:06:03,220 Cosine of x is all of the even powers 139 00:06:03,220 --> 00:06:05,680 of x divided by that power's factorial. 140 00:06:05,680 --> 00:06:08,310 Sine of x, when you take its polynomial representation, 141 00:06:08,310 --> 00:06:12,470 is all of the odd powers of x divided by its factorial, 142 00:06:12,470 --> 00:06:14,100 and you switch sines. 143 00:06:14,100 --> 00:06:16,640 In the next video, I'll do e to the x. 144 00:06:16,640 --> 00:06:18,660 And what's really fascinating is that e 145 00:06:18,660 --> 00:06:22,310 to the x starts to look like a little bit of a combination 146 00:06:22,310 --> 00:06:24,050 here, but not quite. 147 00:06:24,050 --> 00:06:25,790 And you really do get the combination 148 00:06:25,790 --> 00:06:28,310 when you involve imaginary numbers. 149 00:06:28,310 --> 00:06:32,860 And that's when it starts to get really, really mind blowing.