stylistic:style_transfer, information:filtering, quality:correction
Evaluating zeta functions

The fact that π cot(πz) has simple poles with residue 1 at each integer can be used to compute the sum ∑ n = − ∞ ∞ f (n). {\displaystyle \sum _{n=-\infty }^{\infty }f(n).}

Consider, for example, f (z) = z. Let Γ be the rectangle that is the boundary of with positive orientation, with an integer N. By the residue formula,

1 2 π i ∫ Γ N f (z) π cot (π z) d z = Res z = 0 + ∑ n = − N n ≠ 0 N n − 2. {\displaystyle {\frac {1}{2\pi i}}\int _{\Gamma _{N}}f(z)\pi \cot(\pi z)\,dz=\operatorname {Res} \limits _{z=0}+\sum _{n=-N \atop n\neq 0}^{N}n^{-2}.}

The left-hand side goes to zero as N → ∞ since | cot (π z) | {\displaystyle |\cot(\pi z)|} is uniformly bounded on the contour, thanks to using x = ± (1 2 + N) {\displaystyle x=\pm \left({\frac {1}{2}}+N\right)} on the left and right side of the contour, and so the integrand has order O (N − 2) {\displaystyle O(N^{-2})} over the entire contour. On the other hand,

z 2 cot (z 2) = 1 − B 2 z 2 2 ! + ⋯ {\displaystyle {\frac {z}{2}}\cot \left({\frac {z}{2}}\right)=1-B_{2}{\frac {z^{2}}{2!}}+\cdots } where the Bernoulli number B 2 = 1 6. {\displaystyle B_{2}={\frac {1}{6}}.}

(In fact, z / 2 cot(z / 2) = iz / 1 − e − iz / 2.) Thus, the residue Res is − π / 3. We conclude:

∑ n = 1 ∞ 1 n 2 = π 2 6 {\displaystyle \sum _{n=1}^{\infty }{\frac {1}{n^{2}}}={\frac {\pi ^{2}}{6}}} which is a proof of the Basel problem.

The same argument works for all f (x) = x − 2 n {\displaystyle f(x)=x^{-2n}} where n {\displaystyle n} is a positive integer, giving us ζ (2 n) = (− 1) n + 1 B 2 n (2 π) 2 n 2 (2 n) !. {\displaystyle \zeta (2n)={\frac {(-1)^{n+1}B_{2n}(2\pi)^{2n}}{2(2n)!}}.} The trick does not work when f (x) = x − 2 n − 1 {\displaystyle f(x)=x^{-2n-1}}, since in this case, the residue at zero vanishes, and we obtain the useless identity 0 + ζ (2 n + 1) − ζ (2 n + 1) = 0 {\displaystyle 0+\zeta (2n+1)-\zeta (2n+1)=0}.