Math: Why does this series equal (1-log2)?

So for fun, my daughter and I were playing around with various series, and we came up with the following:

1/2 - 1/3 + 1/4 - 1/5 + 1/6 etc.

After working on this for a while on the calculator, we decided to write a quick program to loop through the series and give us an approximation of the results after 500,000,000 iterations.

It was with some surprise that we discovered that the series gave us the approximate result of 0.306852818, which after some web research showed itself to be the equivalent of (1 - log 2)

Why? Any math people out there that can explain to us how this works? Does the series above have a specific name? Any other cool series out there we can have fun with? Thanks!

You should be able to find something by looking up “alternating harmonic series”.

It may interest you to know that while that series does converge, the harmonic series (all positive reciprocals) diverges, and because of that, if you rearrange the terms of the alternating harmonic series properly, you can get it to converge to any number you like.

The easiest way to explain why this works is in terms of something called Taylor series. Basically, any “nice” function can be expressed in a neighbourhood of a given point a as an infinite polynomial:

f(x) = c[sub]0[/sub] + c[sub]1[/sub](x - a) + c[sub]2[/sub](x - a)[sup]2[/sup] + a[sub]3[/sub](x - a)[sup]3[/sup] + …

where the c[sub]i[/sub] coefficients are real numbers. In practice, we can only add up a finite number of these terms; but as we add more and more of them, our approximation of f(x) will get better and better in some region around x = a. (This region may be infinite, i.e. our results will get better and better for all x; but this is by no means guaranteed.)

Now, it turns out that the power series for the function log(x + 1) about the point x = 0 is given by

log(x + 1) = x - x[sup]2[/sup]/2 + x[sup]3[/sup]/3 - x[sup]4[/sup]/4 + …

and what’s more, the radius of convergence for this function is infinite (I think.) Thus if you plug in x = 1 to both sides, you get

log(2) = 1 - 1/2 + 1/3 - 1/4 + …

which would lead to the result you got.

I’ve glossed over a lot of subtle points about how these series actually work (and I’ve probably done enough glossing to anger at least a couple of real mathematicians), and I haven’t explained how you actually obtain these coefficients if you’re given a function f(x). If you know a little calculus, it’s not hard to write down the formulas for these functions; post again if you’d like this explained.

By the way, another particularly funky series is

1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + …

See if you & your daughter can figure out what that sums to. :slight_smile: