Where do Mathematicians Get Inspiration for Pi Formulas?

Here are three more gems presented in chronological order.

Viète and the first infinite product in the history of mathematics (1593)

\begin{align*} \frac{2}{\pi}=\sqrt{\frac{1}{2}}\sqrt{\frac{1}{2}+\frac{1}{2}\sqrt{\frac{1}{2}}} \sqrt{\frac{1}{2}+\frac{1}{2}\sqrt{\frac{1}{2}+\frac{1}{2}\sqrt{\frac{1}{2}}}}\cdots\tag{1} \end{align*}

Here we understand (1) as infinite product \begin{align*} \frac{2}{\pi}=u_1u_2u_3\cdots=\lim_{n\rightarrow\infty}(u_1u_2\cdot u_n) \end{align*} where \begin{align*} u_1=\sqrt{\frac{1}{2}}\qquad\text{and}\qquad u_n=\sqrt{\frac{1}{2}(1+u_{n-1})}\qquad \text{for }n>1 \end{align*}

In 1593 Viète expressed the number $\pi$ as an infinite product, which is the first infinite product in the history of mathematics. His proof was done in the spirit of Archimedes ideas: $\pi$ is the limit of the areas $A_{2n}$ of the regular $2^n$-gons inscribed in the circle of radius one.

The expression (1) is a particular case of a more general formula, given two hundred years later by Euler: \begin{align*} \frac{\sin\theta}{\theta}&=\cos\frac{\theta}{2}\cos\frac{\theta}{4}\cos\frac{\theta}{8}\cdots\cos\frac{\theta}{2^n}\cdots =\lim_{n\rightarrow \infty}(v_1v_2\cdots v_n)\qquad \text{for }\theta\ne 0 \end{align*} where \begin{align*} v_1=\cos\frac{\theta}{2}\qquad\text{and}\qquad v_n=\cos\frac{\theta}{2^n}&=\sqrt{\frac{1}{2}\left(1+\cos\frac{\theta}{2^{n-1}}\right)}\\ &=\sqrt{\frac{1}{2}(1+v_{n-1})} \qquad\text{for}\qquad n>1 \end{align*} The proof of Euler's formula is simple: Applying repetitively the trigonometric identity $$\sin\theta=2\cos\frac{\theta}{2}\sin\frac{\theta}{2}$$ we obtain \begin{align*} \frac{\sin\theta}{\theta}&=\cos\frac{\theta}{2}\cdot\frac{\sin(\theta/2)}{\theta/2} =\cos\frac{\theta}{2}\cos\frac{\theta}{4}\cdot\frac{\sin(\theta/4)}{\theta/4} =\cdots\\ &=\cos\frac{\theta}{2}\cos\frac{\theta}{4}\cos\frac{\theta}{8}\cdot\cos\frac{\theta}{2^n}\frac{\sin(\theta/2^n)}{\theta/2^n} \end{align*} When $n$ tends to infinity, $x=\frac{\theta}{2^n}$ tends to $0$, thus $\frac{\sin x}{x}$ tends to $1$, which proves the claim.

Ramanujan, Elliptic Integrals and $\pi$ (1914)

\begin{align*} \frac{1}{\pi}=\frac{2\sqrt{2}}{9801}\sum_{n=0}^\infty\frac{(4n!)}{4^{4n}(n!)^4}\left[1103+26390n\right]\left(\frac{1}{99^4}\right)^n\tag{2} \end{align*}

This incredible identity is one of $17$ identities of $\frac{1}{\pi}$ stated by Ramanjuan 1914 in the article Modular equations and approximations to $\pi$ without proof.

The mathematicians of the second half of the 19th century and the beginning 20th century developed methods for the efficient calculation of certain constants which appear in the theory of elliptic functions. Ramanjuan had a special mastery of such calculations.

A proof of (2) was not known until 1987 the Borwein brothers reconstituted a full proof, published in Pi and the AGM. The proof is complicated, requires a lot of work and it is not easy even to state the essential ideas. The main ingredients are generalized elliptic integrals, modular functions, theta functions and the AGM.

Notes:

  • In section 5.8 An overview of the proof by J. Borwein and P. Borwein in the book The number $\pi$ by P. Eymard and J-P. Lafon present the authors on a few pages a summary of the essential ideas in form of propositions which are too technical to state them here isolated, without context.

  • The paper Ramanujan's Series for $\frac{1}{\pi}$: A Survey contains nice information around (2) and friends.

An interesting fact is that series of type (2) can be formidably used to approximate $\pi$ due to their fast convergence behaviour. With the methods the Borwein brothers used for their proof they and independently the brothers Chudnovsky discovered the identity \begin{align*} \frac{1}{\pi}=12\sum_{n=0}^\infty\frac{(-1)^n(6n)!(13591409+545140134n)}{(n!)^3(3n)!(640320^3)^{n+1/2}} \end{align*} which is even more efficient, since each term of the series provides $14$ additional digits of $\pi$.

Another astonishing series due to Ramanujan is \begin{align*} \frac{1}{\pi}=\sum_{n=0}^\infty\binom{2n}{n}^3\frac{42n+5}{2^{12n+4}} \end{align*} The denominator of the general term contains the number $16\cdot2^{12n}$. This means that one can calculate the digits in base $2$ from the $n$-th to the $2n$-th without having to calculate the first $n$ digits beforehand. This is the main theme of the third gem.

The formula of Bailey, Borwein and Plouffe (1997)

\begin{align*} \pi=\sum_{n=0}^\infty\frac{1}{16^n}\left(\frac{4}{8n+1}-\frac{2}{8n+4}-\frac{1}{8n+5}-\frac{1}{8n+6}\right)\tag{3} \end{align*}

