In mathematics, more specifically complex analysis, the residue is a complex number proportional to the contour integral of a meromorphic function along a path enclosing one of its singularities. (More generally, residues can be calculated for any function ${\displaystyle f\colon \mathbb {C} \smallsetminus \{a_{k}\}_{k}\rightarrow \mathbb {C} }$ that is holomorphic except at the discrete points {ak}k, even if some of them are essential singularities.) Residues can be computed quite easily and, once known, allow the determination of general contour integrals via the residue theorem.

## Definition

The residue of a meromorphic function ${\displaystyle f}$ at an isolated singularity ${\displaystyle a}$, often denoted ${\displaystyle \operatorname {Res} (f,a)}$, ${\displaystyle \operatorname {Res} _{a}(f)}$, ${\displaystyle \mathop {\operatorname {Res} } _{z=a}f(z)}$ or ${\displaystyle \mathop {\operatorname {res} } _{z=a}f(z)}$, is the unique value ${\displaystyle R}$ such that ${\displaystyle f(z)-R/(z-a)}$ has an analytic antiderivative in a punctured disk ${\displaystyle 0<\vert z-a\vert <\delta }$.

Alternatively, residues can be calculated by finding Laurent series expansions, and one can define the residue as the coefficient a−1 of a Laurent series.

The concept can be used to provide contour integration values of certain contour integral problems considered in the residue theorem. According to the residue theorem, for a meromorphic function ${\displaystyle f}$, the residue at point ${\displaystyle a_{k))$ is given as:

${\displaystyle \operatorname {Res} (f,a_{k})={1 \over 2\pi i}\oint _{\gamma }f(z)\,dz\,.}$

where ${\displaystyle \gamma }$ is a positively oriented simple closed curve around ${\displaystyle a_{k))$ and not including any other singularities on or inside the curve.

The definition of a residue can be generalized to arbitrary Riemann surfaces. Suppose ${\displaystyle \omega }$ is a 1-form on a Riemann surface. Let ${\displaystyle \omega }$ be meromorphic at some point ${\displaystyle x}$, so that we may write ${\displaystyle \omega }$ in local coordinates as ${\displaystyle f(z)\;dz}$. Then, the residue of ${\displaystyle \omega }$ at ${\displaystyle x}$ is defined to be the residue of ${\displaystyle f(z)}$ at the point corresponding to ${\displaystyle x}$.

## Contour integration

### Contour integral of a monomial

Computing the residue of a monomial

${\displaystyle \oint _{C}z^{k}\,dz}$

makes most residue computations easy to do. Since path integral computations are homotopy invariant, we will let ${\displaystyle C}$ be the circle with radius ${\displaystyle 1}$ going counter clockwise. Then, using the change of coordinates ${\displaystyle z\to e^{i\theta ))$ we find that

${\displaystyle dz\to d(e^{i\theta })=ie^{i\theta }\,d\theta }$

hence our integral now reads as

${\displaystyle \oint _{C}z^{k}dz=\int _{0}^{2\pi }ie^{i(k+1)\theta }\,d\theta ={\begin{cases}2\pi i&{\text{if ))k=-1,\\0&{\text{otherwise)).\end{cases))}$

Thus, the residue of ${\displaystyle z^{k))$ is 1 if integer ${\displaystyle k=-1}$ and 0 otherwise.

### Generalization to Laurent series

If a function is expressed as a Laurent series expansion around c as follows:

${\displaystyle f(z)=\sum _{n=-\infty }^{\infty }a_{n}(z-c)^{n}.}$
Then, the residue at the point c is calculated as:
${\displaystyle \operatorname {Res} (f,c)={1 \over 2\pi i}\oint _{\gamma }f(z)\,dz={1 \over 2\pi i}\sum _{n=-\infty }^{\infty }\oint _{\gamma }a_{n}(z-c)^{n}\,dz=a_{-1))$
using the results from contour integral of a monomial for counter clockwise contour integral ${\displaystyle \gamma }$ around a point c. Hence, if a Laurent series representation of a function exists around c, then its residue around c is known by the coefficient of the ${\displaystyle (z-c)^{-1))$ term.

### Application in Residue theorem

 Main article: Residue theorem

For a meromorphic function ${\displaystyle f}$, with a finite set of singularities within a positively oriented simple closed curve ${\displaystyle C}$ which does not pass through any singularity, the value of the contour integral is given according to residue theorem, as:

${\displaystyle \oint _{C}f(z)\,dz=2\pi i\sum _{k=1}^{n}\operatorname {I} (C,a_{k})\operatorname {Res} (f,a_{k}).}$
where ${\displaystyle \operatorname {I} (C,a_{k})}$, the winding number, is ${\displaystyle 1}$ if ${\displaystyle a_{k))$ is in the interior of ${\displaystyle C}$ and ${\displaystyle 0}$ if not, simplifying to:
${\displaystyle \oint _{\gamma }f(z)\,dz=2\pi i\sum \operatorname {Res} (f,a_{k})}$
where ${\displaystyle a_{k))$ are all isolated singularities within the contour ${\displaystyle C}$.

## Calculation of residues

