ten delicious and easy formulas for pi that you can try at home
We begin with perhaps history’s most elegant formula for π: this groovy little jam from Calculus cofounder Gottfried Leibniz. (Credit also goes to Scottish sensation James Gregory, who discovered this formula independently.)
Just look at these lovely unit fractions, swaying back and forth, an alternating sequence as lulling and seductive as Marvin Gaye’s best.
Like most of the recipes that follow, this one is an infinite series. The longer you go, the closer you get to π (or, in this case, π/4). If you ever stop, you won’t quite have π, just an approximation. The further you go, the better the approximation.
Take note, though: “slow” means slow. Even after 600 terms, you still won’t quite have pinned down the second decimal place as 3.14 instead of 3.13. Because it takes so long to converge, Gottfried’s Slow Jam is not very computational useful.
But damn, is it musical.
This infinite product comes not from the biblical Noah, but John Wallis (who famously unmasked the mathematical pretensions of the philosopher Thomas Hobbes).
I love the tidiness of this one: even pairs in the top, odd pairs in the bottom. The more you multiply, the closer you get to π/2.
Careful about rearranging the factors to make things easier, though. I learned that lesson the hard way.
Arguably the most important formula in this recipe book, it answered the famous Basel problem: what do you get if you add up all the reciprocals of the square numbers? First appearing in 1644, the sword remained stuck in that stone for nearly a century, until the legendary Leonhard Euler proved himself a worthy king by furnishing the unlikely answer:
Those numbers add up to π2/6.
This hard-to-follow recipe comes from the Indian savant Ramanujan, known for his humble origins and his cosmic intuition.
This formula is undeniably ugly. It throws together big, weird, seemingly arbitrary numbers. But just as undeniable is its power. It is the precise opposite of Gottfried’s Slow Jam: lacking in elegance, but astounding in its speed.
After just the first term (1103) we already have π accurate to the seventh decimal place: 3.1415927. Add in another two terms, and we’re at the 20th decimal place.
Ugly, but fast.
Now, mathematics is full of alternating series, ones that switch from positive to negative, positive to negative…. But what I love about this particular formula is that it’s a two-step alternation: positive, positive, negative, negative, positive, positive, negative, negative…
It reminds me of a drunkard staggering this way and that way across a dance-floor, intoxicated half by music and half by drink. While everyone else dances to Gottfried’s Slow Jam, our lone drunkard enjoys the Tequila Two-Step – and that’s a beautiful thing in its own right.
I’ll let you look up Hedwig and the Angry Inch, and decide for yourself whether this is brilliantly apt metaphor, or a reference far too mature for this blog’s innocent, doe-eyed audience. (Maybe both?)
Arriving on the scene in 1593 courtesy of François Viète, this wasn’t just the first great formula for π. It was the first infinite product in the history of mathematics.
A rambling equation full of 1/2’s and nested square roots, it was more elegant in its original form (which produced a product of 2/π); here, it has been mangled somewhat so that it produces a value of π itself.
(Postscript: I chose “The Halfman Cometh” for the cool sound of the name alone. But I just looked up the “The Iceman Cometh” and gosh, does that play sound depressing. This post was supposed to be about math, and somehow it has turned into a grim tour of the deepest valleys of the human psyche – which I guess maybe isn’t so different.)
First generated by John Machin in 1706, this monstrously efficient formula earned a whole genre of copycats.
Like the Ugly Ninja, it allows us to compute π to astonishing precision, in a surprisingly small number of terms.
This tower is what mathematician’s call a continued fraction.
Although now marginalized (or omitted entirely) from the school curriculum, continued fractions have long been mathematically important objects. Just ask Evelyn Lamb, who has written fondly on the topic.
They’re a lot harder to wrap your head around than decimals. But they’re also a lot more powerful, allowing for swift and succinct approximation of any irrational number.
We conclude with perhaps the zaniest of all these zany formulas.
π, from the primes.
There’s a flavor of mathematics that I love. You taste it when two utterly separate fields of inquiry, against all odds, lead to the same destination. It’s like finding a wormhole through spacetime, a secret passage between distant rooms in the mansion of thought.
This formula is one of the most concentrated doses of that flavor that you’ll find anywhere. How could the prime numbers – jagged, here-and-there creatures, almost pattern-less in their unpredictable distribution – produce π?
(Something about gamma functions, apparently. But never let a gamma function quell your sense of mystery and awe.)
Happy π day!