Theorem (residue theorem)

Let $f$ be meromorphic on a domain $U$ and $γ$ be a closed curve homologous to zero in $U$, not containing any poles of $f$.

Let $a_1, \ldots, a_m$ be the finitely many poles of $f$ that $γ$ winds around (i.e. $I(γ; a_n)$ $\neq 0$). Then $$ \begin{align*} \oint_γ f(z) \d z = 2πi\sum_{n=1}^{m} I(γ; a_n) \Res_{z=a} f(z). \end{align*} $$

Proof