I've got a complex function: $$f(z)=\frac{\pi\cot{\pi z}}{z^2}$$ I want to integrate it around a contour $\Gamma_N$ such that the poles at $$-N,-N+1,-N+2\cdots-1,0,1,\cdots N-2, N-1, N$$ are contained in the contour, so i choose a circle with radius $N+\varepsilon$ where $N\in\Bbb{N}, \varepsilon \in (0,1)$ The contour

My goal is to show that the integral for $N\to\infty$ $$\oint_{\Gamma_N}f(z)dz=0$$ In fact, it must equal to zero because by residue theorem $$\oint_{\Gamma_N}f(z)dz=\operatorname{Res}(f,0)+\sum_{n=-N,n\neq0}^Nn^{-2}$$ the residuum at $0$ is equal to $-\pi^2/3$ and for $N\to\infty$ this solves the basel problem. Returning to the contour integral: $$\oint_{\Gamma_N}f(z)dz=\int_0^{2\pi}f((N+\varepsilon)e^{i\varphi})d(N+\varepsilon)e^{i\varphi}=$$ $$=\int_0^{2\pi}\frac{\pi\cot({\pi(N+\varepsilon)e^{i\varphi})}}{(N+\varepsilon)e^{i\varphi}}id\varphi$$ Now i would prove that the limit as $N\to\infty$ of the integrand goes to zero, namely: $$\mathcal L= \lim_{N\to\infty}\frac{\cot{(\pi(N+\varepsilon))}}{(N+\varepsilon)}=\lim_{N\to\infty}\frac{\cos{(\pi(N+\varepsilon))}}{(N+\varepsilon)\sin{(\pi(N+\varepsilon)})}$$ and the argument is: $$\lim_{N\to\infty}\frac{\cos{(N+\varepsilon)}} {N+\varepsilon}=0$$ by squeeze theorem and $$\sin(\pi(N+\varepsilon))$$ is never equal to zero, because $$(N+\varepsilon)\notin\Bbb{N}$$ This would prove that integrand is zero therefore the contour integral is equal to zero. My question is, is my argument correct? Thanks for any advice.

  • $\begingroup$ The argument is not valid. You need to show that $\frac{\cot((N+1/2)e^{i\phi})}{(N+1/2)}\to 0$. So, you need to analyze more carefully the behavior of the complex cotangent on the circle. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 14:45
  • $\begingroup$ So, i used the definition of cotangent: $$\cot{z}=i\frac{e^{2iz}+1}{e^{2iz}-1}$$ and obtained an integral where the numerator is a fraction of the form $$\frac{e^{2i\pi(N+\varepsilon)\cos{\varphi}}e^{-2\pi(N+\varepsilon)\sin{\varphi}}+1}{e^{2i\pi(N+\varepsilon)\cos{\varphi}}e^{-2\pi(N+\varepsilon)\sin{\varphi}}-1}$$ this entire thing in absolute value, can i now say that the part with $e^{i...}$ doesn't change the value and $$e^{-2\pi...}$$ is bounded and for $N\to\infty$ goes to zero? $\endgroup$ Apr 3, 2018 at 14:55
  • 1
    $\begingroup$ Not quite. See THIS ANSWER where I showed that the magnitude of the cotangent function, $|\cot(z)|$ is bounded on the circle $|z|=N+1/2$. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 15:18
  • $\begingroup$ This helps, but just one clarification, how did you come to the fact, that... $$|\cot{\pi z}|=\sqrt{\frac{\cosh{2\pi y}+\cos{2\pi x}}{\cosh{2\pi y}-\cos{2\pi x}}}$$ $\endgroup$ Apr 3, 2018 at 15:53
  • $\begingroup$ Please see the edited answer. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 16:42

1 Answer 1


In THIS ANSWER, I showed that for $|z|+N+1/2$, the magnitude of the complex cotangent function, $|\cot(z)|$, satisfies the bound

