The residue theorem states that for a function f(z) that is analytic within and on a closed contour C except for isolated singularities, the integral of f(z) around C is equal to 2πi times the sum of the residues of f(z) at the singularities enclosed by C. The residue of a simple pole is the coefficient of the (z-z0)-1 term in the Laurent series expansion of f(z) about z0. For a function that is a ratio of two functions, where the denominator has a simple zero, the residue can be calculated as the limit of the numerator over the derivative of the denominator as z approaches the zero.