1 00:00:00,006 --> 00:00:06,475 Alternating series test. 2 00:00:06,475 --> 00:00:09,220 [SOUND] 3 00:00:09,220 --> 00:00:11,320 Alternating series and it turns out that there's 4 00:00:11,320 --> 00:00:15,420 a particularly nice criterion for when they converge. 5 00:00:15,420 --> 00:00:20,060 So here's what normally goes by the name the alternating series test so the 6 00:00:20,060 --> 00:00:24,400 setup of this is as follows I'm going to suppose that I've got a sequence. 7 00:00:24,400 --> 00:00:29,020 The terms are decreasing and all of the terms are positive. 8 00:00:29,020 --> 00:00:32,780 And the limit of the nth term as n goes to infinity is 0. 9 00:00:32,780 --> 00:00:34,320 So these are the assumptions. 10 00:00:34,320 --> 00:00:40,200 And then in that case, I may conclude that this alternating series that I build from 11 00:00:40,200 --> 00:00:44,600 the sequence a sub n by multiplying by minus 1 to the n plus 1 power. 12 00:00:44,600 --> 00:00:47,620 This alternating series converges. 13 00:00:47,620 --> 00:00:51,170 Alternating series form a class of series for 14 00:00:51,170 --> 00:00:55,170 which the limit test is practically the whole story. 15 00:00:55,170 --> 00:00:59,570 So given these conditions, if the limit of a sub n is 0, then this 16 00:00:59,570 --> 00:01:01,640 series converges. 17 00:01:01,640 --> 00:01:04,960 But we already know by just the limit test that if the limit 18 00:01:04,960 --> 00:01:11,580 of the nth term of this series, remember, is non-zero, then the series diverges. 19 00:01:11,580 --> 00:01:14,680 But to say that this limit is non-zero is exactly the same 20 00:01:14,680 --> 00:01:19,140 thing as saying that this limit either doesn't exist or is non-zero. 21 00:01:19,140 --> 00:01:21,800 So, alternating series are a situation where 22 00:01:21,800 --> 00:01:24,510 just determining the limit of the nth term, 23 00:01:24,510 --> 00:01:28,060 or at least the absolute value of the nth term, tells the whole story. 24 00:01:28,060 --> 00:01:30,750 If that limit is 0, then the series converges, 25 00:01:30,750 --> 00:01:33,570 and if that limit's non-zero, then the series diverges. 26 00:01:33,570 --> 00:01:35,510 Now, you already know that the if the limit 27 00:01:35,510 --> 00:01:38,630 of the nth term is not 0, the series diverges. 28 00:01:38,630 --> 00:01:41,640 So, in this case, what do I have to show? 29 00:01:41,640 --> 00:01:43,780 So this is the statement that I want to prove. 30 00:01:43,780 --> 00:01:46,120 I start with some sequence which is decreasing. 31 00:01:46,120 --> 00:01:47,290 All the terms are positive. 32 00:01:47,290 --> 00:01:49,700 The limit of that sequence is 0. I want to 33 00:01:49,700 --> 00:01:53,400 conclude that this series, this alternating series, converges. 34 00:01:53,400 --> 00:01:54,210 Well what does that even mean? 35 00:01:54,210 --> 00:01:57,250 What does it mean to show that this series converges? 36 00:01:57,250 --> 00:01:58,890 Right, I just have to remember the definition 37 00:01:58,890 --> 00:02:02,668 of this is really something about the limit. 38 00:02:02,668 --> 00:02:07,910 All right, it's to say that the limit of this partial sum, the sum k goes from 1 to 39 00:02:07,910 --> 00:02:14,810 n of minus 1 to the k plus 1 times a sub k, this sequence of partial sums should 40 00:02:14,810 --> 00:02:22,555 converge and I'll usually denote that n partial sum by just, s sub n. 41 00:02:22,555 --> 00:02:25,950 Well let's look more carefully at these partial sums. 42 00:02:25,950 --> 00:02:29,180 So let's look at the first few terms of the sequence of partial sums, right? 43 00:02:29,180 --> 00:02:33,310 What happens when I just plug in a few values of n here? 44 00:02:33,310 --> 00:02:36,090 What do I get? Well, when I plug in n equals 1? 45 00:02:36,090 --> 00:02:37,480 It's not too interesting, right? 46 00:02:37,480 --> 00:02:39,847 It's just the sum of the first term, which is just a 47 00:02:39,847 --> 00:02:40,870 sub 1. 48 00:02:40,870 --> 00:02:43,920 When I plug in n equals 2, that's a little bit more interesting, right? 49 00:02:43,920 --> 00:02:48,010 That's the sum of the first two terms, which is a sub 1 minus a sub 2. 50 00:02:48,010 --> 00:02:49,360 Why is the minus in there? 51 00:02:49,360 --> 00:02:54,570 When I plug in k equals 2 here, I get negative 1 to the 3rd times a sub 2. 52 00:02:54,570 --> 00:02:57,600 Negative 1 to the 3rd is minus 1. 53 00:02:57,600 --> 00:03:00,920 So that's introducing a negative sign in front of the a sub 2. 54 00:03:00,920 --> 00:03:05,528 So this is a sub 1 minus a sub 2. What's the third partial sum? 55 00:03:05,528 --> 00:03:09,878 Well the third partial sum is a sub 1 minus a sub 2 plus the next term in 56 00:03:09,878 --> 00:03:14,560 the series which is minus 1 to the 4th times a sub 3, it's plus a sub 3. 57 00:03:14,560 --> 00:03:16,639 What's the fourth partial sum? 58 00:03:16,639 --> 00:03:21,143 Well that's a sub 1 minus a sub 2 plus a sub 3 minus a sub 4. 59 00:03:22,170 --> 00:03:24,620 I mean, it's maybe we're not getting a lot of intuition here. 60 00:03:24,620 --> 00:03:29,720 The fifth one is a sub 1 minus a sub 2 plus a sub 3 minus a sub 4 plus a sub 5. 61 00:03:29,720 --> 00:03:30,620 It's a little 62 00:03:30,620 --> 00:03:35,250 bit hard maybe to tell what's going on. So, instead of just looking at these 63 00:03:35,250 --> 00:03:40,220 numbers, I could try to look at these partial 64 00:03:40,220 --> 00:03:45,270 sums on a number line. And the key fact to remember here is that 65 00:03:45,270 --> 00:03:50,160 these a sub n's are decreasing, so in something like the fifth partial 66 00:03:50,160 --> 00:03:55,660 sum, a sub 2 is smaller than a sub 1, a sub 3 is smaller than both of 67 00:03:55,660 --> 00:03:56,542 these still. Right? 68 00:03:56,542 --> 00:03:58,860 That's going to help us to draw a nice picture of 69 00:03:58,860 --> 00:04:02,250 what these partial sums look like on the number line. 70 00:04:02,250 --> 00:04:04,310 So the first partial sum, you know? 71 00:04:04,310 --> 00:04:05,280 Who knows where it is? 72 00:04:05,280 --> 00:04:08,290 It's just a sub 1 and it's somewhere on the number line. 73 00:04:08,290 --> 00:04:13,540 But then to get from that first partial sum to the next partial sum to get from s 74 00:04:13,540 --> 00:04:21,080 of 1 over to s of 2, all right? I just subtract a sub 2. 75 00:04:21,080 --> 00:04:27,290 So here I am subtracting a sub 2, and that lands me over here 76 00:04:27,290 --> 00:04:32,360 at the second partial sum, right, because s sub 2 is a sub 1 minus a sub 2. 77 00:04:32,360 --> 00:04:35,680 Well, how do I get to the third partial sum? 78 00:04:35,680 --> 00:04:37,360 Where is the third partial sum? 79 00:04:37,360 --> 00:04:42,317 Well, to get to s sub 2 to s sub 3, I just add a sub 3. 80 00:04:43,600 --> 00:04:46,340 And the key fact here is that a sub n is decreasing 81 00:04:46,340 --> 00:04:50,430 so the amount that I'm moving to the right with a sub 3 is 82 00:04:50,430 --> 00:04:54,170 less than the amount that I was moving to the left with a sub 2. 83 00:04:54,170 --> 00:04:59,640 So maybe here is s sub 3, the third partial sum. 84 00:04:59,640 --> 00:05:05,370 And then to get from s sub 3 to s sub 4, I have to subtract a sub 4, 85 00:05:05,370 --> 00:05:11,550 but again, the sequence a sub n is decreasing, so a sub 4 is smaller than 86 00:05:11,550 --> 00:05:15,030 a sub 3, so I'm moving less to the left than I was 87 00:05:15,030 --> 00:05:17,230 to the right to go from s sub 2 to s sub 3. 88 00:05:17,230 --> 00:05:25,120 So now I subtract a sub 4, and I land here at s4, the fourth partial sum. 89 00:05:25,120 --> 00:05:27,950 And to get to s sub 4 to s sub 5, I'd be adding 90 00:05:27,950 --> 00:05:31,480 a sub 5, but a sub 5 is even smaller than a sub 4. 91 00:05:31,480 --> 00:05:36,410 So maybe that's somewhere over here. What do I notice? 92 00:05:36,410 --> 00:05:40,880 Well, what I'm noticing here is that the even partial 93 00:05:40,880 --> 00:05:44,830 sums, s sub 2 and s sub 4 are increasing. 94 00:05:44,830 --> 00:05:50,190 And the odd partial sums, s sub 1, s sub 3, s sub 5, they're decreasing. 95 00:05:50,190 --> 00:05:51,620 I can be a little bit more precise, right? 96 00:05:51,620 --> 00:05:55,090 This sequence, the sequence s sub 2 n minus 1 is decreasing. 97 00:05:55,090 --> 00:06:00,580 This sequence, s sub 2 n, is increasing. So these two sequences are monotone. 98 00:06:00,580 --> 00:06:01,996 The s sub evens 99 00:06:01,996 --> 00:06:07,000 is increasing, but bounded above by s sub 1. 100 00:06:07,000 --> 00:06:14,000 And the s of odds are decreasing, but bounded below by, say, s sub 2. 101 00:06:14,000 --> 00:06:17,672 So I've got monotone and bounded sequences. 102 00:06:17,672 --> 00:06:22,270 So by the monotone convergence theorem, the sequence of even 103 00:06:22,270 --> 00:06:27,180 partial sums is increasing and bounded above, and therefore the 104 00:06:27,180 --> 00:06:28,850 limit exists. 105 00:06:28,850 --> 00:06:33,870 And by the monotone conversion theorem the sequence of odd partial sums is decreasing 106 00:06:33,870 --> 00:06:39,800 but bounded below, and consequently the limit of s sub odd exists. 107 00:06:39,800 --> 00:06:42,730 Well, that's awesome, or not. 108 00:06:42,730 --> 00:06:44,720 What did I actually want to prove? 109 00:06:44,720 --> 00:06:48,480 Well, I actually wanted that the limit of just the partial sums 110 00:06:48,480 --> 00:06:52,510 exists, I mean, I don't, I don't really care about the sequence 111 00:06:52,510 --> 00:06:56,140 of even partial sums and the sequence of odd partial sums. 112 00:06:56,140 --> 00:06:59,870 I just want to know what the sequence of partial sums, does it have a limit? 113 00:06:59,870 --> 00:07:05,420 So how do I know that the odd and the even sequences converge to the same thing? 114 00:07:05,420 --> 00:07:07,650 So what I know is that the limit of the even 115 00:07:07,650 --> 00:07:11,480 partial sums exist and the limit of the odd partial sums exists. 116 00:07:11,480 --> 00:07:15,820 But I just want to know about the limit of the partial sums all together, right? 117 00:07:15,820 --> 00:07:17,820 The even terms are getting close to something, the odd 118 00:07:17,820 --> 00:07:19,330 terms are getting close to something but 119 00:07:19,330 --> 00:07:22,000 are all the terms getting close to something. 120 00:07:22,000 --> 00:07:25,210 Well to analyze this, I'm going to look instead at 121 00:07:25,210 --> 00:07:27,170 this limit, I'm going to look at the limit of 122 00:07:27,170 --> 00:07:29,980 the difference of the even and the odd partial 123 00:07:29,980 --> 00:07:33,560 sums and there's two different ways to calculate this limit. 124 00:07:33,560 --> 00:07:34,496 On the one hand 125 00:07:34,496 --> 00:07:34,934 [LAUGH] 126 00:07:34,934 --> 00:07:38,020 well I can just calculate what this term is, this is the sum of the 127 00:07:38,020 --> 00:07:42,300 first 2 end terms, this is the sum of the first 2n minus 1 terms. 128 00:07:42,300 --> 00:07:44,900 So if I add up the first 2n terms 129 00:07:44,900 --> 00:07:49,100 and subtract all but the last term that's exactly 130 00:07:49,100 --> 00:07:56,310 the same then as just the 2 nth term, which in this case is negative a sub 2n. 131 00:07:56,310 --> 00:08:00,080 So this limit is the same as this limit, but what is 132 00:08:00,080 --> 00:08:01,530 this limit, right? 133 00:08:01,530 --> 00:08:03,500 Well I actually know what that one's equal to because 134 00:08:03,500 --> 00:08:06,460 I assume that the limit of the nth term is 0. 135 00:08:06,460 --> 00:08:06,764 So 136 00:08:06,764 --> 00:08:08,120 [LAUGH] 137 00:08:08,120 --> 00:08:12,520 my, my assumption right the limit of negative a sub 2n is 138 00:08:12,520 --> 00:08:17,480 the same as negative the limit of a sub n which is 0. 139 00:08:17,480 --> 00:08:20,130 But now there's another way that I could calculate this limit. 140 00:08:20,130 --> 00:08:22,440 This is the limit of a difference, which is 141 00:08:22,440 --> 00:08:25,050 the difference of the limits provided the limits exist. 142 00:08:25,050 --> 00:08:26,380 And in this case, they do, right? 143 00:08:26,380 --> 00:08:30,450 I'm assuming that these two limits exist. So this is the limit of a difference. 144 00:08:30,450 --> 00:08:32,864 This is a difference of the limits. But now, 145 00:08:32,864 --> 00:08:34,280 [LAUGH]. 146 00:08:34,280 --> 00:08:38,830 I just calculated this a moment ago, to be equal to 0, right? 147 00:08:38,830 --> 00:08:42,080 What I'm saying here is that the limit of this 148 00:08:42,080 --> 00:08:47,810 sequence, and the limit of this sequence, differ by 0. 149 00:08:47,810 --> 00:08:51,740 Which is to say that this limit equals this limit, right? 150 00:08:51,740 --> 00:08:56,300 Which is just to say that the limit of s sub n exists, because 151 00:08:56,300 --> 00:09:00,130 the limit of the even terms is equal to the limit of the odd terms. 152 00:09:00,130 --> 00:09:03,350 So all of the terms together are getting close 153 00:09:03,350 --> 00:09:07,950 to something in particular and that's what I wanted. 154 00:09:07,950 --> 00:09:10,650 Right the limit of a partial sums exist and that's 155 00:09:10,650 --> 00:09:14,300 exactly what it means to say that this series converges 156 00:09:14,300 --> 00:09:16,890 right to say that a series converges is just to 157 00:09:16,890 --> 00:09:20,670 say that the limit of the sequence of partial sums exists. 158 00:09:20,670 --> 00:09:22,620 But wait, there's more. 159 00:09:22,620 --> 00:09:25,330 Let's think back to this picture, right? This diagram 160 00:09:25,330 --> 00:09:28,510 of the number line with the partial sums drawn on it. 161 00:09:28,510 --> 00:09:33,900 Well, the odd partial sums are decreasing, and their limit is some value L. 162 00:09:33,900 --> 00:09:36,540 The even partial sums are increasing, and their limit's the 163 00:09:36,540 --> 00:09:41,180 same thing, it's also L, because the difference between even and 164 00:09:41,180 --> 00:09:44,810 odd partial sums are controlled by just the terms in 165 00:09:44,810 --> 00:09:48,810 the sequence a sub k, and those terms have limit 0. 166 00:09:48,810 --> 00:09:50,380 So the even partial sums are 167 00:09:50,380 --> 00:09:54,110 increasing to L, the odd partial sums are decreasing to L. 168 00:09:54,110 --> 00:09:59,020 And what this means is that the value of this series is between these two, right. 169 00:09:59,020 --> 00:10:02,930 Here's the value of the of the series. 170 00:10:04,290 --> 00:10:09,690 Here's the series, and all of the even partial sums are below it 171 00:10:09,690 --> 00:10:15,010 and all of the odd partial sums are above this true value, L. 172 00:10:15,010 --> 00:10:15,470 This is 173 00:10:15,470 --> 00:10:18,930 one of the best reasons to care about alternating series. 174 00:10:18,930 --> 00:10:20,570 So not only is it really easy to 175 00:10:20,570 --> 00:10:23,190 determine if an alternating series converges, the whole 176 00:10:23,190 --> 00:10:26,519 story just boils down to whether the limit of a sub n is 0 or not. 177 00:10:27,700 --> 00:10:31,580 But more than that, I can now give explicit 178 00:10:31,580 --> 00:10:35,180 error bounds on the value of an alternating series. 179 00:10:35,180 --> 00:10:40,750 If I compute the 2 nth and the 2n minus 1th partial sum, I know the true value 180 00:10:40,750 --> 00:10:44,580 of my series lands between these two values. 181 00:10:44,580 --> 00:10:47,770 And this makes alternating series great for machines. 182 00:10:47,770 --> 00:10:52,355 When you're calculating a partial sum, you're getting error bounds for free. 183 00:10:52,355 --> 00:11:02,355 [SOUND]