Notes on calculating residues and real integrals

[These notes written July 1998 by Alexander Perlis. This is a rough draft. Send comments/corrections

to aprl@math.arizona.edu.]

Some ways to calculate residues:

If you can easily obtain integrals, then use the Residue Theorem in reverse. Since ∮_{C} f(z) dz = 2πi(∑ res_{z=z_{k}}f(z)), the sum of residues being over all singularities z_{k} contained in the counterclockwise loop C, one may compute a single residue as res_{z=z_{0}}f(z) = \frac{1}{2πi} ∫_{C} f(z) dz, being sure to choose the loop C so that z_{0} is the only singularity in its interior. If you can easily compute the power series expansion of f(z) at z = z_{0}, then read off the residue as the coefficient of (z − z_{0})^{−1}. If you know that f(z) is analytic at z = z_{0}, then the residue is 0. If you know that f(z) has a pole of order k at z = z_{0}, then the following manipulations will expose the residue. Even though you may not be able to explicitly compute it, in your mind you may think of f(z) as a power series in powers of z − z_{0}, the most negative power being (z − z_{0})^{−k}. The idea is to slide the entire power series to the right until there are no more negative powers, then use differentiation to kill and slide terms until the desired coefficient appears as the constant term. To slide to the right, simply replace f(z) with (z − z_{0})^{k}f(z). We previously sought the coefficient of (z − z_{0})^{−1} in f(z), which is now the coefficient of (z − z_{0})^{k−1} in (z − z_{0})^{k}f(z). To bring this into the constant term, differentiate k − 1 times to obtain: (d/dz)^{k−1}((z − z_{0})^{k−1}f(z)). (Note that this process introduces the factor (k − 1)!.) To obtain the value of the constant term from a power series with only positive powers, simply evaluate z = z_{0}. But in terms of your expression (d/dz)^{k−1}((z − z_{0})f(z)), this amounts to computing the limit as z → z_{0}. This limit will usually be trivial to calculate. In fact, if you’ve cleaned up your expression of (d/dz)^{k−1}((z − z_{0})f(z)), which means cancelled common factors and done anything else to remove any removable discontinuities at z_{0}, then taking this limit really is just evaluation, namely setting z = z_{0}. (You can observe this in the examples to follow.) Finally, the constant term is off by the factor (k − 1)!; putting it all together, we have:

res_{z=z_{0}}f(z) = lim_{z→z_{0}} \frac{d^{k−1}}{dz^{k−1}} (z − z_{0})^{k}f(z).

This might appear complicated at first, but as the examples will illustrate, certainly for k ≤ 3, this is often the easiest method to compute residues.

As a first example, notice that the only singularity of f(z) = z^{2} sin(1/z) is at z = 0; since sin(z) has an essential singularity at ∞ (it must, for else sin(z) would be meromorphic on the Riemann sphere, hence would have to be a rational function), we see that f(z) has an essential singularity at z = 0. Nonetheless, it makes sense to discuss the residue there. (The residue is still the coefficient of z^{−1}, independent of whether there are infinitely many negative power terms.) Since there are infinitely negative power terms, the only available methods are integration or manipulating power series.

[Try integration.] Here is the power series approach. We start with

\begin{aligned}f(z) & = z^{2}(\frac{1}{z} − \frac{1}{3!z^{3}} + \frac{1}{5!z^{5}} − ⋯) \\ & = z − \frac{1}{3!z} + \frac{1}{5!z^{3}} − ⋯, \end{aligned}

and thus see that the residue is res_{z=0}f(z) = −\frac{1}{6}.

As a second example, consider f(z) = \frac{e^{z}}{z^{4}−z^{3}} . The only singularities are a pole of order 3 at z = 0 and a simple pole at z = 1. We will first obtain the residues by manipulating power series. Then we’ll go back and do it using the slide-and-differentiate method, illustrating how it is much more efficient.

Expanding power series at z = 0 we get:

\frac{e^{z}}{z^{4} − z^{3}} = −\frac{1}{z^{3}} e^{z} \frac{1}{1 − z}

= −\frac{1}{z^{3}} (1 + z + \frac{1}{2}z^{2} + \frac{1}{3!}z^{3} + ⋯)(1 + z + z^{2} + z^{3} + ⋯)

= −\frac{1}{z^{3}} (1 + 2z + \frac{5}{2}z^{2} + \frac{8}{3}z^{3} + ⋯)

= −\frac{1}{z^{3}} − 2\frac{1}{z^{2}} − \frac{5}{2} \frac{1}{z} − \frac{8}{3} − ⋯,

and thus we see that res_{z=0}f(z) = −\frac{5}{2}.

