Summation Formula for Alternating Series

Theorem
Let $N \in \N$ be an arbitrary natural number.

Let $C_N$ be the square embedded in the complex plane $\C$ with vertices $\paren {N + \dfrac 1 2} \paren {\pm 1 \pm i}$.

Let $f$ be a meromorphic function on $\C$ with finitely many poles.

Suppose that:


 * $\ds \int_{C_N} \paren {\pi \csc \pi z} \map f z \rd z \to 0$

as $N \to \infty$.

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

Then:
 * $\displaystyle \sum_{n \mathop \in \Z \mathop \setminus X} \paren {-1}^n \map f n = -\sum_{z_0 \mathop \in X} \Res {\pi \map \csc {\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 \mathop \in X} \Res {\pi \map \csc {\pi z} \map f z} {z_0}$