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: $latex 1 + 2 + 3 + 4 + …$. This mathematical shorthand notation for this is $latex \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: $latex \sum\limits_{n=1}^{\infty} \frac{1}{n^2}$. Strangely, this number grows towards the constant $latex 1.644934…$. If we look at the first term, we have $latex \frac{1}{1^2}=1$. The second term is $latex \frac{1}{2^2}=\frac{1}{4}=0.25$. The third term is $latex \frac{1}{3^2} \approx 0.111…$. The fourth term equals $latex \frac{1}{4^2}=\frac{1}{16}=0.0625$. If we add up the first four terms, we get $latex 1+0.25+0.111…+0.0625 \approx 1.42$. The fifth term equals $latex \frac{1}{5^2} = 0.04$, the sixth term is equal to $latex \frac{1}{6^2} \approx 0.02$ and the seventh term $latex \frac{1}{7^2} \approx 0.02$ and the eight term $latex \frac{1}{8^2} \approx 0.015$. If we add up the first eight terms, we get $latex 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 $latex 1.644934…$. What is this number exactly? Euler showed that this number equals $latex \frac{\pi^2}{6}$, so here pi shows up! In the next section, the process of finding $latex \frac{\pi^2}{6}$ is explained.

## The Pi-eautful Solution

Why $latex \pi$? How is $latex \pi$ involved here? And what is the $latex 6$ 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 $latex x^2-2x$. We know that $latex 0$ is a solution and $latex 2$ is a solution. This polynomial can be factored into $latex (x-2)(x-0)$. If you multiply this out, you indeed get $latex x^2-0x-2x+0=x^2-2x$. 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 $latex \frac{\sin(x)}{x}$. In a while, we will see why. The Taylor series expansion of $latex \sin(x)$ equals $latex x – \frac{x^3}{3!} + \frac{x^5}{5!}-\frac{x^7}{7!}+…$. Dividing both sides by $latex x$ yields the following: $latex \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 $latex \frac{\sin(x)}{x}$, we can solve the riddle! Euler first looked at the following function: $latex \frac{\sin(x)}{x}$. Notice that the roots of this function are simply the roots of $latex \sin(x)$ (except for $latex x=0$). Why? Suppose that $latex x_0$ is a root of $latex \sin(x)$. So, $latex \sin(x_0)=0$. Then, $latex \frac{\sin(x_0)}{x_0}=\frac{0}{x_0}=0$. Nice! If you are interested, you can figure out that any root of $latex \sin(x)$ is indeed a root of $latex \frac{\sin(x)}{x}$ (except for $latex x=0$). The roots of $latex \sin(x)$ are well known and are $latex n \cdot \pi$ for any integer $latex n$. Thus, the roots of $latex \frac{\sin(x)}{x}$ are $latex n \cdot \pi$ for any integer $latex n$ except for $latex n=0$. 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: $latex \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 $latex 0$.

Now we can gather all quadratic terms here: $latex \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 $latex 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 $latex 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: $latex QuadraticTerms(\frac{\sin(x)}{x}) = QuadraticTerms(\frac{\sin(x)}{x})$, thus $latex -\frac{x^2}{\pi^2}\sum\limits_{n=1}^{\infty} \frac{1}{n^2}=-\frac{x^2}{6}$. Therefore: $latex \frac{\pi^2}{6}=\sum\limits_{n=1}^{\infty} \frac{1}{n^2}$. Nice!

## Conclusion (TL;DR)

By combining two theorems, Euler showed that $latex \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!