Solution (source code)

= Solution

If $f$ is analytic on and inside a positively oriented simple closed contour except for finitely many isolated <poles> $z_j$ strictly inside it, then the <residue theorem> states
$$
\boxed{\oint_Cf(z)\,dz=2\pi i\sum_{z_j\text{ inside }C}\operatorname{Res}_{z=z_j}f.}
$$
There must be no singularity on the contour. More generally each <residue> is multiplied by the contour's <winding number> about its point.