1 00:00:00,000 --> 00:00:00,670 2 00:00:00,670 --> 00:00:03,189 So where we left off in the last video, we kept trying to 3 00:00:03,189 --> 00:00:07,900 approximate this purple f of x with a polynomial. 4 00:00:07,900 --> 00:00:11,509 And we at first said we'll just make the polynomial a constant 5 00:00:11,509 --> 00:00:16,189 and set it -- it's just going to intersect f of 0 6 00:00:16,190 --> 00:00:17,880 at x is equal to 0. 7 00:00:17,879 --> 00:00:20,939 So that's a first -- you can kind of all think of it as a 8 00:00:20,940 --> 00:00:23,589 0 of order approximation of the function. 9 00:00:23,589 --> 00:00:26,230 Then we said, oh, what if not only do they intersect at x is 10 00:00:26,230 --> 00:00:28,920 equal to 0, but let's say that their slope is the same as x is 11 00:00:28,920 --> 00:00:31,140 equal to 0, and that's that approximation? 12 00:00:31,140 --> 00:00:32,469 And that's about as good as you're going to do with a 13 00:00:32,469 --> 00:00:35,019 line, especially as you get close to 0. 14 00:00:35,020 --> 00:00:36,820 And we said, OK, that's good, but what if their second 15 00:00:36,820 --> 00:00:37,649 derivative is the same? 16 00:00:37,649 --> 00:00:40,379 And that's where we ended up with -- we added 17 00:00:40,380 --> 00:00:41,690 this term here. 18 00:00:41,689 --> 00:00:44,359 And I hinted that we'll just keep doing this process. 19 00:00:44,359 --> 00:00:50,359 20 00:00:50,359 --> 00:00:52,880 And so you could imagine, if I want the third derivative to be 21 00:00:52,880 --> 00:00:58,910 the same, I could add another term right here, plus, where I 22 00:00:58,909 --> 00:01:03,309 know what the value of f of x's third derivative is at 0. 23 00:01:03,310 --> 00:01:07,859 So I'll write that as f to the third derivative at 24 00:01:07,859 --> 00:01:12,129 0 times x to the third. 25 00:01:12,129 --> 00:01:14,280 Now what do you think is going to be down here? 26 00:01:14,280 --> 00:01:15,489 What's going to be he denominator? 27 00:01:15,489 --> 00:01:22,689 You might be tempted to say that we'll put a 3 down here. 28 00:01:22,689 --> 00:01:25,000 But it turns out you're going to put a 3 times a 2, which 29 00:01:25,000 --> 00:01:28,909 is a 6, or 3 factorial. 30 00:01:28,909 --> 00:01:31,700 Now why is that? 31 00:01:31,700 --> 00:01:33,560 Let me just take a little departure here and I think 32 00:01:33,560 --> 00:01:36,700 you'll start to understand why you put a 6 down here. 33 00:01:36,700 --> 00:01:38,510 Why this isn't a 3 and you put a 6. 34 00:01:38,510 --> 00:01:41,370 Here you put a 2, but 2 is also 2 factorial, right? 35 00:01:41,370 --> 00:01:44,000 2 factorial is 2 times 1, right? 36 00:01:44,000 --> 00:01:45,480 Hopefully you remember what factorial -- actually, let 37 00:01:45,480 --> 00:01:48,140 me tell you what factorial is just in case. 38 00:01:48,140 --> 00:01:52,609 10 factorial is equal to 10 times 9 times 8 times 7, dah, 39 00:01:52,609 --> 00:01:54,510 dah, dah, dah, times 2 times 1. 40 00:01:54,510 --> 00:01:57,870 So you're multiplying all of the numbers up to that number. 41 00:01:57,870 --> 00:02:01,380 4 factorial -- and the numbers get big very, very fast -- is 42 00:02:01,379 --> 00:02:04,670 4 times 3 times 2 times 1. 43 00:02:04,670 --> 00:02:06,960 2 factorial is equal to 2 times 1. 44 00:02:06,959 --> 00:02:09,060 1 factorial is equal to 1. 45 00:02:09,060 --> 00:02:11,289 Now this is kind of a weird definition. 46 00:02:11,289 --> 00:02:12,819 It comes out of combinatorics. 47 00:02:12,819 --> 00:02:16,099 Actually it works for what we're doing is, well, 0 48 00:02:16,099 --> 00:02:17,849 factorial is also equal to 1. 49 00:02:17,849 --> 00:02:19,469 I know that might be a little un-intuitive. 50 00:02:19,469 --> 00:02:20,699 This is just a definition. 51 00:02:20,699 --> 00:02:23,280 It's like saying that i squared is equal to negative 1. 52 00:02:23,280 --> 00:02:28,449 It is a definition that it makes formulas be more 53 00:02:28,449 --> 00:02:30,719 general, I guess is a simple way to put it. 54 00:02:30,719 --> 00:02:32,789 But let me erase all of this because that was just a 55 00:02:32,789 --> 00:02:34,579 divergence just because I realized I was going to use 56 00:02:34,580 --> 00:02:37,100 factorial, so you should know what a factorial is. 57 00:02:37,099 --> 00:02:38,824 But I think that's a fairly straightforward concept. 58 00:02:38,824 --> 00:02:41,849 59 00:02:41,849 --> 00:02:43,819 So going back to what we were doing. 60 00:02:43,819 --> 00:02:49,030 I was asking you why do I put a 6 down here instead of a 61 00:02:49,030 --> 00:02:50,810 3, like we put a 2 here? 62 00:02:50,810 --> 00:02:52,840 Well, let's just take this term alone and take 63 00:02:52,840 --> 00:02:55,770 its third derivative. 64 00:02:55,770 --> 00:03:02,840 So if I have the term and it's f, the third derivative at 0, x 65 00:03:02,840 --> 00:03:07,280 to the third over -- and let me just write 6 as 66 00:03:07,280 --> 00:03:11,240 3 times 2 or 2 times 3. 67 00:03:11,240 --> 00:03:12,210 That'll make it a little more clear. 68 00:03:12,210 --> 00:03:15,500 What's the first derivative here? 69 00:03:15,500 --> 00:03:18,009 What happens when I take the derivative once? 70 00:03:18,009 --> 00:03:20,079 Well, I'm going to multiply the whole thing by the 6 exponent 71 00:03:20,080 --> 00:03:22,230 and decrement the exponent, right? 72 00:03:22,229 --> 00:03:25,659 So I'm going to multiply the whole thing times 3 times f, 73 00:03:25,659 --> 00:03:30,659 the third derivative, x squared over 2 times 3. 74 00:03:30,659 --> 00:03:33,599 So that first time I did it, this 3 and this 75 00:03:33,599 --> 00:03:35,099 3 cancel out, right? 76 00:03:35,099 --> 00:03:36,849 That red's looking a little bit too demonic. 77 00:03:36,849 --> 00:03:39,629 Let me pick another color. 78 00:03:39,629 --> 00:03:41,150 And then when I take the second derivative what 79 00:03:41,150 --> 00:03:43,110 am I going to get? 80 00:03:43,110 --> 00:03:46,390 Well, the 3's gone, now I just have a 2 in the denominator, so 81 00:03:46,389 --> 00:03:52,759 I multiply the whole thing by 2 times f prime prime prime of 0 82 00:03:52,759 --> 00:03:55,829 times, and I decrement the exponent, x to the 1 over 2. 83 00:03:55,830 --> 00:03:57,390 Well, now the 2's cancel out, right? 84 00:03:57,389 --> 00:03:59,579 So the reason why you're putting a factorial there is 85 00:03:59,580 --> 00:04:01,645 every time you take a derivative you're decrementing 86 00:04:01,645 --> 00:04:04,360 the exponent 1, and multiplying the whole expression 87 00:04:04,360 --> 00:04:05,010 by the exponent. 88 00:04:05,009 --> 00:04:08,459 So if you're going to take n derivative, you're essentially 89 00:04:08,460 --> 00:04:14,070 going to be multiplying this expression times n factorial. 90 00:04:14,069 --> 00:04:16,129 So you don't want an n factorial out here. 91 00:04:16,129 --> 00:04:18,560 You put an n factorial at the bottom. 92 00:04:18,560 --> 00:04:19,379 Hopefully that makes sense. 93 00:04:19,379 --> 00:04:23,300 Play around with it yourself and it should start to make 94 00:04:23,300 --> 00:04:25,290 a little bit more sense. 95 00:04:25,290 --> 00:04:28,970 So in general, if we just kept doing this process 96 00:04:28,970 --> 00:04:31,350 forever, what would the function look like? 97 00:04:31,350 --> 00:04:36,200 98 00:04:36,199 --> 00:04:39,579 The reason why I'm covering this is because going this way 99 00:04:39,579 --> 00:04:42,389 we're going to be able to prove what I think is the most 100 00:04:42,389 --> 00:04:47,089 mind-bending concept in mathematics. 101 00:04:47,089 --> 00:04:51,589 And it will make you love mathematics, hopefully. 102 00:04:51,589 --> 00:04:53,489 Some people actually -- well, I won't go into the 103 00:04:53,490 --> 00:04:55,569 spiritual aspects of it. 104 00:04:55,569 --> 00:04:57,990 So what would be this, if I just kept saying that I'm 105 00:04:57,990 --> 00:05:01,710 just going to keep taking derivatives and adding them to 106 00:05:01,709 --> 00:05:02,729 this term, this polynomial? 107 00:05:02,730 --> 00:05:11,290 Well, the polynomial would become p of x is equal to f 108 00:05:11,290 --> 00:05:18,439 of 0 plus f prime of 0 x. 109 00:05:18,439 --> 00:05:21,009 And let's just divide it by 1 factorial, just to make it 110 00:05:21,009 --> 00:05:22,639 clear that that's a 1 factorial, right? 111 00:05:22,639 --> 00:05:24,689 And that's an x to the 1, right? 112 00:05:24,689 --> 00:05:26,060 That's just this term, but I just wrote it a 113 00:05:26,060 --> 00:05:28,980 little differently. 114 00:05:28,980 --> 00:05:32,250 This term right here, this is f of 0 times x to the 0. 115 00:05:32,250 --> 00:05:33,649 I know that's really messy, but hopefully you 116 00:05:33,649 --> 00:05:35,269 see what I'm saying. 117 00:05:35,269 --> 00:05:37,639 And that's over 0 factorial, right? 118 00:05:37,639 --> 00:05:40,919 0 factorial is 1, x to the 0 is 1, so it's just f of 0. 119 00:05:40,920 --> 00:05:46,740 And then plus the second derivative at 0 times x squared 120 00:05:46,740 --> 00:05:51,569 over 2 factorial plus -- and we just keep adding. 121 00:05:51,569 --> 00:06:00,170 The third derivative at x is equal to 0 of x to the third 122 00:06:00,170 --> 00:06:03,970 over 3 factorial, and we just keep going on. 123 00:06:03,970 --> 00:06:06,430 So we could do this to infinity. 124 00:06:06,430 --> 00:06:08,810 And actually we will do it, and this is called 125 00:06:08,810 --> 00:06:11,240 the Maclaurin Series. 126 00:06:11,240 --> 00:06:14,569 So if we just wanted to approximate this as hard as we 127 00:06:14,569 --> 00:06:18,409 can, essentially take the infinite derivatives of it, we 128 00:06:18,410 --> 00:06:19,090 get the Maclaurin Series. 129 00:06:19,089 --> 00:06:24,339 So we are going to define this polynomial p of x. 130 00:06:24,339 --> 00:06:29,119 It's going to be the infinite series, the infinite sum. 131 00:06:29,120 --> 00:06:32,259 Let's start with n is equal to 0, and we're going 132 00:06:32,259 --> 00:06:33,414 to go to infinity. 133 00:06:33,415 --> 00:06:36,450 134 00:06:36,449 --> 00:06:39,579 What is each term? 135 00:06:39,579 --> 00:06:43,180 It's going to be f of -- well it's going to be f, the nth 136 00:06:43,180 --> 00:06:57,220 derivative of f evaluated at 0 times x to the n 137 00:06:57,220 --> 00:07:00,950 over n factorial. 138 00:07:00,949 --> 00:07:03,259 This is the Maclaurin Series. 139 00:07:03,259 --> 00:07:07,730 We're later learn that the Maclaurin Series is a specific 140 00:07:07,730 --> 00:07:12,069 example of the Taylor Series, which is a specific example 141 00:07:12,069 --> 00:07:15,149 of a power series. 142 00:07:15,149 --> 00:07:17,139 But anyway, this might seem very complicated to you. 143 00:07:17,139 --> 00:07:18,349 I have all the sigma notation. 144 00:07:18,350 --> 00:07:20,830 Just remember, this is essentially just that and I 145 00:07:20,829 --> 00:07:22,240 just keep going to infinity. 146 00:07:22,240 --> 00:07:24,030 And if you play around with it it should make sense. 147 00:07:24,029 --> 00:07:26,579 But I think this will become a lot more concrete when I do 148 00:07:26,579 --> 00:07:29,199 this with a specific f of x. 149 00:07:29,199 --> 00:07:33,229 This is where it gets cool. 150 00:07:33,230 --> 00:07:36,910 In case you don't think it's already cool. 151 00:07:36,910 --> 00:07:41,470 So let's pick f of x to be, to me, the most amazing 152 00:07:41,470 --> 00:07:43,010 function of them all. 153 00:07:43,009 --> 00:07:47,420 If I ever built a shrine or a church or something or 154 00:07:47,420 --> 00:07:51,100 skyscraper, I would somehow make this function show up all 155 00:07:51,100 --> 00:07:55,220 over the place, and then years from now people would be awed 156 00:07:55,220 --> 00:07:56,960 by the mysticism of it all. 157 00:07:56,959 --> 00:08:00,279 But anyway, let's try to approximate e to the x 158 00:08:00,279 --> 00:08:02,689 with a Maclaurin Series. 159 00:08:02,689 --> 00:08:05,120 You know that sigma thing, that's hard to memorize. 160 00:08:05,120 --> 00:08:08,019 Just remember you want all the derivatives to be the same. 161 00:08:08,019 --> 00:08:10,589 So let's make the approximation of this. 162 00:08:10,589 --> 00:08:13,959 163 00:08:13,959 --> 00:08:14,794 Actually, I won't prove it. 164 00:08:14,795 --> 00:08:16,819 It's out of the scope of what we're doing right now. 165 00:08:16,819 --> 00:08:19,029 But the approximation, even when it's centered at 0, 166 00:08:19,029 --> 00:08:22,659 actually equals the function when you take the infinite sum. 167 00:08:22,660 --> 00:08:24,470 But let's just see what it looks like. 168 00:08:24,470 --> 00:08:26,890 Because this is pretty cool. 169 00:08:26,889 --> 00:08:28,939 Before we start building the polynomial, let's just figure 170 00:08:28,939 --> 00:08:29,550 out a couple of things. 171 00:08:29,550 --> 00:08:35,590 So what is f prime of x? 172 00:08:35,590 --> 00:08:37,470 That's also e to the x, right? 173 00:08:37,470 --> 00:08:40,540 What's f prime prime of x? 174 00:08:40,539 --> 00:08:42,169 Well that also equals e to the x. 175 00:08:42,169 --> 00:08:45,139 We have learned and actually recently did a proof that 176 00:08:45,139 --> 00:08:47,049 the derivative of e to the x is e to the x. 177 00:08:47,049 --> 00:08:48,719 But that also needs a second derivative and the third and 178 00:08:48,720 --> 00:08:50,946 the fourth and the nth derivative of e to the x 179 00:08:50,946 --> 00:08:52,600 is equal to e to the x. 180 00:08:52,600 --> 00:08:56,040 I could take an arbitrary number of derivatives of e 181 00:08:56,039 --> 00:08:59,699 to the x and it equals e to the x, which is amazing. 182 00:08:59,700 --> 00:09:04,300 The rate of change of the function at any point is 183 00:09:04,299 --> 00:09:05,359 equal to the function. 184 00:09:05,360 --> 00:09:07,360 The rate of change of the rate of change of the function at 185 00:09:07,360 --> 00:09:08,659 any point is equal to the function. 186 00:09:08,659 --> 00:09:12,569 I mean that's -- I want to just go some place and ponder it, 187 00:09:12,570 --> 00:09:14,400 but I'm too busy making videos. 188 00:09:14,399 --> 00:09:16,319 But anyway, back to what we were doing. 189 00:09:16,320 --> 00:09:20,040 So what is f of 0? 190 00:09:20,039 --> 00:09:25,230 f of 0 is equal to e to the 0, which is equal to 1, right? 191 00:09:25,230 --> 00:09:28,389 Well that's also going to be f prime of 0. 192 00:09:28,389 --> 00:09:31,559 That's also e to the 0, which is equal to 1. 193 00:09:31,559 --> 00:09:37,349 So all of the derivatives, the nth derivative at 0 is going to 194 00:09:37,350 --> 00:09:41,522 equal 1 for this specific case of f of x, for e to the x. 195 00:09:41,522 --> 00:09:43,990 And this is why this is so cool. 196 00:09:43,990 --> 00:09:47,129 But actually, it actually gets even more amazing. 197 00:09:47,129 --> 00:09:50,450 198 00:09:50,450 --> 00:09:54,240 So, you hopefully realize that f of 0 and all of 199 00:09:54,240 --> 00:09:57,320 its derivatives at 0 are equal to 1. 200 00:09:57,320 --> 00:10:00,530 So now we can do the powers of the Maclaurin Series 201 00:10:00,529 --> 00:10:01,529 in the next video. 202 00:10:01,529 --> 00:10:03,031 See you soon.