Summation Formula for Alternating Series

Theorem
Let $C_N$ be the square with vertices $\paren {N + \frac 1 2} \paren {\pm 1 \pm i}$ for some real $N \in \N$.

Let $f$ be a function meromorphic on $C_N$.

Let $\cmod {\map f z} < \dfrac M {\cmod z^k}$, for constants $k > 1$ and $M$ independent of $N$, for all $z \in \partial C_N$.

Let $X$ be the set of poles of $f$.

Then:


 * $\displaystyle \sum_{n \in \Z \setminus X} \paren {-1}^n \map f n = - \sum_{z_0 \in X} \Res {\pi \csc \paren {\pi z} \map f z} {z_0}$

If $X \cap \Z = \O$, this becomes:


 * $\displaystyle \sum_{n \mathop = -\infty}^\infty \paren {-1}^n \map f n = - \sum_{z_0 \in X} \Res {\pi \csc \paren {\pi z} \map f z} {z_0}$