Saturday, July 18, 2015

Complex Analysis and the Basel Problem

Arguably the oldest and most famous infinite series in mathematics is the surprising and celebrated Basel series or Basel problem $$S = \sum_{n=1}^\infty\frac 1{n^2}.$$ For hundreds of years the closed form $$S=\frac{\pi^2}6$$ has been known, and has been further used to prove scores of other results involving integrals, special functions, and the like. However, the series is quite hard to evaluate - Euler's original proof involving Taylor expansions of trigonometric functions is ambiguous and in modern times, without rigorization, hardly more than a heuristic. In this post we will prove the identity above by means of complex analysis, using the residue theorem. The methods that we will use prove useful in the evaluation of all sorts of infinite series. Source: the ideas from this derivation are based upon those in this document.

Let's begin. For convenience, write $f(z)=z^{-2}$ so that $S=\sum_{n=1}^\infty f(n)\equiv \sum f(n)$. Define $$g(z)=f(z)\cot(\pi z)=\frac{\cos(\pi z)}{z^2\sin(\pi z)}.$$ We would like to study, and further understand, the pole structure of $g(z)$ by enumerating all poles and calculating the residues at these poles. This is not a particularly hard task as we just need to find all values that make the denominator vanish: i.e. we need to solve $$z^2\sin(\pi z)=0.$$ Obviously $\sin(\pi z)$ vanishes at all real integer values of $z$, in particular at $z=\pm 1,\pm 2,\dots$ and $z=0$. The only possible way for $z^2$ to vanish is $z=0$, and this is already accounted for by the sine. Thus we have a whole bunch of simple poles, one at each nonzero integer, and an order-three pole at the origin.

Figure 1: A plot of the denominator $z^2\sin(\pi z)$
on $\mathbb R$ showing the integral zeroes
(which correspond to poles in $g$).

Next, we should compute the residues at these poles (throughout $k$ denotes an integer). Since there's only an order one divergence corresponding to the poles $k\neq 0$, the poles are simple and the residue is then $$r_k = \operatorname{Res}_{z=k}\frac{\cos(\pi z)}{z^2\sin(\pi z)} = \lim_{z\to k}\frac{(z-k)\cos(\pi z)}{z^2\sin(\pi z)}.$$ To evaluate this take out the convergent part $\frac{\cos(\pi z)}{z^2}$: $$r_k=\frac{\cos(\pi k)}{k^2}\lim_{z\to k}\frac{z-k}{\sin(\pi z)}.$$ In the rightmost limit we can apply L'Hopital's rule to get $$r_k = \frac{\cos(\pi k)}{k^2}\lim_{z\to k}\frac 1{\pi\cos(\pi z)}=\frac 1{\pi k^2}$$ and we have completed our evaluation of the first-order residues.

What about the order-three residue $r_0$ at $z=0$? Here, we have some options - either do some ugly series expansions to find a certain coefficient, or do some ugly derivatives. We'll do the latter (exericse: show that the other way is equivalent!) Using the standard formula for a higher-order pole: $$r_0 = \frac 1{2!}\lim_{z\to 0}\frac{d^2}{dz^2}\left(\frac{(z-0)^3\cos(\pi z)}{z^2\sin(\pi z)}\right) = \frac 1 2\lim_{z\to 0}\frac{d^2}{dz^2}(z\cot(\pi z)),$$ we compute a juicy second derivative (using WolframAlpha if you're sane) to get $$r_0=\pi\lim_{z\to 0}\big[\csc^2(\pi z)(\pi z\cot(\pi z)-1)\big]=\pi\lim_{z\to 0}\big[\csc^2(z)(z\cot z-1)\big].$$ This is an easy limit using common truncated series expansions of $\csc^2(x)\approx\frac 1 {x^2}$ and $\cot(x)\approx\frac 1 x-\frac x 3$: $$r_0=\pi\lim_{z\to 0}\frac 1{x^2}\left(\frac x x-\frac{x^2}3-1\right)=\pi\lim_{z\to 0}-\frac 1 3=-\frac{\pi}3.$$ With these simple computational lemmas in hand, we can move on to the interesting part of the derivation.

