# A Note on Evaluating Integrals by Contour Integration: Finding Residues

*Michael Fowler *

### Contours Meet Singularities

Remember (from the previous lecture) that in evaluating an integral of a function along a closed contour in the complex plane, we can always move the contour around, provided it does not encounter a point where the integrand is not analytic.

So, given an integral, usually along the real axis or part of it, we complete the contour in the complex plane, then typically shrink it down to contours around each of the singularities inside. (For a cut plane, the procedure might be more complicated.) The small contour around a pole contributes the residue at that pole, we add these together to get the result.

A simple pole gives a residue, an integrand $1/{z}^{2}$ doesn’t, as we can see by integrating around the unit circle:

$\underset{\left|z\right|=1}{\oint}\frac{dz}{z}}=2\pi i,\text{\hspace{0.17em}}\text{\hspace{1em}}{\displaystyle \underset{\left|z\right|=1}{\oint}\frac{dz}{{z}^{2}}}=0,\text{\hspace{0.17em}}\dots ,\text{\hspace{0.17em}$

However, a second order pole *will *give a residue if there’s more to the function$\u2014$specifically,
if the rest of the function has a nonzero derivative at the pole, because in
that case there *is* effectively a first order pole there, and

$\underset{\left|z\right|=1}{\oint}\frac{f\left(z\right)dz}{{z}^{2}}}=2\pi i{f}^{\prime}\left(0\right)$

This is because we can write it as

$\underset{\left|z\right|=1}{\oint}\frac{\left(f\left(0\right)+{f}^{\prime}\left(0\right)z+\dots \right)dz}{{z}^{2}}}=2\pi i{f}^{\prime}\left(0\right).$

### Simple Examples of Contour Integration

Let’s start with

$I={\displaystyle \underset{-\infty}{\overset{\infty}{\int}}\frac{dx}{{x}^{2}+{a}^{2}}}.$

Actually this can be done directly, with the substitution $x=a\mathrm{tan}\theta $, the result is $\pi /a$.

But it’s pretty simple as a contour integral too: we have to have a closed contour to use the calculus of residues, as it’s called, but we can put a big semicircular contour in the upper half complex plane (or the lower, choose one) it will have length $\pi R$, but the integrand is or order $1/{R}^{2}$, so this contribution from the big semicircle goes to zero on taking $R\to \infty $.

There are two poles at $z=\pm ia$, our contour encloses the one in the upper half plane only, and near that pole

$$\frac{1}{{z}^{2}+{a}^{2}}=\frac{1}{\left(z+ia\right)\left(z-ia\right)}\cong \frac{1}{2ia\left(z-ia\right)}$$

So the result is

$$I=2\pi i\left(\text{residue}\right)=\frac{2\pi i}{2ia}=\frac{\pi}{a}.$$

Now let’s look at something more difficult:

$\underset{-\infty}{\overset{\infty}{\int}}\frac{{e}^{imx}}{{\left({a}^{2}+{x}^{2}\right)}^{2}}}dx.$

Again, we close the real axis contour with a large semicircle, but now we’re forced to put it in the upper half plane, because the exponential diverges in the lower half plane.

There is one pole, at $z=ia$. It’s a double pole, though (I mean it goes as $f\left(z\right)/{\left(z-ia\right)}^{2}$ ). We need to factor it out like this and figure out the first derivative of the rest of the integrand, that is, $f\left(z\right)$, at that point.

Putting $z=ia+\zeta $, near $\zeta =0$ we have the integrand

$$\frac{{e}^{imz}}{{\left({a}^{2}+{z}^{2}\right)}^{2}}=\frac{{e}^{im\left(ia+\zeta \right)}}{{\left(\zeta \left(2ia+\zeta \right)\right)}^{2}}\cong \frac{{e}^{-ma}\left(1+im\zeta \right)}{-4{a}^{2}{\zeta}^{2}{\left(1+\frac{\zeta}{2ia}\right)}^{2}}\cong \frac{{e}^{-ma}}{-4{a}^{2}{\zeta}^{2}}\left(1+im\zeta -\frac{\zeta}{ia}\right)$$

So the residue is the coefficient of $1/\zeta $ in this expression, which is $\frac{-i{e}^{-ma}\left(1+ma\right)}{4{a}^{3}}$, so

$$\underset{-\infty}{\overset{\infty}{\int}}\frac{{e}^{imx}}{{\left({a}^{2}+{x}^{2}\right)}^{2}}}dx=\frac{\pi {e}^{-ma}\left(1+ma\right)}{2{a}^{3}}.$$

