Two of my favorite numbers are pi:

and the golden ratio:

They’re related:

Greg Egan and I came up with this formula last weekend. It’s probably not new, and it certainly wouldn’t surprise experts, but it’s still fun coming up with a formula like this. Let me explain how we did it.

History has a fractal texture. It’s not exactly *self-similar*, but the closer you look at any incident, the more fine-grained detail you see. The simplified stories we learn about the history of math and physics in school are like blurry pictures of the Mandelbrot set. You can see the overall shape, but the really exciting stuff is hidden.

François Viète is a French mathematician who doesn’t show up in those simplified stories. He studied law at Poitiers, graduating in 1559. He began his career as an attorney at a quite high level, with cases involving the widow of King Francis I of France and also Mary, Queen of Scots. But his true interest was always mathematics. A friend said he could think about a single question for up to three days, his elbow on the desk, feeding himself without changing position.

Nonetheless, he was highly successful in law. By 1590 he was working for King Henry IV. The king admired his mathematical talents, and Viète soon confirmed his worth by cracking a Spanish cipher, thus allowing the French to read all the Spanish communications they were able to obtain.

In 1591, François Viète came out with an important book, introducing what is called the new algebra: a symbolic method for dealing with polynomial equations. This deserves to be much better known; it was very familiar to Descartes and others, and it was an important precursor to our modern notation and methods. For example, he emphasized care with the use of variables, and advocated denoting known quantities by consonants and unknown quantities by vowels. (Later people switched to using letters near the beginning of the alphabet for known quantities and letters near the end like for unknowns.)

In 1593 he came out with another book, *Variorum De Rebus Mathematicis Responsorum, Liber VIII*. Among other things, it includes a formula for pi. In modernized notation, it looks like this:

This is remarkable! First of all, it looks cool. Second, it’s the earliest known example of an infinite product in mathematics. Third, it’s the earliest known formula for the exact value of pi. In fact, it seems to be the earliest formula representing a number as the result of an infinite process rather than of a finite calculation! So, Viète’s formula has been called the beginning of analysis. In his article “The life of pi”, Jonathan Borwein went even further and called Viète’s formula “the dawn of modern mathematics”.

How did Viète come up with his formula? I haven’t read his book, but the idea seems fairly clear. The area of the unit circle is pi. So, you can approximate pi better and better by computing the area of a square inscribed in this circle, and then an octagon, and then a 16-gon, and so on:

If you compute these areas in a clever way, you get this series of numbers:

and so on, where is the area of a regular *n*-gon inscribed in the unit circle. So, it was only a small step for Viète (though an infinite leap for mankind) to conclude that

or, if square roots in a denominator make you uncomfortable:

The basic idea here would not have surprised Archimedes, who rigorously proved that

by approximating the circumference of a circle using a regular 96-gon. Since , you can draw a regular 96-gon with ruler and compass by taking an equilateral triangle and bisecting its edges to get a hexagon, bisecting the edges of that to get a 12-gon, and so on up to 96. In a more modern way of thinking, you can figure out everything you need to know by starting with the angle and using half-angle formulas 4 times to work out the sine or cosine of . And indeed, before Viète came along, Ludolph van Ceulen had computed pi to 35 digits using a regular polygon with sides! So Viète’s daring new idea was to give an *exact* formula for pi that involved an *infinite* process.

Now let’s see in detail how Viète’s formula works. Since there’s no need to start with a square, we might as well start with a regular *n*-gon inscribed in the circle and repeatedly bisect its sides, getting better and better approximations to pi. If we start with a pentagon, we’ll get a formula for pi that involves the golden ratio!

We have

so we can also compute pi by starting with a regular *n*-gon and repeatedly doubling the number of vertices:

The key trick is to write as a ‘telescoping product’:

Thus, taking the limit as we get

where we start with the area of the *n*-gon and keep ‘correcting’ it to get the area of the *2n*-gon, the *4n*-gon, the *8n*-gon and so on.

There’s a simple formula for the area of a regular *n*-gon inscribed in a circle. You can chop it into right triangles, each of which has base and height , and thus area :

Thus,

This lets us understand how the area changes when we double the number of vertices:

This is nice and simple, but we really need a recursive formula for this quantity. Let’s define

Why the factor of 2? It simplifies our calculations slightly. We can express in terms of using the half-angle formula for the cosine:

Now we’re ready for some fun! We have

so using our recursive formula , which holds for any , we get

I think this deserves to be called the **generalized Viète formula**. And indeed, if we start with a square, we get

and

giving Viète’s formula:

as desired!

But what if we start with a pentagon? For this it helps to remember a beautiful but slightly obscure trig fact:

and a slightly less beautiful one:

It’s easy to prove these, and I’ll show you how later. For now, note that they imply

and

Thus, the formula

gives us

or, cleaning it up a bit, the formula we want:

Voilà!

There’s a lot more to say, but let me just explain the slightly obscure trigonometry facts we needed. To derive these, I find it nice to remember that a regular pentagon, and the pentagram inside it, contain lots of similar triangles:

Using the fact that all these triangles are similar, it’s easy to show that for any one, the ratio of the long side to the short side is to 1, since

Another important fact is that the pentagram trisects the interior angle of the regular pentagon, breaking the interior angle of into 3 angles of :

Again this is easy and fun to show.

Combining these facts, we can prove that

and

To prove the first equation, chop one of those golden triangles into two right triangles and do things you learned in high school. To prove the second, do the same things to one of the short squat isosceles triangles:

Starting from these equations and using , we can show

and, just for completeness (we don’t need it here):

These require some mildly annoying calculations, where it helps to use the identity

Okay, that’s all for now! But if you want more fun, try a couple of puzzles:

**Puzzle 1.** We’ve gotten formulas for pi starting from a square or a regular pentagon. What formula do you get starting from an equilateral triangle?

**Puzzle 2.** Using the generalized Viète formula, prove Euler’s formula

Conversely, use Euler’s formula to prove the generalized Viète formula.

So, one might say that the real point of Viète’s formula, and its generalized version, is not any special property of pi, but Euler’s formula.