# The Contour Integration approach to Infinite Series

Today, we will evaluate the series $\sum_{n=0}^\infty \frac{\cot\left(\frac{2n+1}{2}\pi\sqrt{2} \right)}{(2n+1)^3}$ using contour integration. Define $f:\mathbb{C}\to \mathbb{C}$ as $$f(z) = \frac{\pi \tan(\pi z)\tan(\pi z \theta)}{z^3}$$ where the parameter $\theta$ is a positive irrational number. Let $C_N$ denote the positively oriented square with vertices $(N+1)(1+i),\; (N+1)(-1+i),\; (N+1)(-1-i)$ and $(N+1)(1-i)$. With some effort, one can show that: \begin{aligned} \left|\int_{C_N} f(z) dz\right| &\leq \frac{4\pi}{(N+1)^2} \left(|\tan((N+1)\pi \theta)| + \frac{1}{|\tanh((N+1)\pi) \tanh((N+1)\pi \theta)|}\right) \end{aligned} By Weyl’s equidistribution theorem, the sequence $\{(N+1)\theta \}_{N=1}^\infty$ is equidistributed modulo 1. Therefore, we can choose a subsequence $\{(N_k+1) \theta\}_{k=1}^\infty$ such that $|\tan(\pi (N_k+1) \theta)|$ remains bounded. It follows that: $$\lim_{k\to \infty}\int_{C_{N_k}} f(z)\; dz = 0$$ On the other hand, Residue theorem gives us: $$\frac{1}{2\pi i}\int_{C_{N_k}} f(z) dz = \substack\text{Res} \\ z=0}f(z) + \sum_{i=-{N_k}}^{N_k} \substack\text{Res} \\ z=\frac{2i+1}{2}}f(z) + \sum_{|j+\frac{1}{2}|\leq \theta (N_k+1)} \substack\text{Res} \\ z=\frac{2j+1}{2\theta}}f(z)$$

This means that the sum of residues of $f(z)$ at it’s poles is equal to zero. A simple calculation shows that: \begin{aligned} \substack\text{Res} \\ z=0}f(z) &= \pi^3 \theta \\ \substack\text{Res} \\ z=\frac{2n+1}{2}}f(z) &= -8\frac{\tan\left(\frac{\pi \theta}{2}(2n+1) \right)}{(2n+1)^3}, \quad n\in \{0,1,2,\cdots\}\\ \substack\text{Res} \\ z=\frac{2n+1}{2\theta}}f(z) &= -8\theta^2 \frac{\tan\left(\frac{\pi}{2\theta}(2n+1) \right)}{(2n+1)^3} , \quad n\in \{0,1,2,\cdots\} \end{aligned} Finally, putting everything together gives us the relation: $$\sum_{n=0}^\infty \frac{\tan\left(\frac{\pi \theta}{2}(2n+1) \right)}{(2n+1)^3} + \theta^2 \sum_{n=0}^\infty \frac{\tan\left(\frac{\pi}{2\theta}(2n+1) \right)}{(2n+1)^3} = \frac{\pi^3 \theta}{16}$$ The final result is obtained by substituting $\theta = \sqrt{2}+1$ in the above equation. $$\boxed{\sum_{n=0}^\infty \frac{\cot\left(\frac{2n+1}{2}\pi\sqrt{2} \right)}{(2n+1)^3} = -\frac{\pi^3}{32\sqrt{2}}}$$