Sohliloquies

Logo

I'm a security engineer with a lot of side projects, most of which find their way here. I like to center my research around computer security, cryptography, Python, math, hard problems with simple answers, and systems that uphold their users' values.

You can also find me on Twitter.

27 May 2015

Evaluating the Alternating Harmonic Series

Here's a fun little note I just found while organizing my desk. I came up with this proof during a class on infinite series last summer. The professor mentioned the limit of the alternating harmonic series, then commented offhand that "this limit is true, but we cannot prove it yet." Never one to shy from a challenge, I decided to see whether he was right, and had roughly this proof scrawled on a piece of paper by the end of class. He suggested that I try to publish it in an undergrad journal, but that didn't pan out for various reasons. Nevertheless, it's a fun proof, and I wasn't able to find it anywhere online, so I thought I'd share it here.

The alternating harmonic series is defined as


which, of course, is just the harmonic series with the sign of every other term flipped.

It is well known that the harmonic series diverges. Slightly less well known is that the alternating harmonic series converges to a very clean limit -- strangely enough, it turns out to be ln 2. This fact, if it comes up, is usually proved just as a trivial consequence of the Euler-Mascheroni constant's most common identity. Not only is that proof beyond the reach of many undergrads, it's also so trivial as to border on inane.

It's like using a sledgehammer to pound in a nail: of course it works, but the result would look a lot nicer if you used a hammer instead.

Consider the following series:

The first few terms of this sequence are,


It turns out that the limit of this series as n goes to infinity is ln 2, which is kind of a cool result in its own right. If you're skeptical, try to come up with a proof -- it's a fun exercise. Hint: Use the integral from 1 to 2 of 1/x, interpreted geometrically.

Convinced? Great. Now, then -- let's do a little algebra with this sequence. Note how nicely it telescopes down.


This gives us the difference between subsequent terms. We know the first term, too, so let's bop the two together:


This is a central result in the proof. In fact, we're almost done. Let's turn our attention back to the alternating harmonic series for a second. Consider its partial sums, which we'll denote by S, subscripted with the partial sum number:


Notice that as the subscript grows, the difference between subsequent terms diminishes, and in fact it (of course) goes to zero in the limit. Because of this, in order to prove the limit of this series of partial sums, it would suffice to establish the limit only for terms with either even or odd subscripts. Call me crazy, but I've got a good feeling about the even ones. Let's start by matching their terms up into pairs -- S_6 is included to illustrate the idea before generalizing it:


So our even sums are equivalent to subsequent terms of our series a! But, wait, didn't we already agree that we know a's limit? You know what, I think we did...


And that's it! Some parts of the proof could also have been established mechanically by induction, but look at this -- there really is something nice about the direct proof, isn't there?