Expanding power series at z = 1 we get:

\begin{aligned}\frac{e^{z}}{z^{4} − z^{3}} & = \frac{1}{z − 1} \frac{1}{z^{2}} e^{z} \\ & = \frac{1}{z − 1}(1 − 2(z − 1) + 3(z − 1)^{2} − 4(z − 1)^{3} + ⋯)(e + e(z − 1) + \frac{e}{2}(z − 1)^{2} + \frac{e}{6}(z − 1)^{3} + ⋯) \\ & = \frac{1}{z − 1}(e − e(z − 1) + \frac{3e}{2}(z − 1)^{2} − \frac{11e}{6}(z − 1)^{3} + ⋯) \\ & = e\frac{1}{z−1} − e + \frac{3e}{2}(z − 1) − \frac{11e}{6}(z − 1)^{2} + ⋯, \end{aligned}

and thus we see that res_{z=1}f(z) = e.

Now we’ll do the same using the slide-and-differentiate method. Since f(z) has a pole of order 3 at z = 0, we must multiply by z^{3} to “knock it out”, i.e., slide the power series so that we are analytic at z = 0. Our residue is now the coefficient of z^{2} in the function z^{3}f(z) = e^{z}/(z − 1). Next we differentiate: differentiating once gives (e^{z}(z − 1) − e^{z})/(z − 1)^{2} = e^{z}(z − 2)/(z − 1)^{2}. Differentiating again gives ((e^{z}(z −2)+e^{z})(z −1)^{2} −2e^{z}(z −2)(z −1))/(z −1)^{4}. Now we compute the limit at z → 0; this expression is continuous there, so we simply evaluate, to obtain: ((−2) + 1) − 2(−2)(−1) = −1 − 4 = −5. Finally, we are off by a factor of 2!, so the residue is −5/2.

It’s even easier at z = 1. This is a simple pole, so we slide the power series to the right one term, thus now considering (z − 1)f(z) = e^{z}/z^{3}. The coefficient we seek is already in the constant position, so we simply take z → 1 to evaluate that constant term; as before, we may substitute, and the constant term is calculated to be e. There was no differentiation, so we are not off by any factor, or we might agree that we are off by the factor 0! = 1, and so the residue is e.

Exercise: Find the residue at all singularities of z/(z^{2} + 1)^{2}, ze^{1/z}, and (z − 1)e^{1/z}. Try using more than one method for each.

Exercise: Show that ∫_{0}^{π} \frac{dθ}{5+2 cos θ} = π/3

Exercise: Show

∫_{0}^{2π} e^{cos θ} cos(nθ − sin θ) dθ = \{ \begin{matrix}0, & if n < 0; \\ \frac{2π}{n!}, & if n ≥ 0. \end{matrix}

In the process of doing the above, you probably discovered that for all n we have

∫_{|z|=1} z^{n−1}e^{1/z} dz = ∫_{|z|=1} \frac{e^{z}}{z^{n+1}} dz.

Show why this is so by two different approaches, once by a consideration of power series, the other time using the change-of-variables z ↦ \frac{1}{z}, being sure to explain what happens to the minus sign.

Partial solution: using z = e^{iθ} and dz = ie^{iθ} dθ = iz dθ, then cos θ = \frac{1}{2}(e^{iθ} + e^{−iθ}) = \frac{1}{2}(z + 1/z); the integrand becomes e^{cos θ} \frac{1}{2}(e^{i(nθ−sin θ)} + e^{−i(nθ−sin θ)}) = \frac{1}{2}(z^{n}e^{cos θ−i sin θ} + z^{−n}e^{cos θ+i sin θ}) = \frac{1}{2}(z^{n}e^{1/z} + z^{−n}e^{z}). Thus our integral changes to:

\frac{1}{2} ∫_{|z|=1}(z^{n}e^{1/z} + z^{−n}e^{z})\frac{dz}{iz} .

This can be split into two integrals, and a residue calculation gives the value of each.

Exercise. Show ∫_{0}^{∞} \frac{x^{2}}{(x^{2}+1)^{2}} dx = π/4. Solve this problem two different ways, once by turning it into a complex analysis integral, and once by making the substitution x = tan y, changing the integral into ∫_{0}^{π/2} sin^{2} y dy.

Exercise. Calculate ∫_{0}^{∞} \frac{sin x}{x} dx. I’m not sure how to do this one.

Exercise. Calculate ∫_{0}^{∞} \frac{sin^{2} x}{x^{2}} dx. The usual half circle path can be used, so long as one has a small excision going around the origin. Compare what happens when you go up or down around the origin. (Various quantities will change, but the net effect will be the same. Be sure you can do it either way.)