Suppose a punctured disk D = {z : 0 < |zc| < R} in the complex plane is given and f is a holomorphic function defined (at least) on D. The residue Res(f, c) of f at c is the coefficient a−1 of (zc)−1 in the Laurent series expansion of f around c. Various methods exist for calculating this value, and the choice of which method to use depends on the function in question, and on the nature of the singularity.

According to the residue theorem, we have:

${\displaystyle \operatorname {Res} (f,c)={1 \over 2\pi i}\oint _{\gamma }f(z)\,dz}$

where γ traces out a circle around c in a counterclockwise manner and does not pass through or contain other singularities within it. We may choose the path γ to be a circle of radius ε around c. Since ε can be as small as we desire it can be made to contain only the singularity of c due to nature of isolated singularities. This may be used for calculation in cases where the integral can be calculated directly, but it is usually the case that residues are used to simplify calculation of integrals, and not the other way around.

### Removable singularities

If the function f can be continued to a holomorphic function on the whole disk ${\displaystyle |y-c|, then Res(fc) = 0. The converse is not generally true.

### Simple poles

At a simple pole c, the residue of f is given by:

${\displaystyle \operatorname {Res} (f,c)=\lim _{z\to c}(z-c)f(z).}$

If that limit does not exist, there is an essential singularity there. If it is 0 then it is either analytic there or there is a removable singularity. If it is equal to infinity then the order is higher than 1.

It may be that the function f can be expressed as a quotient of two functions, ${\displaystyle f(z)={\frac {g(z)}{h(z)))}$, where g and h are holomorphic functions in a neighbourhood of c, with h(c) = 0 and h'(c) ≠ 0. In such a case, L'Hôpital's rule can be used to simplify the above formula to:

{\displaystyle {\begin{aligned}\operatorname {Res} (f,c)&=\lim _{z\to c}(z-c)f(z)=\lim _{z\to c}{\frac {zg(z)-cg(z)}{h(z)))\\[4pt]&=\lim _{z\to c}{\frac {g(z)+zg'(z)-cg'(z)}{h'(z)))={\frac {g(c)}{h'(c))).\end{aligned))}

### Limit formula for higher-order poles

More generally, if c is a pole of order n, then the residue of f around z = c can be found by the formula:

${\displaystyle \operatorname {Res} (f,c)={\frac {1}{(n-1)!))\lim _{z\to c}{\frac {d^{n-1)){dz^{n-1))}\left((z-c)^{n}f(z)\right).}$

This formula can be very useful in determining the residues for low-order poles. For higher-order poles, the calculations can become unmanageable, and series expansion is usually easier. For essential singularities, no such simple formula exists, and residues must usually be taken directly from series expansions.

### Residue at infinity

In general, the residue at infinity is defined as:

${\displaystyle \operatorname {Res} (f(z),\infty )=-\operatorname {Res} \left({\frac {1}{z^{2))}f\left({\frac {1}{z))\right),0\right).}$

If the following condition is met:

${\displaystyle \lim _{|z|\to \infty }f(z)=0,}$

then the residue at infinity can be computed using the following formula:

${\displaystyle \operatorname {Res} (f,\infty )=-\lim _{|z|\to \infty }z\cdot f(z).}$

${\displaystyle \lim _{|z|\to \infty }f(z)=c\neq 0,}$

then the residue at infinity is

${\displaystyle \operatorname {Res} (f,\infty )=\lim _{|z|\to \infty }z^{2}\cdot f'(z).}$

For holomorphic functions the sum of the residues at the isolated singularities plus the residue at infinity is zero which gives:

${\displaystyle \operatorname {Res} (f(z),\infty )=-\sum _{k}\operatorname {Res} (f(z),a_{k}).}$

### Series methods

If parts or all of a function can be expanded into a Taylor series or Laurent series, which may be possible if the parts or the whole of the function has a standard series expansion, then calculating the residue is significantly simpler than by other methods. The residue of the function is simply given by the coefficient of ${\displaystyle (z-c)^{-1))$ in the Laurent series expansion of the function.

## Examples

### Residue from series expansion

#### Example 1

As an example, consider the contour integral

${\displaystyle \oint _{C}{e^{z} \over z^{5))\,dz}$

where C is some simple closed curve about 0.

Let us evaluate this integral using a standard convergence result about integration by series. We can substitute the Taylor series for ${\displaystyle e^{z))$ into the integrand. The integral then becomes

${\displaystyle \oint _{C}{1 \over z^{5))\left(1+z+{z^{2} \over 2!}+{z^{3} \over 3!}+{z^{4} \over 4!}+{z^{5} \over 5!}+{z^{6} \over 6!}+\cdots \right)\,dz.}$

Let us bring the 1/z5 factor into the series. The contour integral of the series then writes

{\displaystyle {\begin{aligned}&\oint _{C}\left({1 \over z^{5))+{z \over z^{5))+{z^{2} \over 2!\;z^{5))+{z^{3} \over 3!\;z^{5))+{z^{4} \over 4!\;z^{5))+{z^{5} \over 5!\;z^{5))+{z^{6} \over 6!\;z^{5))+\cdots \right)\,dz\\[4pt]={}&\oint _{C}\left({1 \over \;z^{5))+{1 \over \;z^{4))+{1 \over 2!\;z^{3))+{1 \over 3!\;z^{2))+{1 \over 4!\;z}+{1 \over \;5!}+{z \over 6!}+\cdots \right)\,dz.\end{aligned))}

Since the series converges uniformly on the support of the integration path, we are allowed to exchange integration and summation. The series of the path integrals then collapses to a much simpler form because of the previous computation. So now the integral around C of every other term not in the form cz−1 is zero, and the integral is reduced to

${\displaystyle \oint _{C}{1 \over 4!\;z}\,dz={1 \over 4!}\oint _{C}{1 \over z}\,dz={1 \over 4!}(2\pi i)={\pi i \over 12}.}$

The value 1/4! is the residue of ez/z5 at z = 0, and is denoted

${\displaystyle \operatorname {Res} _{0}{e^{z} \over z^{5)),{\text{ or ))\operatorname {Res} _{z=0}{e^{z} \over z^{5)),{\text{ or ))\operatorname {Res} (f,0){\text{ for ))f={e^{z} \over z^{5)).}$

#### Example 2

As a second example, consider calculating the residues at the singularities of the function

${\displaystyle f(z)={\sin z \over z^{2}-z))$
which may be used to calculate certain contour integrals. This function appears to have a singularity at z = 0, but if one factorizes the denominator and thus writes the function as
${\displaystyle f(z)={\sin z \over z(z-1)))$
it is apparent that the singularity at z = 0 is a removable singularity and then the residue at z = 0 is therefore 0. The only other singularity is at z = 1. Recall the expression for the Taylor series for a function g(z) about z = a:
${\displaystyle g(z)=g(a)+g'(a)(z-a)+{g''(a)(z-a)^{2} \over 2!}+{g'''(a)(z-a)^{3} \over 3!}+\cdots }$
So, for g(z) = sin z and a = 1 we have
${\displaystyle \sin z=\sin 1+(\cos 1)(z-1)+{-(\sin 1)(z-1)^{2} \over 2!}+{-(\cos 1)(z-1)^{3} \over 3!}+\cdots .}$
and for g(z) = 1/z and a = 1 we have
${\displaystyle {\frac {1}{z))={\frac {1}{(z-1)+1))=1-(z-1)+(z-1)^{2}-(z-1)^{3}+\cdots .}$
Multiplying those two series and introducing 1/(z − 1) gives us
${\displaystyle {\frac {\sin z}{z(z-1)))={\sin 1 \over z-1}+(\cos 1-\sin 1)+(z-1)\left(-{\frac {\sin 1}{2!))-\cos 1+\sin 1\right)+\cdots .}$
So the residue of f(z) at z = 1 is sin 1.

#### Example 3

The next example shows that, computing a residue by series expansion, a major role is played by the Lagrange inversion theorem. Let

${\displaystyle u(z):=\sum _{k\geq 1}u_{k}z^{k))$
be an entire function, and let
${\displaystyle v(z):=\sum _{k\geq 1}v_{k}z^{k))$
with positive radius of convergence, and with ${\textstyle v_{1}\neq 0}$. So ${\textstyle v(z)}$ has a local inverse ${\textstyle V(z)}$ at 0, and ${\textstyle u(1/V(z))}$ is meromorphic at 0. Then we have:
${\displaystyle \operatorname {Res} _{0}{\big (}u(1/V(z)){\big )}=\sum _{k=0}^{\infty }ku_{k}v_{k}.}$
Indeed,
${\displaystyle \operatorname {Res} _{0}{\big (}u(1/V(z)){\big )}=\operatorname {Res} _{0}\left(\sum _{k\geq 1}u_{k}V(z)^{-k}\right)=\sum _{k\geq 1}u_{k}\operatorname {Res} _{0}{\big (}V(z)^{-k}{\big )))$
because the first series converges uniformly on any small circle around 0. Using the Lagrange inversion theorem
${\displaystyle \operatorname {Res} _{0}{\big (}V(z)^{-k}{\big )}=kv_{k},}$
and we get the above expression. For example, if ${\displaystyle u(z)=z+z^{2))$ and also ${\displaystyle v(z)=z+z^{2))$, then
${\displaystyle V(z)={\frac {2z}{1+{\sqrt {1+4z))))}$
and
${\displaystyle u(1/V(z))={\frac {1+{\sqrt {1+4z))}{2z))+{\frac {1+2z+{\sqrt {1+4z))}{2z^{2))}.}$
The first term contributes 1 to the residue, and the second term contributes 2 since it is asymptotic to ${\displaystyle 1/z^{2}+2/z}$.

Note that, with the corresponding stronger symmetric assumptions on ${\textstyle u(z)}$ and ${\textstyle v(z)}$, it also follows

${\displaystyle \operatorname {Res} _{0}\left(u(1/V)\right)=\operatorname {Res} _{0}\left(v(1/U)\right),}$
where ${\textstyle U(z)}$ is a local inverse of ${\textstyle u(z)}$ at 0.