Notice that taking the real part we immediately get

$$\underset{0}{\overset{\infty}{\int}}\frac{\mathrm{cos}mx}{{\left({a}^{2}+{x}^{2}\right)}^{2}}}dx=\frac{\pi {e}^{-ma}\left(1+ma\right)}{4{a}^{3}}.$$

We could not have
done a direct contour integral on cos, because it blows up in *both* half planes, cos for large
imaginary argument being cosh for large real argument.

It was safe to ignore the integral around the large semicircle in the above because of the denominator. In fact, there’s a result known as Jordan’s lemma that says if the integrand has the form ${e}^{i\lambda z}f\left(z\right)$ with $\lambda $ real and positive, and $f\left(z\right)$ goes uniformly to zero as $z\to \infty $ in the upper half plane, then the large semicircle contribution goes to zero.

### Trigonometric Integrals

Trigonometric integrals can often be evaluated by integrating around the unit circle, $z=r{e}^{i\theta}$, $dz=izd\theta $, $\mathrm{cos}\theta ={\scriptscriptstyle \frac{1}{2}}\left(z+1/z\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathrm{sin}\theta ={\scriptscriptstyle \frac{1}{2i}}\left(z-1/z\right)$.

For example,

$$\underset{0}{\overset{2\pi}{\int}}\frac{{\mathrm{sin}}^{2}\theta d\theta}{\left(a+b\mathrm{cos}\theta \right)}}=\frac{i}{2b}{\displaystyle \underset{\left|z\right|=1}{\oint}\frac{{\left({z}^{2}-1\right)}^{2}dz}{{z}^{2}\left({z}^{2}+2az/b+1\right)}}.$$

This has a second-order pole at the origin$\u2014$to calculate the residue there we need to find the derivative of the rest of the function at the origin.

It also has two simple poles from the roots of the quadratic in the denominator, but these roots have a product of 1, so exactly one of them is inside the unit circle, we need to find the value of the rest of the function at that pole. I’m not going to do it here$\u2014$it’s routine.

### Many Valued Functions

Suppose we have an integral $\underset{0}{\overset{\infty}{\int}}{x}^{a-1}Q\left(x\right)dx$ where *a* is not an
integer. Now ${z}^{a-1}$ is a many valued function$\u2014$if we
define it as real on the real axis, than on taking it around the origin and
back to the starting point on the real axis, it will have picked up a factor ${e}^{2\pi i\left(a-1\right)}={e}^{2\pi ia}$.

Let’s now take $Q\left(x\right)$ to be a rational function with no poles on the real axis, and such that the integrand goes to zero faster than $1/z$ at infinity.

Then we extend the integral along the real axis with a complete circle at infinity, coming back along the real axis, this last contribution being the same as the original integral, but multiplied by $-{e}^{2\pi ia}$.

Therefore,

$$\underset{0}{\overset{\infty}{\int}}{x}^{a-1}Q\left(x\right)dx}=\frac{2\pi i}{1-{e}^{2\pi ia}}\left(\text{sumofresiduesinwholecomplexplane}\right).$$

### Poles on the Real Axis

Poles on the real axis require special treatment$\u2014$the
contour can’t go through them, that would be meaningless. These poles come up in scattering theory, and
there the physics (such as causality) tells us if the contour is to be shifted
slightly *above*, or slightly *below* the pole.

The integral in practice is written as a sum of two terms:

first, the *principal part*, which is defined by stopping the integral just short of the
pole then picking it up at the same distance on the other side, in the limit
that this distance goes to zero,

second, a semicircular contour around the pole, which picks up half the residue, with sign determined by which way we take it around the pole.

For example, the integrand ${e}^{imz}/z,\text{\hspace{0.17em}}\text{\hspace{0.17em}}m0$ has a simple pole at the origin, and $P{\displaystyle \underset{-\infty}{\overset{\infty}{\int}}\frac{{e}^{imx}}{x}dx}=\pi i$.

(Putting the little circle around the origin either way gives the same result! Can you see why?)

Equating imaginary parts, we find $\underset{0}{\overset{\infty}{\int}}\frac{\mathrm{sin}mx}{x}}dx={\scriptscriptstyle \frac{1}{2}}\pi $,
since the *P*
no longer matters if the integrand is finite at the origin.

You will see in physics expressions with propagator terms in integrands like $\frac{1}{x-{x}^{\prime}-i\epsilon}$. The $i\epsilon $ is an infinitesimal term, whose only purpose is to tell you which way the contour goes around the pole.