Residue theorem: understood it intuitively but cannot prove mathematically In my opinion, residue theorem’s underlying principle is quite beautiful: one decomposes a contour integral into infinitely many small circular contour integrals around every point, and most of them are zero, except a few that encircle singularities. Those are called residues, and add them up. This is basically how residue theorem works.
However, when I try to prove it by Green’s theorem, I face some difficulties. ($f=u+iv$)
$$\oint_C f(z)dz=\oint(u+iv)dx+i(u+iv)dy=\iint_D \frac{\partial (u+iv)}{\partial x}-i\frac{\partial (u+iv)}{\partial y}dxdy$$
I don’t see how can this be transformed into a sum of residues/circular contour integrals around singularities.
Can you please show how?
Thanks in advance.
 A: You are given a region $\Omega\subset{\mathbb C}$ with boundary cycle $\partial\Omega$ and a function $f:\>\Omega\to{\mathbb C}$ which is analytic apart from finitely many isolated singularities at the points $a_j\in\Omega$ $(1\leq j\leq m)$. The trick now is to draw tiny discs $B_j$ of radius $\epsilon>0$ centered at these points. Then we consider the punched domain $\Omega':=\Omega\setminus\bigcup_{j=1}^m B_j$ with boundary cycle
$$\partial\Omega'=\partial\Omega-\sum_{j=1}^m \partial B_j\ .$$
Note  the minus signs here! The function $f$ is analytic in $\Omega'$; therefore we may apply Green's, resp., Cauchy's,  theorem to $f$ and $\Omega'$. It follows that $\int_{\partial\Omega'}f(z)\>dz=0$, so that 
$$\int_{\partial\Omega}f(z)\>dz=\sum_{j=1}^m\int_{\partial B_j}f(z)\>dz\ .$$
Here the LHS is independent of $\epsilon$. It follows that
$$\int_{\partial\Omega}f(z)\>dz=\sum_{j=1}^m\lim_{\epsilon\to0}\int_{\partial B_j}f(z)\>dz=2\pi i \sum_{j=1}^m{\rm res}(f, a_j)\ ,$$
by definition of the residue.
