Fourier series of cotangent I have found the Fourier series of $\cot(ax)$ and i get:
$$\cot(ax) \sim \frac{ \sin(a \pi)}{a\pi}\left[ \left(\frac{1}{2a^2}\right)- \sum_1^\infty \frac{(-1)^n \cos(nx)}{n^2-a^2}\right]$$
How can I deduce the Fourier series of $\cot(x)$ where $x$ isn't multiple of $\pi$? Any help please...

Expand the exponential form of $\cot x$:
\begin{align}\cot x=\frac{i(e^{ix}+e^{-ix})}{e^{ix}-e^{-ix}}&=i+\frac{2ie^{-ix}}{e^{ix}-e^{-ix}}=i+2ie^{-2ix}(1+e^{-2ix}+e^{-4ix}+\cdots)\\[1ex]
&=i+2i\sum_{k\ge1}(\cos2kx-i\sin2kx)
\end{align}
