Pi Day! Pi and The Basel Problem

Pi Day! Pi and The Basel Problem
Photo by DDP / Unsplash

Huray! It was Pi day last week! To celebrate this, I will sketch the solution of a well-known problem in which pi shows up unexpectedly. One entertaining introduction video about this problem can be found here.

The Basel Problem

More than 300 years ago, Pietro Mengoli posed the Basel problem. A series is an addition of a sequence of numbers. One simple sequence is the addition of all integers:

1 + 2 + 3 + 4 + …

. This mathematical shorthand notation for this is

\sum\limits_{n=1}^{\infty} = 1 + 2 + 3 + 4 + …

. It means, sum over all integers starting from one and never stop. As you can see, this number grows every time a number is added and therefore, this series diverges. That is, the more terms are added, the bigger the number becomes.

Some series are convergent. That is, the more numbers you add, the closer the summation of the terms grows towards a fixed number. In the Basel problem, we look at the following series:

\sum\limits_{n=1}^{\infty} \frac{1}{n^2}

. Strangely, this number grows towards the constant


. If we look at the first term, we have


. The second term is


. The third term is

\frac{1}{3^2} \approx 0.111…

. The fourth term equals


. If we add up the first four terms, we get

1+0.25+0.111…+0.0625 \approx 1.42

. The fifth term equals

\frac{1}{5^2} = 0.04

, the sixth term is equal to

\frac{1}{6^2} \approx 0.02

and the seventh term

\frac{1}{7^2} \approx 0.02

and the eight term

\frac{1}{8^2} \approx 0.015

. If we add up the first eight terms, we get

1+0.25+0.111…+0.0625+0.04+0.02…+0.02…+0.02…+0.015… \approx 1.53

. If we make the number of terms larger and larger, we will get closer and closer to


. What is this number exactly? Euler showed that this number equals


, so here pi shows up! In the next section, the process of finding


is explained.

The Pi-eautful Solution



? How is


involved here? And what is the


doing there? In order to make these connection, we first have to know some underlying theorems.

Factorization of Polynomials

The fundamental theorem of algebra states that every single-variable polynomial (lines, parabolas and other formulas involving weighted sums of powers of one variable) can be factored into a product of linear factors and irreducible quadratic factors. For example, take the single-variable polynomial


. We know that


is a solution and


is a solution. This polynomial can be factored into


. If you multiply this out, you indeed get


. This fact will be used in the proof.

Taylor series

Every function can be approximated by its Taylor series. In the proof, Euler approximated the function


. In a while, we will see why. The Taylor series expansion of



x - \frac{x^3}{3!} + \frac{x^5}{5!}-\frac{x^7}{7!}+…

. Dividing both sides by


yields the following:

\frac{\sin(x)}{x} = 1 - \frac{x^2}{3!} + \frac{x^4}{5!} - …


Towards a solution

By combining both methods (both the Fundamental Theorem of Algebra and the Taylor approximation of


, we can solve the riddle! Euler first looked at the following function:


. Notice that the roots of this function are simply the roots of


(except for


). Why? Suppose that


is a root of


. So,


. Then,


. Nice! If you are interested, you can figure out that any root of


is indeed a root of


(except for


). The roots of


are well known and are

n \cdot \pi

for any integer


. Thus, the roots of



n \cdot \pi

for any integer


except for


. By the Fundamental Theorem of Algebra (and by using the Weierstrass Factorization which I will not explain here), we know that using the roots, we can create an approximating polynomial for the function:

\frac{\sin(x)}{x}= (1 - \frac{x}{\pi})(1 + \frac{x}{\pi})(1 - \frac{x}{2\pi})(1 + \frac{x}{2\pi})(1 - \frac{x}{3\pi})(1 + \frac{x}{3\pi})…

. Notice that for any zero of the function this approximation will indeed yield



Now we can gather all quadratic terms here:

\frac{\sin(x)}{x} =(1 - \frac{x^2}{\pi^2})(1 - \frac{x^2}{4\pi^2})(1 - \frac{x^2}{9\pi^2})…

. This is found by computing the products of each pair of consecutive factors in the Weierstrass Factorization. If we now only consider the quadratic terms, we find

QuadraticTerms(\frac{\sin(x)}{x}) =-\frac{x^2}{\pi^2}(\frac{1}{1} + \frac{1}{4} + \frac{1}{9} + …) = -\frac{x^2}{\pi^2} \sum\limits_{n=1}^{\infty} \frac{1}{n^2}

. If we look at the quadratic terms in the Taylor expansion, we find that

QuadraticTerms(\frac{\sin(x)}{x})=- \frac{x^2}{3!}=-\frac{x^2}{6}


Now we have found the solution by equating these two solution! Namely:

QuadraticTerms(\frac{\sin(x)}{x}) = QuadraticTerms(\frac{\sin(x)}{x})

, thus

-\frac{x^2}{\pi^2}\sum\limits_{n=1}^{\infty} \frac{1}{n^2}=-\frac{x^2}{6}

. Therefore:

\frac{\pi^2}{6}=\sum\limits_{n=1}^{\infty} \frac{1}{n^2}

. Nice!

Conclusion (TL;DR)

By combining two theorems, Euler showed that

\sum\limits_{n=1}^{\infty} \frac{1}{n^2}=\frac{\pi^2}{6}

– which is quite surprising. If you feel this sketch is not rigorous enough or if you would like to add something, feel free to join the discussion below this post. Also feel free to ask any questions!