Here it is:
Yes, it’s a divergent series, but I’m sure Euler would like it even more. (Actually, the probability that this formula is not somewhere in his works, or in Ramanujan’s, is close to zero, though I came upon it fairly accidentally today — maybe I’ll explain how it came about naturally at some later time).
Amusingly, both Pari/GP (numerically, using sumalt) and Maple (symbolically, after setting _EnvFormal:=true;) can confirm the “formula” as-is… (I didn’t try with Mathematica).
10 thoughts on “Euler for a day, or “my” formula for pi”
Mathematica 6 says the sum is divergent, but it can sum the corresponding power series (including a term x^m). The power series is a complicated expression in fractional powers of x and ArcTan[Sqrt[x]]. Setting x=1, Mathematica simplifies to pi.
I also got the formula from a specialization (though not from a power series), and that’s also certainly the best way to check (and justify) it.
It looks like you’re out by a 2. The sum should converge to \pi + 2. This can be proved using partial fractions. The tricky part is a term that sums increasing powers of -1. Intuitively, one cannot really sum this series because it can be ordered in many ways; however in this case it does converge to 1. I’m not sure if these comments support tex but here goes: –
Actually, the series
is also divergent but its value (universally accepted, e.g., as value of the geometric series for 1/(1-x) at x=-1) is 1/2. Inserted in your computation this leads to pi again…
[I also modified the previous comment to put in the proper markes for LaTeX on this blog].
I’m not quite sure you are correct about the sum. It truly depends. In any case, if you run your formula in python you get: –
>>> def f(m):
… return ((-1)**(m+1))*(m*m)/float(4*m*m-1)
>>> 16 * sum(map(lambda i: f(i), range(1,10000)))
This suspiciously looks close to \pi + 2 to me :)
[thanks for formatting my tex]
Yes, but if you sum to 10001, you get
>>> 16 * sum(map(lambda i: f(i), range(1,10001)))
which is close to pi-2, and more generally your computation shows that the partial sums with even number of terms converge to \pi+2, and those with odd number of terms converge to \pi-2. “On average”, this is \pi (where “average” can be taken literally, in the form of what is called Cesaro summation: average the partial sums m<=M for M between 1 and 10000, for instance, and the value will be very close to \pi).
But of course this is indeed a divergent series, so in some sense it can be made to sum to whatever value we want by rearranging the terms and similar formal computations. However, any “reasonable” summation method will lead to the value \pi.
Yes you are correct. The sum does not converge but hovers between pi-2 and pi+2.
I would say that the geometric series only converges for absolute values less than 1. So I feel it is wrong to imply a value of 1 leads to a sum of 1/2. However, you are correct to say its Cesàro sum does.
It’s the first time I have heard of such a sum and would like to thank you for an enlightening discussion.
It can definitely be confusing at first; actually, as I mentioned in the second comment (after J. Stopple’s remark), I obtained this expression from a representation of a simple function as a series — though not a power series –. This series expression is convergent for suitable values of the variable, but I then specialized at one value where the function is defined, but not the series: this leads to the stated formula, which can then be interpreted in various ways to become rigorous.
Another way to see that the even partial sums converge to pi-2: let g(n) = f(2n-1)+f(2n). Then g(n) = 16/((4n-3)(16n^2-1)) = 2/(4n-3) – 4/(4n-1) + 2/(4n+1); thus
g(1) + g(2) + … + g(n) = 2 – 4/3 + 4/5 – 4/7 + … +- 4/(4n-1)
which as n goes to infinity clearly approaches pi-2. The odd-m terms approach 4 as m goes to infinity, so the odd partial sums approach (pi-2)+4 = pi+2.
(This is basically Blair’s solution, but I prefer it because g(n) decays like 1/n^3 and thus the sum of the g(n) is clearly convergent.)
Do you know this one:
I think that’s also pretty neat…