Summation Formula for Alternating Series over Half-Integers

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

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 {\frac {2 n + 1} 2} = \sum_{z_0 \in X} \Res {\pi \sec \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 {\frac {2 n + 1} 2} = \sum_{z_0 \in X} \Res {\pi \sec \paren {\pi z} \map f z} {z_0}$