The residue theorem or the Cauchy Residue Theorem states that if a function f is analytic on and within a closed contour C except at a finite number of isolated singular points z1,z2 z3 ... then

integral over C (f(z)dz) = 2*pi*i*(k1 + k2 + k3 + ...)

where k1 is the residue at z1, k2 the residue at z2 and so on.

The residue theorem is an extremely useful result and invaluable in evaluating real integrals. A real integral can often cleverly be converted into a complex integral and the residue theorem makes the process of evaluating this complex integral a simple algebraic problem.