I'm trying to compute the residues at all poles of $f(z) = \frac{1}{1-\cos(z)}$ inside $C = \{z\in\mathbb{C}| \: |z|=8\}$. The poles can be found at each $2\pi k, k\in\mathbb{Z}$. Inside the circle, the poles are $-2\pi, 0, 2\pi$. To determine the residue at $0$, I took the limit of $\text{res}_0=\lim_{z\to 0}\frac{d}{dz}\frac{z^2}{1-\cos(z)}$. Expanding cosine into a series and taking the derivative, I ended up with $res_0 f=0$. However, I struggled with the other two.
I looked up the problem and the textbook I found it in simply states that $\text{res}_{2\pi k}f = \text{res}_0f$ for all k. I guess it is somewhat intuitive that this is the case, since I'm looking at a periodic function. On the other hand, this was never clearly stated in our course and I find this rather useful, so is this just accepted as obvious or is there a more detailed explanation to this that I could leverage in an exam to avoid having to calculate several residues? Thanks in advance!
The residue of $f$ at an isolated singularity $z_0$ is the coefficient $a_{-1}$ of the Laurent series of $f$ at $z_0$: $$ f(z) = \sum_{n=-\infty}^{\infty} a_n (z-z_0)^n \, . $$ Now if $f$ is periodic with period $p$ then $$ f(z) = f(z-p) = \sum_{n=-\infty}^{\infty} a_n (z-(z_0+p))^n $$ in a neighbourhood of $z=(z_0+p)$, so that the series on the right is the Laurent series of $f$ at $z_0+p$, and the residue of $f$ at $z_0+p$ is the same value $a_{-1}$.
Another way to compute the residue is $$ \operatorname{Res}(f, z_0) = \frac{1}{2\pi i} \int_C f(z)\, dz $$ where $C$ a circle around $z_0$ (in counter-clockwise direction) with sufficiently small radius. This can also be used to show that $$ \operatorname{Res}(f, z_0) = \operatorname{Res}(f, z_0+p) $$ if $f$ is $p$-periodic.
Yet another way is to use the definition of the residue as the unique complex number $R$ such that $$ f(z) - \frac{R}{z-z_0} $$ has a holomorphic antiderivative in a punctured neighbourhood of $z_0$. If $$ f(z) - \frac{R}{z-z_0} = F'(z) $$ for $0 < |z-z_0| < \delta$ then $$ f(z) - \frac{R}{z-(z_0+p)} = f(z-p) - \frac{R}{z-p-z_0}= F'(z-p) $$ for $0 < |z-(z_0+p)| < \delta$, which again shows $f$ has the same residues at $z_0$ and $z_0+p$.