The key idea is to integrate the function $g$ (that we've just computed the poles and residues of) around squares of ever-increasing side length around the origin indexed by some number $n$. From the residue theorem (and our work above) we will get a term proportional a partial sum of $S$. We'll then send $N\to\infty$ and show that this gives the result. The square contours $\Gamma_n$ will be positively oriented in the usual way, and we will set the vertices to be at $(1+i)(n+1/2),\;(1-i)(n+1/2),\;(-1+i)(n+1/2),\;(-1-i)(n+1/2).$ We multiply by $n+1/2$ rather than $n$ in order to pick up $n$ positive poles rather than $n-1$ and keep the calculation clean.

Figure 2: The concentric squares $\Gamma_i$
encircling the origin. Note that $\Gamma_n$
picks up $2n+1$ poles as is clear from the picture.

Using our calculations from above, applying the residue theorem to the integral on $\Gamma_n$ of $g$ gives $$\oint_{\Gamma_n}\frac{\cos(\pi z)}{z^2\sin(\pi z)}dz=2\pi i\left(-\frac\pi 3+2\sum_{i=1}^n\frac 1{\pi k^2}\right)$$ with the factor of $2$ in front of the sum compensating for the over-counting due to negative residues. If we could show that the integral vanished as $n\to\infty$, then we would have $$0=-\frac{2\pi^2i}3+4iS$$ by simple algebra which immediately tells us that $$S = \frac{2\pi^2 i}{3\cdot 4i}=\frac{\pi^2}6.$$ Thus it remains to prove:

Lemma 1. $$\oint_{\Gamma_n}\frac{\cos(\pi z)}{z^2\sin(\pi z)}dz\to 0\text{   as   }n\to\infty.$$

Proof. The remainder of this derivation is a rather boring and technical exercise in complex bounding using the length inequality $$\int_\Gamma f(z)dx\leq\operatorname{length}\Gamma\cdot\max_{z\in\Gamma}f(z).$$ Obviously $\operatorname{length}\Gamma_n = 4(2n+1) = 8n+4$, so it remains to bound the function $g$ on $\Gamma_n$ in such a way that that it assures that the maximum decreases strictly faster than $O(n)$.

Looking at Figure 2, the closest point on $\Gamma_n$ to the origin is any of the four points on the real/imaginary axes, which each have modulus $n+\frac 1 2$. Therefore on $\Gamma_n$ we have $$\vert z\vert\geq n+\frac 1 2\implies\left\vert\frac 1{z^2}\right\vert\leq\frac 1{(n+1/2)^2}\leq\frac 1{n^2},$$ so that $$\left\vert\frac{\cos(\pi z)}{z^2\sin(\pi z)}\right\vert\leq\frac 1{n^2}\vert\cot(\pi z)\vert$$ on $\Gamma_n$. This simplifies our problem drastically: we now need to show that the cotangent never blows up too fast. In particular we'll bound it from above by a constant $C$ which doesn't depend on $n$. This is quite easy to do using identities for the modulus of the cosine of some complex number. If you get stuck, see the link at the beginning of the post and scroll down. $\square$

Thus the proof is completed, and indeed $S=\frac{\pi^2}6.$

Saturday, June 27, 2015

$A=\pi r^2$: The Archimedean Way

One of the first and most well-known formulas in all of geometry is the formula giving the area of a circle. This incredibly simple equation, $A=\pi r^2$, has made it into basic mathematics curricula everywhere, and is appreciated for its well-known and fascinating beauty. However, most students who learn this formula have it shoved down their throats without ever learning its true origin, for the simple reason that most common proofs of the identity require a decent knowledge of integral calculus which is learned years after the formula is introduced. In this post, we will give an elementary derivation of the formula that any precalculus student could understand, based entirely on trigonometry and elementary limits. However, the very nature of the circle means that there will always be some calculus tucked away in the proof, and we will hide it by taking the following famous limit as a given: $$\lim_{x\to 0}\frac{\sin x}x=1.$$ Aside from this identity, our proof will essentially be a modernization of the methods originally used by Archimedes to estimate $\pi$ using regular polygons.

Let's begin. We'll start with a circle of any given radius $r$. (We could do the proof just in the special case $r=1$, but for completeness we'll keep it arbitrary).

Figure 1: Arbitrary circle

When Archimedes began to approximate $\pi$ thousands of years ago, he took as a given (we aren't) that $\pi$ was the area of the unit circle and aimed to approximate that instead. To do this, he inscribed a regular polygon with some number $N$ of vertices into the unit circle such that each vertex lay on the circle itself. He would then calculate the area of this polygon. As he increased $N$, he would get better and better lower bounds on $\pi$ but, with Greek methods, the area became increasingly hard to compute.


Figure 2: Inscribed 8-gon

Above is the inscription of an 8-gon ($N=8$). Our goal is to use trigonometry to find the total area of this inscribed polygon in terms of $N$, and then take the limit as $N\to\infty$. Our method will be to divide the $N$-gon into $N$ triangles by drawing radii from the center-point $A$ to each vertex, and then multiplying by $N$ to get the total area as shown.


Figure 3: Dividing into triangles showing angle $\theta$

To find the area of one triangle, we will use the famous trigonometric area formula $$A = \frac 1 2ab\sin\theta,$$ where $a$ and $b$ are two sides of the triangle and $\theta$ is the angle between them. (Deriving this is a simple exericse in trigonometry: recall that $A=\frac 1 2bh$ and express $b,h$ in terms of $\sin\theta$ and two lengths). In our case, we can see that $a=b=r$ (the radius of the circle). What about $\theta$? If we look at all the triangles in question, we note that the sum of $N$ total copies of $\theta$ should give us one full rotation of $2\pi$. Hence we can simply divide by $N$ to get the value of $\theta=\frac{2\pi}N$. Plugging this all in and multiplying by $N$, we find the area of the inscribed $N$-gon to be $$A_N = N\cdot\frac 1 2ab\sin\theta = \frac N 2r^2\sin\left(\frac{2\pi}N\right).$$ Thus, when we send $N\to\infty$ we should get better and better approximations to the area and the true area should come in the limit. Thus we need to compute $$\lim_{N\to\infty}A_N = \lim_{N\to\infty}\frac{Nr^2}2\sin\left(\frac{2\pi}N\right) = \frac{r^2}2\lim_{N\to\infty}N\sin\left(\frac{2\pi}N\right).$$ To evaluate the rightmost limit, set $n=\frac{2\pi}N$. Then $N=\frac{2\pi}n$, and as $N\to\infty$ the multiplicative inverse $n\to 0.$ Plugging this in, $$A = \frac{r^2}2\lim_{n\to 0}\frac{2\pi}n\sin n = \pi r^2\lim_{n\to 0}\frac{\sin n}n.$$ But, lo and behold, this is our result from above - this final limit is $1$! Thus, we see as desired that in the limit $$A = \pi r^2$$ and we are complete!

In conclusion, this is one of the most beautiful proofs of the circle area formula, if you ignore the bit of limit algebra at the end. The main idea of the proof, inscription of regular polygons, dates back thousands of years to the Greeks. All we have done here is apply some more modern methods to this classical insight to get a general formula, which truly shows just how powerful even the most ancient mathematical methods can be.