Recall that residue theorem allows one to compute an integral of an analytic function with isolated singularities:

where the sum is over the singularities

contained inside of the curve

.

Last time we've seen some simple examples of computing residues. What we usually do is find enough terms in the Laurent series expansion of the function until we find the minus-first one.

Computing a residue by manipulation of power series

Let's start by considering an example:

Compute

over the circle

Solution: the singularities of

are located at the zeroes of

, i.e. at integer multiples of

. Only one such point is inside

, so all we have to do to compute the integral is find the residue

and multiply the answer by

To find the Laurent series expansion for

we first compute several terms of Taylor series expansions of

and

and then try to divide one by the other:

, so

Similarly

so

Now the quotient

obviously has a leading term

, i.e. it has a pole of order

. But since we are interested in the residue, i.e. the minus-first coefficient in Laurent series expansion, we'll have to go a little further in the computation.

We know that there is some Laurent expansion

. To find

we multiply both sides by the denominator to get

, or

Hence

and the original integral

Computing a residue without computing

Another example: what is the residue of

at

?

We could try to use the previous method: it would involve some enormously long computation with power series. But in this example we can just notice that since the function in question is even, its Laurent series expansion has only even terms. Hence in particular the residue is zero.

Integral of a rational function of sine and cosine over the full period

We can use residue calculus to compute not only integrals over closed loops in the complex domain, but also some special integrals on the real line. In fact it was the problem of computing certain real integrals that has led Cauchy to invent residues and much of complex analysis.

For instance we have seen once that to find an integral of a rational function of sine and cosine over the full period, we can make a substitution

and transform it to an integral of a rational function over the unit circle. \textit{Now} we actually can compute any such integral.

Here's an example: compute the integral

.

To solve it we make a substitution

and notice that

,

and as

goes from

to

, the variable

goes around the unit circle and makes exactly one full turn. Thus the integral is equal to

This integral simplifies to

. We factor the denominator to find the poles:

, thus there is only one pole in the unit circle:

. The residue at this point can be easily computed:

If

, then

so we are basically trying to compute the coefficient

, which is the derivative of

at

. This derivative turns out to be

.

Thus the original integral is

Integral of a rational function over the real line

Another type of integrals we can compute is an integral of a rational function over the real line, for instance

. One can compute this integral by the usual methods of calculus: find the antiderivative and use Newton-Leibnitz formula. But it's rather messy (especially if one doesn't know complex numbers).

Instead we can try to apply residue theorem. The problem is that we want to integrate a function over the real line, which isn't a closed loop. Even if we write the integral as

, we are still dealing with an integral over a non-closed path. The idea is to close the path using a large semicircle in the upper half-plane, and hope that this addition doesn't really change the integral. It is reasonable to expect that indeed the integral over the semicircle is small, since the integrand is of order

while the path length is only of order

.

Let's now do everything accurately. Let

be the semicircle in the upper half-plane of radius

. We can estimate the integral

as follows: by triangle inequality for integrals

which tends to

as

tends to

. So indeed adding an integral over a large semicircle contributes less and less as

becomes larger and larger.

Now the integral over the interval from

to

together with the integral over the semicircle

give us an integral over a closed path, which can be computed using residue theorem.

The integrand

has only one pole in the upper half-plane: the point

. Thus all we have to do is find the residue of

at

. If

, then

and hence the residue is equal to

, which is the derivative of

at

. This derivative is

.

Thus the integral over

+integral over

is

.

As

tends to infinity, the first integral tends to what we have to find,

, while the second integral tends to zero, as we showed. So the answer is

.

A word of warning

Notice that in the end we got a reasonable answer: a real positive answer. If we somehow get a negative or imaginary number by integrating a real positive function over the reals, we can immediately know that we have made a mistake! Don't ever leave such mistakes without a comment: common sense is very important even for a mathematician!

Integral of an oscillating function

Another example of a real integral that can be computed using residues calculus is an integral of the form

or

where

is a rational function.

Let's compute for instance

.

The idea is similar to the idea used in the previous example: we should close the loop by adding a large semicircle. However it doesn't work this way: the function

grows very fast as the imaginary part of

grows. The trick that saves the day is to use the fact that for \textbf{real} values of

, the function

is equal to

. Thus we can rewrite the integral

as

. The rest is more or less like it was in the previous example.

We first write the integral

as the limit of the integral

as

. Then we would like to add to this integral an integral of

over a large semicircle. To be sure it doesn't affect the result very much, we should estimate this addition:

. Now

and this is at most

if

.

So indeed the contribution of the integral over

tends to zero as

tends to infinity.

Finally the sum of the integrals over the interval

and the semicircle is equal by the residue theorem to

times the residue of

at

, which can be computed very easily:

. Thus the residue is

and hence the integral is

Exploiting multi-valuedness

Let's try to compute

. Notice that this integral is an improper integral which should be interpreted as

. Then we should somehow close the contour of integration to be able to apply residue calculus. If one completes it to a sector with an angle of less than

, then one adds some integral along a straight line which really contributes something new and doesn't help us. There is a strange idea: consider a "key-hole" contour consisting of the interval from

## Residue theorem

Recall that residue theorem allows one to compute an integral of an analytic function with isolated singularities:

