The residue of a complex function at an isolated singularity is the coefficient of in its Laurent Series expansion. It is the unique part of the singularity that survives a contour integral.
When you integrate around a closed contour, every gives zero because has an antiderivative. The term is the exception: its antiderivative picks up a branch contribution of each time the contour winds around :
Integrating the Laurent series term by term, all coefficients cancel except , giving:
So via the Cauchy Integral Formula:
where is any simple positively-oriented contour encircling and no other singularity. A function can have arbitrarily bad singular behavior at , but none of it affects the contour integral. Only the power does.
Computing Residues
For a simple pole (order 1):
For a pole of order :