This rather simple formula was of particular interest to the three mathematicians due to the factor $\frac{1}{16^n}$ in the general term, as a factor of an arithmetically very simple function of $n$.

They were able to extract from this an algorithm (named BBP) to calculate the $d$-th digit of the expansion of $\pi$ individually in base $16$, and this even for very large $d$, without needing to know or calculate the digits preceding $d$. For example, the $10^{12}$th digit of $\pi$ in base $2$ is $1$.

The sum of the RHS of (3) is of the form \begin{align*} S=4S_1-2S_4-S_5-S6 \end{align*} with \begin{align*} S_k&=\sum_{n=0}^\infty\frac{1}{16^n(8n+k)}\\ &=(\sqrt{2})^k\sum_{n=0}^\infty\left[\frac{x^{8n+k}}{8n+k}\right]_{x=0}^{x=1/\sqrt{2}}\\ &=(\sqrt{2})^k\sum_{n=0}^\infty\int_0^{1/\sqrt{2}}x^{8n+k-1}\,dx\\ &=(\sqrt{2})^k\int_{0}^{1/\sqrt{2}}x^{k-1}\sum_{k=0}^\infty x^{8n}\,dx\\ &=(\sqrt{2})^k\int_0^{1/\sqrt{2}}\frac{x^{k-1}}{1-x^8}\,dx \end{align*} where $k=1,4,5,6$ .

Hence \begin{align*} S=\int_{0}^{1/\sqrt{2}}\frac{8x^5+4\sqrt{2}x^4+8x^3-4\sqrt{2}}{x^8-1}\,dx \end{align*}

We obtain \begin{align*} 8x^5+4\sqrt{2}x^4+8x^3-4\sqrt{2}=8(x^2+1)(x^2+\sqrt{2}x+1)\left(x-\frac{1}{\sqrt{2}}\right) \end{align*} and \begin{align*} x^8-1=(x^2+1)(x^2+\sqrt{2}x+1)(x^2-\sqrt{2}x+1)(x^2-1) \end{align*} Setting $\sqrt{2}x=t$ we get \begin{align*} S&=8\int_0^{1/\sqrt{2}}\frac{x-\frac{1}{\sqrt{2}}}{(x^2-\sqrt{2}x+1)(x^2-1)}\,dx\\ &=16\int_0^{1}\frac{t-1}{(t^2-2t+2)(t^2-2)}\,dt\\ &=-2\int_0^1\frac{2t-2}{t^2-2t+2}\,dt+4\int_0^1\frac{dt}{1+(t-1)^2}+2\int_0^1\frac{-2t}{2-t^2}\,dt\\ &=[-2\log(t^2-2t+2)+4\arctan(t-1)+2\log(2-t^2)]_{t=0}^{t=1}\\ &=\pi \end{align*}

and (3) follows.

Note: These three gems are from The number $\pi$ by P. Eymard and J-P. Lafon which contains many more fascinating identities of $\pi$.


Many such formulas come from the generalized binomial expansion theorem or geometric series and a bit of interpretation of the definition of $\pi$. One such example is the Leibniz formula for pi, which comes by noting that

$$\int_0^x\frac1{1+t^2}\ dt=\arctan(x)$$

From here, it follows that

$$\frac\pi4=\arctan(1)=\int_0^x\frac1{1+t^2}\ dt=\int_0^x\sum_{n=0}^\infty(-1)^nt^{2n}\ dt=\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}$$

By applying an Euler transform to this, we get another representation of pi:

$$\frac\pi2=\sum_{n=0}^\infty\frac{n!}{(2n+1)!!}$$

You could take the geometric meaning of pi as area (integral) of a circle to deduce that

$$\frac\pi4=\int_0^1\sqrt{1-x^2}\ dx=\int_0^1\sum_{n=0}^\infty\binom{1/2}n(-1)^nx^{2n}\ dx=\sum_{n=0}^\infty\binom{1/2}n\frac{(-1)^n}{2n+1}$$

You noted that

$$\sum_{k=1}^\infty\frac1{k^2}=\frac{\pi^2}6$$

This is a special case of the Riemann zeta function, which yields another form after an Euler transform:

$$\frac{\pi^2}6=2\sum_{n=0}^\infty\frac1{2^{n+1}}\sum_{k=0}^n\binom nk\frac{(-1)^k}{(k+1)^2}$$

which converges much more rapidly.

Other places pi may show up, relating especially to logarithms:

$$e^{ix}=\cos(x)+i\sin(x)$$

Which is famously known as Euler's formula.

Beyond this, I think the formulas get less and less intuitive and more like a race for the best formula to apply.


One method, no doubt, is due to reasoning involving the classic definition of $pi$ (the ratio of the diameter to the circumference). For example the ratio of the diameter of a regular polygon to perimeter as the number of sides goes to infinity gives $\pi$. Starting with the square and doubling the number of sides of the polygon yields the sequence $$2\sqrt2$$ $$4\sqrt{2-\sqrt2}$$ $$8\sqrt{2-\sqrt{2+\sqrt2}}$$ $$16\sqrt{2-\sqrt{2+\sqrt{2+\sqrt2}}}$$ $$\dots$$

You could derive something similar for $\pi^2$ or $\pi^3$ using the areas of regular polygons, surface areas/volumes of convex regular polyhedrons, etc.

Just speculating: one might get inspiration from physical phenomenon such as angular velocity vs linear velocity for an object traveling in a circle, angular momentum, torque, etc.