$$|\cot(z)|=\sqrt{\frac{\cosh(2y)+\cos(2x)}{\cosh(2y)-\cos(2x)}}\le \sqrt{1+\frac{16}{3\pi^2}}$$

Hence, we have

$$\begin{align} \left|\,\oint_{|z|=N+1/2} \frac{\pi\cot(\pi z)}{z^2}\,dz\,\right|&\le \oint_{|z|=N+1/2}\frac{\pi |\cot(z)|}{|z|^2}\,|dz|\\\\ &\le \,2\pi (N+1/2)\left(\frac{\pi\sqrt{1+\frac{16}{3\pi^2}}}{(N+1/2)^2}\right)\\\\ &=\frac{2\pi^2\sqrt{1+\frac{16}{3\pi^2}}}{N+1/2} \end{align}$$

which approaches $0$ as $N\to \infty$.

Finally, using the residue theorem we find that

$$\begin{align} \sum_{n\ne 0}\frac1{n^2}=-\text{Res}\left(\frac{\pi \cot(\pi z)}{z^2}, z=0\right)&=\lim_{z\to 0}\frac{d^2}{dz^2}\left(\pi z\cot(\pi z)\right)\\\\ &=-\frac12\lim_{z\to 0}\frac{d^2}{dz^2}\left(\frac{1-\frac12(\pi z)^2+O(\pi z)^4}{1-\frac16(\pi z)^2+O(\pi z)^4}\right)\\\\ &=-\frac12\lim_{z\to 0}\frac{d^2}{dz^2}\left(1-\frac13 (\pi z)^2+O(\pi z)^4\right)\\\\ &=\frac{\pi^2}{3} \end{align}$$


In this appendix we address the question that the OP asked in a comment regarding the equality $|\cot(z)|=\sqrt{\frac{\cosh(2y)+\cos(2x)}{\cosh(2y)-\cos(2x)}}$. Proceeding we have

$$\begin{align} |\cot(z)|&=\left|\frac{e^{i2z}+1}{e^{i2z}-1}\right|\\\\ &=\left|\frac{(1+\cos(2x)e^{-2y})+i\sin(2x)e^{-2y}}{(1+\cos(2x)e^{-2y})-i\sin(2x)e^{-2y}}\right|\\\\ &=\sqrt{\frac{1+2\cos(2x)e^{-2y}+\cos^2(2x)e^{-4y}+\sin^2(2x)e^{-4y}}{1-2\cos(2x)e^{-2y}+\cos^2(2x)e^{-4y}+\sin^2(2x)e^{-4y}}}\\\\ &=\sqrt{\frac{1+e^{-4y}+2\cos(2x)e^{-2y}}{1+e^{-4y}-2\cos(2x)e^{-2y}}}\\\\ &=\sqrt{\frac{\cosh(2y)+\cos(2x)}{\cosh(2y)-\cos(2x)}} \end{align}$$

as was to be shown!

  • $\begingroup$ I got the part with the residue myself already, was just looking to prove the boundeness of the cotangent function, which is practically in the answer you posted a link to, anyways, asked for a brief explanation here. $\endgroup$ Apr 3, 2018 at 16:21
  • $\begingroup$ @MichalDvořák I edited to address the question you had asked in a comment under your posted question. Let me know if you have any further questions. Really hope all of this helped. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 16:38
  • 1
    $\begingroup$ Multiply numerator and denominator by $\frac12 e^{2y}$. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 17:14
  • 1
    $\begingroup$ Yes! You have it now. Well done. $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 19:28
  • 1
    $\begingroup$ Michael, note that $\frac1{1-t}=1+t+t^2+\cdots=1+t+O(t^2)$. So, $\frac{1}{1-\frac13 x^2+O(x^4)}=1+\frac13x^2+O(x^4)$ $\endgroup$
    – Mark Viola
    Apr 3, 2018 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.