the residue theorem
/ koh-SHEE for Cauchy /
Here is the big payoff of the whole subject, the theorem the entire machinery was built to deliver. You want to integrate a function once around a closed loop. The function may have several troublesome points inside the loop. The residue theorem says: forget the loop's exact shape and forget the integration entirely — just add up one local number (the residue) at each enclosed bad point and multiply by 2 pi i. A global integral collapses into a finite sum of local data.
The statement: let f be holomorphic on and inside a simple closed contour gamma (traversed once counterclockwise) except for finitely many isolated singularities z_1, ..., z_k inside gamma. Then the integral over gamma of f(z) dz = 2 pi i times the sum of Res(f, z_j) over j = 1 to k. If the contour is not simple and winds around the singularities several times, each residue is weighted by the winding number of gamma about that point: the integral = 2 pi i times the sum of n(gamma, z_j) Res(f, z_j). Why it is true: shrink the loop down to a tiny circle around each singularity (deformation of contours, legal because f is holomorphic in between), and each small circle reports back exactly 2 pi i times its residue, as the definition of the residue guarantees.
This is the grand generalization that contains Cauchy's theorem and Cauchy's integral formula as special cases. Cauchy's theorem is the case of no singularities inside (the sum is empty, so the integral is 0). The integral formula f(z_0) = (1 / (2 pi i)) times the integral of f(z) / (z - z_0) dz is the residue theorem applied to f(z) / (z - z_0), whose single residue at z_0 is f(z_0). Beyond unifying the theory, it is the practical key that unlocks real integrals with no elementary antiderivative, infinite series, and much of applied mathematics — every contour technique that follows is really this one theorem plus a clever choice of curve.
For the integral over the unit circle of e^z / (z (z - 2)) dz, only the pole z = 0 lies inside (z = 2 is outside). Res at 0 = e^0 / (0 - 2) = -1/2, so the integral = 2 pi i times (-1/2) = -pi i.
Sum only the residues enclosed by the contour, then multiply by 2 pi i.
Count only singularities strictly inside gamma, and mind the orientation: counterclockwise gives the plus sign; a clockwise loop flips the sign. A singularity on the contour itself makes the integral improper and needs a principal value or an indented contour instead.