# Complex Analysis Solution to the Basel Problem ($\sum_{k=1}^\infty \frac{1}{k^2}$)

Most of us are aware of the famous "Basel Problem":

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

I remember reading an elegant proof for this using complex numbers to help find the value of the sum. I tried finding it again to no avail. Does anyone know a complex number proof for the solution of the Basel Problem?

-
Any textbook in complex analysis has at least one proof written out or presented as an exercise. –  zyx Apr 12 '12 at 0:00
@zyx I only have "Complex Variables and Applications, Second Edition" by Ruel Churchill. Its about 40 years old now. It contains no proof. –  Argon Apr 12 '12 at 0:05
That's surprising, I was thinking of Churchill with its computational style of problems as exactly the kind of book that would have it. –  zyx Apr 12 '12 at 6:39
@Argon: I don't know about the second edition, but exercise 14 in section 57 of the fifth edition has an equivalent result (alternating sum = $\pi^2/12$). –  Hans Lundmark Apr 15 '12 at 9:52

The most straightforward way I know is to consider the contour integral $$\frac{1}{2\pi i}\oint\pi\cot(\pi z)\frac{1}{z^2}\mathrm{d}z\tag{1}$$ around circles whose radii are $\frac12$ off an integer.

The function $\pi\cot(\pi z)$ has residue $1$ at every integer. Thus the integral in $(1)$ equals the residue of $\pi\cot(\pi z)\dfrac{1}{z^2}$ at $z=0$ plus twice the sum in question (one for the positive integers and one for the negative integers).

The integral in $(1)$ tends to $\color{blue}{0}$ as the radius goes to $\infty$.

The Laurent expansion of $\pi\cot(\pi z)\dfrac{1}{z^2}$ at $z=0$ is $$\frac{1}{z^3}-\frac{\pi^2}{3z}-\frac{\pi^4z}{45}-\frac{2\pi^6z^3}{945}-\dots\tag{2}$$ The only term that contributes to the residue at $z=0$ is the $\dfrac1z$ term. That is, the residue at $z=0$ of $(2)$ is $\color{green}{-\frac{\pi^2}{3}}$. Thus, the sum in question must be $\color{red}{\frac{\pi^2}{6}}$ (so that $\color{green}{-\frac{\pi^2}{3}}+2\cdot\color{red}{\frac{\pi^2}{6}}=\color{blue}{0}$).

-

All the proofs I know of are in Kalman's article. There is one that use complex analysis (residues, to be concrete).

-

Although there are so many different contour integrals to use as evidenced by the different posts to this question and other similar questions, here is a neat one I used. Consider the integral: $$\int_C \frac{\frac{1}{z^2}}{e^{i \pi z}+1} dz$$ Where C traverses through a square whose diagonals intersect at the origin in the complex plane and whose side lengths are 2N, where N is a very large even number. It can be shown through parametrizing the sides of the square and using the estimation lemma that this integral along C vanishes for very large 2N. Now, we need to calculate the residues of every pole. Let $$f(z)=\frac{\frac{1}{z^2}}{e^{i \pi z}+1}$$ We see there are first order poles at $z=\pm (2n-1)$ for all positive integers n. There is also a second order pole at z=0. We will calculate the residues for the first order poles. Let a be an odd integer $$Res (f(z),a)=\lim \limits_{z \to a} {(z-a)f(z)}= \frac{i}{\pi a^2}$$ For the second order pole at z=0: $$Res (f(z),0)=\lim \limits_{z \to 0} \frac{d}{dz} (z^2f(z))=\frac{-\pi i}{4}$$ We now utilize Cauchy's residue theorem, which states: $$\int_C g(z) dz= 2\pi i\sum{Res(g(z))}$$ if the singularities of $g(z)$ are located in the interior of C. In our case, $$\int_C \frac{\frac{1}{z^2}}{e^{i \pi z}+1} dz= 2 \pi i (\frac{-\pi i}{4}) + 2 \pi i \sum_{n=0}^ \infty\frac{2i}{\pi (2n+1)^2}$$ The $"2"$ inside the summation accounts for the fact that the residue of a particular negative odd integer for $f(z)$ is equivalent to the residue of its positive counterpart. We also know the left hand side, from what was established earlier, equals $0$. Thus, $$0= 2 \pi i (\frac{-\pi i}{4}) + 2 \pi i \sum_{n=0}^ \infty\frac{2i}{\pi (2n+1)^2}$$ Dividing both sides by $2 \pi i$ and adding $\frac{\pi i}{4}$ to both sides, we see: $$\frac{\pi i}{4}=\sum_{n=0}^ \infty\frac{2i}{\pi (2n+1)^2}$$ Now, multiplying both sides by $\frac{\pi}{2i}$, we get the result: $$\frac {\pi^2}{8}= \sum_{n=0}^ \infty\frac{1}{(2n+1)^2}$$

Rearranging the terms from the $\sum_{n=1}^ \infty\frac{1}{n^2}$, we can extrapolate that $$\frac{3}{4}\sum_{n=1}^ \infty\frac{1}{n^2}= \sum_{n=0}^ \infty\frac{1}{(2n+1)^2}$$ Thus, we see: $$\sum_{n=1}^ \infty\frac{1}{n^2}= \frac{\pi^2}{6}$$ As a fun fact, you can get more zeta values considering the contour integral: $$\int_C \frac{\frac{1}{z^{2n}}}{e^{i \pi z}+1} dz$$ where n is a positive integer and C is the same contour as used before.

-