Residue theorem
In complex analysis, a discipline within mathematics, the residue theorem, sometimes called Cauchy's residue theorem, is a powerful tool to evaluate line integrals of analytic functions over closed curves; it can often be used to compute real integrals and infinite series as well. It generalizes the Cauchy integral theorem and Cauchy's integral formula. From a geometrical perspective, it is a special case of the generalized Stokes' theorem.
Mathematical analysis → Complex analysis 
Complex analysis 

Complex numbers 
Complex functions 
Basic Theory 
Geometric function theory 
People 

Statement
The statement is as follows:
Let U be a simply connected open subset of the complex plane containing a finite list of points a_{1}, ..., a_{n}, and f a function defined and holomorphic on U \{a_{1}, ..., a_{n}}. Let γ be a closed rectifiable curve in U which does not meet any of the a_{k}, and denote the winding number of γ around a_{k} by I(γ, a_{k}). The line integral of f around γ is equal to 2πi times the sum of residues of f at the points, each counted as many times as γ winds around the point:
If γ is a positively oriented simple closed curve, I(γ, a_{k}) = 1 if a_{k} is in the interior of γ, and 0 if not, so
with the sum over those a_{k} inside γ.
The relationship of the residue theorem to Stokes' theorem is given by the Jordan curve theorem. The general plane curve γ must first be reduced to a set of simple closed curves {γ_{i}} whose total is equivalent to γ for integration purposes; this reduces the problem to finding the integral of f dz along a Jordan curve γ_{i} with interior V. The requirement that f be holomorphic on U_{0} = U \ {a_{k}} is equivalent to the statement that the exterior derivative d(f dz) = 0 on U_{0}. Thus if two planar regions V and W of U enclose the same subset {a_{j}} of {a_{k}}, the regions V \ W and W \ V lie entirely in U_{0}, and hence
is welldefined and equal to zero. Consequently, the contour integral of f dz along γ_{j} = ∂V is equal to the sum of a set of integrals along paths λ_{j}, each enclosing an arbitrarily small region around a single a_{j} — the residues of f (up to the conventional factor 2πi) at {a_{j}}. Summing over {γ_{j}}, we recover the final expression of the contour integral in terms of the winding numbers {I(γ, a_{k})}.
In order to evaluate real integrals, the residue theorem is used in the following manner: the integrand is extended to the complex plane and its residues are computed (which is usually easy), and a part of the real axis is extended to a closed curve by attaching a halfcircle in the upper or lower halfplane, forming a semicircle. The integral over this curve can then be computed using the residue theorem. Often, the halfcircle part of the integral will tend towards zero as the radius of the halfcircle grows, leaving only the realaxis part of the integral, the one we were originally interested in.
Examples
An integral along the real axis
The integral
arises in probability theory when calculating the characteristic function of the Cauchy distribution. It resists the techniques of elementary calculus but can be evaluated by expressing it as a limit of contour integrals.
Suppose t > 0 and define the contour C that goes along the real line from −a to a and then counterclockwise along a semicircle centered at 0 from a to −a. Take a to be greater than 1, so that the imaginary unit i is enclosed within the curve. Now consider the contour integral
Since e^{itz} is an entire function (having no singularities at any point in the complex plane), this function has singularities only where the denominator z^{2} + 1 is zero. Since z^{2} + 1 = (z + i)(z − i), that happens only where z = i or z = −i. Only one of those points is in the region bounded by this contour. Because f(z) is
the residue of f(z) at z = i is
According to the residue theorem, then, we have
The contour C may be split into a straight part and a curved arc, so that
and thus
Using some estimations, we have
and
The estimate on the numerator follows since t > 0, and for complex numbers z along the arc (which lies in the upper halfplane), the argument φ of z lies between 0 and π. So,
Therefore,
If t < 0 then a similar argument with an arc C′ that winds around −i rather than i shows that
and finally we have
(If t = 0 then the integral yields immediately to elementary calculus methods and its value is π.)
An infinite sum
The fact that π cot(πz) has simple poles with residue 1 at each integer can be used to compute the sum
Consider, for example, f(z) = z^{−2}. Let Γ_{N} be the rectangle that is the boundary of [−N − 1/2, N + 1/2]^{2} with positive orientation, with an integer N. By the residue formula,
The lefthand side goes to zero as N → ∞ since the integrand has order O(N^{−2}). On the other hand,[1]
(In fact, z/2 cot(z/2) = iz/1 − e^{−iz} − iz/2.) Thus, the residue Res_{z=0} is −π^{2}/3. We conclude:
which is a proof of the Basel problem.
The same trick can be used to establish the sum of the Eisenstein series:
We take f(z) = (w − z)^{−1} with w a noninteger and we shall show the above for w. The difficulty in this case is to show the vanishing of the contour integral at infinity. We have:
since the integrand is an even function and so the contributions from the contour in the lefthalf plane and the contour in the right cancel each other out. Thus,
goes to zero as N → ∞.
See also
References
 Whittaker, E. T.; Watson, G. N. (1902). A Course of Modern Analysis. Cambridge University Press. § 7.2.
 Ahlfors, Lars (1979), Complex Analysis, McGraw Hill, ISBN 0070850089
 Mitronivić, Dragoslav; Kečkić, Jovan (1984), The Cauchy method of residues: Theory and applications, D. Reidel Publishing Company, ISBN 9027716234
 Lindelöf, Ernst (1905), Le calcul des résidus et ses applications à la théorie des fonctions, Editions Jacques Gabay (published 1989), ISBN 2876470608
External links
 Hazewinkel, Michiel, ed. (2001) [1994], "Cauchy integral theorem", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 9781556080104
 Residue theorem in MathWorld