where the sum is over the singularities

contained inside of the curve

.

Last time we've seen some simple examples of computing residues. What we usually do is find enough terms in the Laurent series expansion of the function until we find the minus-first one.

## Computing a residue by manipulation of power series

Let's start by considering an example:

Compute

over the circle

Solution: the singularities of

are located at the zeroes of

, i.e. at integer multiples of

. Only one such point is inside

, so all we have to do to compute the integral is find the residue

and multiply the answer by

To find the Laurent series expansion for

we first compute several terms of Taylor series expansions of

and

and then try to divide one by the other:

, so

Similarly

so

Now the quotient

obviously has a leading term

, i.e. it has a pole of order

. But since we are interested in the residue, i.e. the minus-first coefficient in Laurent series expansion, we'll have to go a little further in the computation.

We know that there is some Laurent expansion

. To find

we multiply both sides by the denominator to get

, or

Hence

and the original integral

## Computing a residue without computing

Another example: what is the residue of

at

?

We could try to use the previous method: it would involve some enormously long computation with power series. But in this example we can just notice that since the function in question is even, its Laurent series expansion has only even terms. Hence in particular the residue is zero.

## Integral of a rational function of sine and cosine over the full period

We can use residue calculus to compute not only integrals over closed loops in the complex domain, but also some special integrals on the real line. In fact it was the problem of computing certain real integrals that has led Cauchy to invent residues and much of complex analysis.

For instance we have seen once that to find an integral of a rational function of sine and cosine over the full period, we can make a substitution

and transform it to an integral of a rational function over the unit circle. \textit{Now} we actually can compute any such integral.

Here's an example: compute the integral

.

To solve it we make a substitution

and notice that

,

and as

goes from

to

, the variable

goes around the unit circle and makes exactly one full turn. Thus the integral is equal to

This integral simplifies to

. We factor the denominator to find the poles:

, thus there is only one pole in the unit circle:

. The residue at this point can be easily computed:

If

, then

so we are basically trying to compute the coefficient

, which is the derivative of

at

. This derivative turns out to be

.

Thus the original integral is

## Integral of a rational function over the real line

Another type of integrals we can compute is an integral of a rational function over the real line, for instance

. One can compute this integral by the usual methods of calculus: find the antiderivative and use Newton-Leibnitz formula. But it's rather messy (especially if one doesn't know complex numbers).

Instead we can try to apply residue theorem. The problem is that we want to integrate a function over the real line, which isn't a closed loop. Even if we write the integral as

, we are still dealing with an integral over a non-closed path. The idea is to close the path using a large semicircle in the upper half-plane, and hope that this addition doesn't really change the integral. It is reasonable to expect that indeed the integral over the semicircle is small, since the integrand is of order

while the path length is only of order

.

Let's now do everything accurately. Let

be the semicircle in the upper half-plane of radius

. We can estimate the integral

as follows: by triangle inequality for integrals

which tends to

as

tends to

. So indeed adding an integral over a large semicircle contributes less and less as

becomes larger and larger.

Now the integral over the interval from

to

together with the integral over the semicircle

give us an integral over a closed path, which can be computed using residue theorem.

The integrand

has only one pole in the upper half-plane: the point

. Thus all we have to do is find the residue of

at

. If

, then

and hence the residue is equal to

, which is the derivative of

at

. This derivative is

.

Thus the integral over

+integral over

is

.

As

tends to infinity, the first integral tends to what we have to find,

, while the second integral tends to zero, as we showed. So the answer is

.

## A word of warning

Notice that in the end we got a reasonable answer: a real positive answer. If we somehow get a negative or imaginary number by integrating a real positive function over the reals, we can immediately know that we have made a mistake! Don't ever leave such mistakes without a comment: common sense is very important even for a mathematician!

## Integral of an oscillating function

Another example of a real integral that can be computed using residues calculus is an integral of the form

or

where

is a rational function.

Let's compute for instance

.

The idea is similar to the idea used in the previous example: we should close the loop by adding a large semicircle. However it doesn't work this way: the function

grows very fast as the imaginary part of

grows. The trick that saves the day is to use the fact that for \textbf{real} values of

, the function

is equal to

. Thus we can rewrite the integral

as

. The rest is more or less like it was in the previous example.

We first write the integral

as the limit of the integral

as

. Then we would like to add to this integral an integral of

over a large semicircle. To be sure it doesn't affect the result very much, we should estimate this addition:

. Now

and this is at most

if

.

So indeed the contribution of the integral over

tends to zero as

tends to infinity.

Finally the sum of the integrals over the interval

and the semicircle is equal by the residue theorem to

times the residue of

at

, which can be computed very easily:

. Thus the residue is

and hence the integral is

## Exploiting multi-valuedness

Let's try to compute

. Notice that this integral is an improper integral which should be interpreted as

. Then we should somehow close the contour of integration to be able to apply residue calculus. If one completes it to a sector with an angle of less than

, then one adds some integral along a straight line which really contributes something new and doesn't help us. There is a strange idea: consider a "key-hole" contour consisting of the interval from

to

, a circle of radius

in counter-clockwise direction, a ray from

back to

and then a circle of radius

in clock-wise direction.

One can even compute

using residue theorem for integral of

over large rectangle.

\end{document}