Residue cancellation by symmetry (source code)

= Residue cancellation by symmetry
{wiki}

Symmetry can relate <residues>, but the sign depends on the symmetry. If a <meromorphic function> is even, $f(-z)=f(z)$, and $a\ne0$, then
$$
\operatorname{Res}(f,-a)=-\operatorname{Res}(f,a).
$$
Indeed the substitution $z=-a+w$ replaces the local variable at $a$ by $-w$, reversing the coefficient of $w^{-1}$ in the <Laurent series>. A contour containing both poles with the same <winding number> therefore receives cancelling residue contributions.

For example, $f(z)=1/(z^2+1)$ has residues $1/(2i)$ and $-1/(2i)$ at $i$ and $-i$. An upper-half-plane contour contains only the first pole, so those residues do not cancel in that contour. For an odd <meromorphic function>, the residues at opposite nonzero poles are instead equal: $z/(z^2+1)$ has residue$1/2$ at both poles. One must check both the local symmetry and which poles the contour actually encloses.