Infinite series, part 2
Apr. 9th, 2005 01:06 pmRather than grumble about poor customer service or the car's alternator that decided we weren't spending this weekend in Canberra after all (I'm not actually that sorry to have a quiet weekend at home, though there are probably cheaper ways to achieve that), a little bit of follow-up to my recent post.
I noted that the series S1 = 1 - 1/2 + 1/3 - 1/4 +... converges (to ln(2), or approx. 0.69), and that by reordering the terms to S2 1 - 1/2 - 1/4 + 1/3 - 1/6 - 1/12 + ... it's possible to make it converge to 1/2 ln(2) instead.
In fact, it's actually possible by rearranging terms (again, without losing any) to make it converge to any number you like. To see this, note that S1 is formed by alternating terms from two series:
Series S3 = 1 + 1/3 + 1/5 + 1/7 + 1/9 +...
Series S4 = -1/2 - 1/4 - 1/6 - 1/8 -...
It's easy enough to show that both S3 and S4 diverge - the former to positive infinity, the latter to negative infinity. (If you're not sure how to do this, see the proof in my previous post that 1 + 1/2 + 1/3 + ... diverges; the same technique can easily be adapted for S3, and S4 is in fact just (-1/2) * (1 + 1/2 + 1/3 + ...)).
It also follows that any tail-end of those sequences diverges in the same way.
So, let's suppose that we want to reorder the terms in S2 to make it converge to some finite number of our choice, call it k. As it turns out, we can do this by combining S3 and S4 again, keeping each of those subsets of the series in order but altering the way in which they mesh together. (What we're doing here is a bit like riffle-shuffling two decks of cards together.)
Here's how we construct our series S5:
1. Set the first term of S5 to equal the first term of S3 (i.e. 1).
2. Set the second term of S5 to equal the first term of S4 (i.e. -1/2).
3. i = 1 (this variable will track how many terms we've used from S3).
4. j = 1 (same, for S4).
5. n = 3 (tracks how many terms we are into S5).
6. If the partial sum of the first (n-1) terms of S5 is less than k, increment i by 1 and set the n'th term of S5 to equal the i'th term of S3. Otherwise, increment j by 1 and set the n'th term of S5 to equal the j'th term of S4.
7. Increment n by 1.
8. Goto 6.
Or in simpler language: if the series is currently below our target, add on the next term from S3 (the positive subseries); otherwise, add on the next term from S4 (the negative subseries).
We know that this series is going to use all the terms from both S3 and S4. (If it ever stopped using S3, then the rest of the series would just be a tail-end of S4, and would diverge to minus infinity - but once it drops below k, the next term would be picked from S3, and similarly the other way around.)
We also know that it's going to keep oscillating above & below k - whenever it's below, we keep taking positive terms until it rises above, which we know it'll do because S3 diverges, and so on.
To finish the proof, we know that once it's used up the first m terms from both series, any subsequent terms will be between -m/2 and m/2. We know it never increases while it's already above k, and never decreases when it's below; this means it'll be trapped between (k-m/2) and (k+m/2), and as m gets bigger that squeezes it ever closer to k.
As an example, let's make it converge to 0.75:
1 - 1/2 (= 0.5)
... + 1/3 (= 0.833)
... - 1/4 (= 0.583)
... + 1/5 (= 0.783)
... - 1/6 (= 0.617)
... + 1/7 (= 0.7595)
... - 1/8 (= 0.6345)
... + 1/9 (= 0.7456)
... + 1/11 (= 0.8365)
And so on. As you may have noticed, this is very *slow* to converge; if you want to pin it down to within 0.01 you'd have to take the first hundred terms, and working with these particular numbers you can't get much improvement on that. But it does, very slowly, converge to exactly 0.75.
I noted that the series S1 = 1 - 1/2 + 1/3 - 1/4 +... converges (to ln(2), or approx. 0.69), and that by reordering the terms to S2 1 - 1/2 - 1/4 + 1/3 - 1/6 - 1/12 + ... it's possible to make it converge to 1/2 ln(2) instead.
In fact, it's actually possible by rearranging terms (again, without losing any) to make it converge to any number you like. To see this, note that S1 is formed by alternating terms from two series:
Series S3 = 1 + 1/3 + 1/5 + 1/7 + 1/9 +...
Series S4 = -1/2 - 1/4 - 1/6 - 1/8 -...
It's easy enough to show that both S3 and S4 diverge - the former to positive infinity, the latter to negative infinity. (If you're not sure how to do this, see the proof in my previous post that 1 + 1/2 + 1/3 + ... diverges; the same technique can easily be adapted for S3, and S4 is in fact just (-1/2) * (1 + 1/2 + 1/3 + ...)).
It also follows that any tail-end of those sequences diverges in the same way.
So, let's suppose that we want to reorder the terms in S2 to make it converge to some finite number of our choice, call it k. As it turns out, we can do this by combining S3 and S4 again, keeping each of those subsets of the series in order but altering the way in which they mesh together. (What we're doing here is a bit like riffle-shuffling two decks of cards together.)
Here's how we construct our series S5:
1. Set the first term of S5 to equal the first term of S3 (i.e. 1).
2. Set the second term of S5 to equal the first term of S4 (i.e. -1/2).
3. i = 1 (this variable will track how many terms we've used from S3).
4. j = 1 (same, for S4).
5. n = 3 (tracks how many terms we are into S5).
6. If the partial sum of the first (n-1) terms of S5 is less than k, increment i by 1 and set the n'th term of S5 to equal the i'th term of S3. Otherwise, increment j by 1 and set the n'th term of S5 to equal the j'th term of S4.
7. Increment n by 1.
8. Goto 6.
Or in simpler language: if the series is currently below our target, add on the next term from S3 (the positive subseries); otherwise, add on the next term from S4 (the negative subseries).
We know that this series is going to use all the terms from both S3 and S4. (If it ever stopped using S3, then the rest of the series would just be a tail-end of S4, and would diverge to minus infinity - but once it drops below k, the next term would be picked from S3, and similarly the other way around.)
We also know that it's going to keep oscillating above & below k - whenever it's below, we keep taking positive terms until it rises above, which we know it'll do because S3 diverges, and so on.
To finish the proof, we know that once it's used up the first m terms from both series, any subsequent terms will be between -m/2 and m/2. We know it never increases while it's already above k, and never decreases when it's below; this means it'll be trapped between (k-m/2) and (k+m/2), and as m gets bigger that squeezes it ever closer to k.
As an example, let's make it converge to 0.75:
1 - 1/2 (= 0.5)
... + 1/3 (= 0.833)
... - 1/4 (= 0.583)
... + 1/5 (= 0.783)
... - 1/6 (= 0.617)
... + 1/7 (= 0.7595)
... - 1/8 (= 0.6345)
... + 1/9 (= 0.7456)
... + 1/11 (= 0.8365)
And so on. As you may have noticed, this is very *slow* to converge; if you want to pin it down to within 0.01 you'd have to take the first hundred terms, and working with these particular numbers you can't get much improvement on that. But it does, very slowly, converge to exactly 0.75.
no subject
Date: 2005-04-09 11:23 am (UTC)Thanks for sharing, this and previous. :-)