Residue theorem: Let be a simply connectedopen subset of the complex plane containing a finite list of points and a function holomorphic on Letting be a closed rectifiable curve in and denoting the residue of at each point by and the winding number of around by the line integral of around is equal to times the sum of residues, each counted as many times as winds around the respective point:
The relationship of the residue theorem to Stokes' theorem is given by the Jordan curve theorem. The general plane curveTemplate:Mvar must first be reduced to a set of simple closed curves whose total is equivalent to for integration purposes; this reduces the problem to finding the integral of along a Jordan curve with interior The requirement that be holomorphic on is equivalent to the statement that the exterior derivative on Thus if two planar regions and of enclose the same subset of the regions and lie entirely in hence
is well-defined and equal to zero. Consequently, the contour integral of along is equal to the sum of a set of integrals along paths each enclosing an arbitrarily small region around a single — the residues of (up to the conventional factor at Summing over we recover the final expression of the contour integral in terms of the winding numbers
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 half-circle in the upper or lower half-plane, forming a semicircle. The integral over this curve can then be computed using the residue theorem. Often, the half-circle part of the integral will tend towards zero as the radius of the half-circle grows, leaving only the real-axis part of the integral, the one we were originally interested in.
Suppose t > 0Script error: No such module "Check for unknown parameters". and define the contour Template:Mvar that goes along the real line from −aScript error: No such module "Check for unknown parameters". to Template:Mvar and then counterclockwise along a semicircle centered at 0 from Template:Mvar to −aScript error: No such module "Check for unknown parameters".. Take Template:Mvar to be greater than 1, so that the imaginary unit Template:Mvar is enclosed within the curve. Now consider the contour integral
Since eitzScript error: No such module "Check for unknown parameters". is an entire function (having no singularities at any point in the complex plane), this function has singularities only where the denominator z2 + 1Script error: No such module "Check for unknown parameters". is zero. Since z2 + 1 = (z + i)(z − i)Script error: No such module "Check for unknown parameters"., that happens only where z = iScript error: No such module "Check for unknown parameters". or z = −iScript error: No such module "Check for unknown parameters".. Only one of those points is in the region bounded by this contour. Because f(z)Script error: No such module "Check for unknown parameters". is
the residue of f(z)Script error: No such module "Check for unknown parameters". at z = iScript error: No such module "Check for unknown parameters". is
According to the residue theorem, then, we have
The contour Template:Mvar may be split into a straight part and a curved arc, so that
and thus
The estimate on the numerator follows since t > 0Script error: No such module "Check for unknown parameters"., and for complex numbersTemplate:Mvar along the arc (which lies in the upper half-plane), the argument Template:Mvar of Template:Mvar lies between 0 and Template:Pi. So,
Therefore,
If t < 0Script error: No such module "Check for unknown parameters". then a similar argument with an arc Template:PrimeScript error: No such module "Check for unknown parameters". that winds around −iScript error: No such module "Check for unknown parameters". rather than iScript error: No such module "Check for unknown parameters". shows that
(If t = 0Script error: No such module "Check for unknown parameters". then the integral yields immediately to elementary calculus methods and its value is Template:Pi.)
Evaluating zeta functions
The fact that π cot(πz)Script error: No such module "Check for unknown parameters". has simple poles with residue 1 at each integer can be used to compute the sum
Consider, for example, f(z) = z−2Script error: No such module "Check for unknown parameters".. Let ΓNScript error: No such module "Check for unknown parameters". be the rectangle that is the boundary of [−N − Template:Sfrac, N + Template:Sfrac]2Script error: No such module "Check for unknown parameters". with positive orientation, with an integer Template:Mvar. By the residue formula,
The left-hand side goes to zero as N → ∞Script error: No such module "Check for unknown parameters". since is uniformly bounded on the contour, thanks to using on the left and right side of the contour, and so the integrand has order over the entire contour. On the other hand,[2]
(In fact, Template:Sfrac cot(Template:Sfrac) = Template:Sfrac − Template:SfracScript error: No such module "Check for unknown parameters"..) Thus, the residue Resz=0Script error: No such module "Check for unknown parameters". is −Template:SfracScript error: No such module "Check for unknown parameters".. We conclude:
The same argument works for all where is a positive integer, giving usThe trick does not work when , since in this case, the residue at zero vanishes, and we obtain the useless identity .
Evaluating Eisenstein series
The same trick can be used to establish the sum of the Eisenstein series: