3Residue calculus

IB Complex Analysis



3.5 Applications of the residue theorem
This section is more accurately described as “Integrals, integrals, integrals”. Our
main objective is to evaluate real integrals, but to do so, we will pretend they
are complex integrals, and apply the residue theorem.
Before that, we first come up with some tools to compute residues, since we
will have to do that quite a lot.
Lemma.
Let
f
:
U \ {a} C
be holomorphic with a pole at
a
, i.e
f
is
meromorphic on U.
(i) If the pole is simple, then
Res(f, a) = lim
za
(z a)f(z).
(ii) If near a, we can write
f(z) =
g(z)
h(z)
,
where
g
(
a
)
6
= 0 and
h
has a simple zero at
a
, and
g, h
are holomorphic on
B(a, ε) \ {a}, then
Res(f, a) =
g(a)
h
0
(a)
.
(iii) If
f(z) =
g(z)
(z a)
k
near a, with g(a) 6= 0 and g is holomorphic, then
Res(f, a) =
g
(k1)
(a)
(k 1)!
.
Proof.
(i) By definition, if f has a simple pole at a, then
f(z) =
c
1
(z a)
+ c
0
+ c
1
(z a) + ··· ,
and by definition c
1
= Res(f, a). Then the result is obvious.
(ii) This is basically L’Hˆopital’s rule. By the previous part, we have
Res(f; a) = lim
za
(z a)
g(z)
h(z)
= g(a) lim
za
z a
h(z) h(a)
=
g(a)
h
0
(a)
.
(iii)
We know the residue
Res
(
f
;
a
) is the coefficient of (
z a
)
k1
in the Taylor
series of g at a, which is exactly
1
(k1)!
g
(k1)
(a).
Example. We want to compute the integral
Z
0
1
1 + x
4
dx.
We consider the following contour:
R R
×
e
/4
×
e
3/4
××
We notice
1
1+x
4
has poles at
x
4
=
1, as indicated in the diagram. Note that
the two of the poles lie in the unbounded region. So I(γ, ·) = 0 for these.
We can write the integral as
Z
γ
R
1
1 + z
4
dz =
Z
R
R
1
1 + x
4
dx +
Z
π
0
iRe
1 + R
4
e
4
dθ.
The first term is something we care about, while the second is something we
despise. So we might want to get rid of it. We notice the integrand of the second
integral is O(R
3
). Since we are integrating it over something of length R, the
whole thing tends to 0 as R .
We also know the left hand side is just
Z
γ
R
1
1 + z
4
dz = 2πi(Res(f, e
/4
) + Res(f, e
3/4
)).
So we just have to compute the residues. But our function is of the form given
by part (ii) of the lemma above. So we know
Res(f, e
/4
) =
1
4z
3
z=e
iπ/4
=
1
4
e
3πi/4
,
and similarly at
e
i3π/4
. On the other hand, as
R
, the first integral on the
right is
R
−∞
1
1+x
4
dx, which is, by evenness, twice of what we want. So
2
Z
0
1
1 + x
4
dx =
Z
−∞
1
1 + x
4
dx =
2πi
4
(e
/4
+ e
3πi/4
) =
π
2
.
Hence our integral is
Z
0
1
1 + x
4
dx =
π
2
2
.
When computing contour integrals, there are two things we have to decide.
First, we need to pick a nice contour to integrate along. Secondly, as we will see
in the next example, we have to decide what function to integrate.
Example. Suppose we want to integrate
Z
R
cos(x)
1 + x + x
2
dx.
We know
cos
, as a complex function, is everywhere holomorphic, and 1 +
x
+
x
2
have two simple zeroes, namely at the cube roots of unity. We pick the same
contour, and write ω = e
2πi/3
. Then we have
R R
×
ω
Life would be good if
cos
were bounded, for the integrand would then be
O
(
R
2
),
and the circular integral vanishes. Unfortunately, at, say,
iR
,
cos
(
z
) is large. So
instead, we consider
f(z) =
e
iz
1 + z + z
2
.
Now, again by the previous lemma, we get
Res(f; ω) =
e
2ω + 1
.
On the semicircle, we have
Z
π
0
f(Re
)Re
dθ
Z
π
0
Re
sin θR
|R
2
e
2
+ Re
+ 1|
dθ,
which is O(R
1
). So this vanishes as R .
The remaining is not quite the integral we want, but we can just take the
real part. We have
Z
R
cos x
1 + x + x
2
dx = Re
Z
R
f(z) dz
= Re lim
R→∞
Z
γ
R
f(z) dz
= Re(2πi Res(f, ω))
=
2π
3
e
3/2
cos
1
2
.
Another class of integrals that often come up are integrals of trigonometric
functions, where we are integrating along the unit circle.
Example. Consider the integral
Z
π/2
0
1
1 + sin
2
(t)
dt.
We use the expression of sin in terms of the exponential function, namely
sin(t) =
e
it
e
it
2i
.
So if we are on the unit circle, and z = e
it
, then
sin(t) =
z z
1
2
.
Moreover, we can check
dz
dt
= ie
it
.
So
dt =
dz
iz
.
Hence we get
Z
π/2
0
1
1 + sin
2
(t)
dt =
1
4
Z
2π
0
1
1 + sin
2
(t)
dt
=
1
4
Z
|z|=1
1
1 +
(zz
1
)
2
4
dz
iz
=
Z
|z|=1
iz
z
4
6z
2
+ 1
dz.
The base is a quadratic in
z
2
, which we can solve. We find the roots to be 1
±
2
and 1 ±
2.
× × ××
The residues at the point
2
1 and
2
+ 1 give
i
2
16
. So the integral we
want is
Z
π/2
0
1
1 + sin
2
(t)
= 2πi
2i
16
+
2i
16
!
=
π
2
2
.
Most rational functions of trigonometric functions can be integrated around
|z| = 1 in this way, using the fact that
sin(kt) =
e
ikt
e
ikt
2i
=
z
k
z
k
2
, cos(kt) =
e
ikt
+ e
ikt
2
=
z
k
+ z
k
2
.
We now develop a few lemmas that help us evaluate the contributions of certain
parts of contours, in order to simplify our work.
Lemma.
Let
f
:
B
(
a, r
)
\{a} C
be holomorphic, and suppose
f
has a simple
pole at a. We let γ
ε
: [α, β] C be given by
t 7→ a + εe
it
.
γ
ε
a
β
α
ε
Then
lim
ε0
Z
γ
ε
f(z) dz = (β α) · i · Res(f, a).
Proof. We can write
f(z) =
c
z a
+ g(z)
near
a
, where
c
=
Res
(
f
;
a
), and
g
:
B
(
a, δ
)
C
is holomorphic near
a
. We
take ε < δ. Then
Z
γ
ε
g(z) dz
(β α) · ε sup
zγ
ε
|g(z)|.
But
g
is bounded on
B
(
α, δ
). So this vanishes as
ε
0. So the remaining
integral is
lim
ε0
Z
γ
ε
c
z a
dz = c lim
ε0
Z
γ
ε
1
z a
dz
= c lim
ε0
Z
β
α
1
εe
it
· iεe
it
dt
= i(β α)c,
as required.
A lemma of a similar flavor allows us to consider integrals on expanding
semicircles.
Lemma
(Jordan’s lemma)
.
Let
f
be holomorphic on a neighbourhood of infinity
in
C
, i.e. on
{|z| > r}
for some
r >
0. Assume that
zf
(
z
) is bounded in this
region. Then for α > 0, we have
Z
γ
R
f(z)e
iαz
dz 0
as
R
, where
γ
R
(
t
) =
Re
it
for
t
[0
, π
] is the semicircle (which is not
closed).
γ
R
R R
In previous cases, we had
f
(
z
) =
O
(
R
2
), and then we can bound the
integral simply as
O
(
R
1
)
0. In this case, we only require
f
(
z
) =
O
(
R
1
).
The drawback is that the case
R
γ
R
f
(
z
) d
z
need not work it is possible that
this does not vanish. However, if we have the extra help from e
iαx
, then we do
get that the integral vanishes.
Proof. By assumption, we have
|f(z)|
M
|z|
for large |z| and some constant M > 0. We also have
|e
iαz
| = e
sin t
on
γ
R
. To avoid messing with
sin t
, we note that on (0
,
π
2
], the function
sin θ
θ
is
decreasing, since
d
dθ
sin θ
θ
=
θ cos θ sin θ
θ
2
0.
Then by consider the end points, we find
sin(t)
2t
π
for t [0,
π
2
]. This gives us the bound
|e
iαz
| = e
sin t
(
e
Ra2t/π
0 t
π
2
e
Ra2t
0
0 t
0
= π t
π
2
So we get
Z
π/2
0
e
iRαe
it
f(Re
it
)Re
it
dt
Z
2π
0
e
2αRt/π
· M dt
=
1
2R
(1 e
αR
)
0
as R .
The estimate for
Z
π
π/2
f(z)e
iαz
dz
is analogous.
Example. We want to show
Z
0
sin x
x
dx =
π
2
.
Note that
sin x
x
has a removable singularity at x = 0. So everything is fine.
Our first thought might be to use our usual semi-circular contour that looks
like this:
γ
R
R R
If we look at this and take the function
sin z
z
, then we get no control at
iR γ
R
.
So what we would like to do is to replace the sine with an exponential. If we let
f(z) =
e
iz
z
,
then we now have the problem that
f
has a simple pole at 0. So we consider a
modified contour
R
ε
ε
R
γ
R,ε
×
Now if
γ
R,ε
denotes the modified contour, then the singularity of
e
iz
z
lies outside
the contour, and Cauchy’s theorem says
Z
γ
R,ε
f(z) dz = 0.
Considering the
R
-semicircle
γ
R
, and using Jordan’s lemma with
α
= 1 and
1
z
as the function, we know
Z
γ
R
f(z) dz 0
as R .
Considering the
ε
-semicircle
γ
ε
, and using the first lemma, we get a contribu-
tion of
, where the sign comes from the orientation. Rearranging, and using
the fact that the function is even, we get the desired result.
Example. Suppose we want to evaluate
Z
−∞
e
ax
cosh x
dx,
where a (1, 1) is a real constant.
To do this, note that the function
f(z) =
e
az
cosh z
has simple poles where
z
=
n +
1
2
for
n Z
. So if we did as we have done
above, then we would run into infinitely many singularities, which is not fun.
Instead, we note that
cos(x + ) = cosh x.
Consider a rectangular contour
R
γ
0
R
γ
+
vert
γ
1
γ
vert
×
πi
2
πi
We now enclose only one singularity, namely ρ =
2
, where
Res(f, ρ) =
e
cosh
0
(ρ)
= ie
i/2
.
We first want to see what happens at the edges. We have
Z
γ
+
vert
f(z) dz =
Z
π
0
e
a(R+iy)
cosh(R + iy)
i dy.
hence we can bound this as
Z
γ
+
vert
f(z) dz
Z
π
0
2e
aR
e
R
e
R
dy 0 as R ,
since
a <
1. We can do a similar bound for
γ
vert
, where we use the fact that
a > 1.
Thus, letting R , we get
Z
R
e
ax
cosh x
dx +
Z
−∞
+
e
i
e
ax
cosh(x + )
dx = 2πi(ie
i/2
).
Using the fact that cosh(x + ) = cos(x), we get
Z
R
e
ax
cosh x
dx =
2πe
aiπ/2
1 + e
i
= π sec
πa
2
.
Example. We provide a(nother) proof that
X
n1
1
n
2
=
π
2
6
.
Recall we just avoided having to encircle infinitely poles by picking a rectangular
contour. Here we do the opposite we encircle infinitely many poles, and then
we can use this to evaluate the infinite sum of residues using contour integrals.
We consider the function
f
(
z
) =
π cot(πz)
z
2
, which is holomorphic on
C
except
for simple poles at Z \ {0}, and a triple pole at 0.
We can check that at n Z \ {0}, we can write
f(z) =
π cos(πz)
z
2
·
1
sin(πz)
,
where the second term has a simple zero at
n
, and the first is non-vanishing at
n 6= 0. Then we have compute
Res(f; n) =
π cos(πn)
n
2
·
1
π cos(πn)
=
1
n
2
.
Note that the reason why we have those funny
π
’s all around the place is so that
we can get this nice expression for the residue.
At z = 0, we get
cot(z) =
1
z
2
2
+ O(z
4
)
z
z
3
3
+ O(z
5
)
1
=
1
z
z
3
+ O(z
2
).
So we get
π cot(πz)
z
2
=
1
z
3
π
2
3z
+ ···
So the residue is
π
2
3
. Now we consider the following square contour:
× × × × × × × × × × ×
γ
N
(N +
1
2
)i
(N +
1
2
)i
N +
1
2
(N +
1
2
)
Since we don’t want the contour itself to pass through singularities, we make
the square pass through ±
N +
1
2
. Then the residue theorem says
Z
γ
N
f(z) dz = 2πi
2
N
X
n=1
1
n
2
π
2
3
!
.
We can thus get the desired series if we can show that
Z
γ
N
f(z) dz 0 as n .
We first note that
Z
γ
N
f(z) dz
sup
γ
N
π cot πz
z
2
4(2N + 1)
sup
γ
N
|cot πz|
4(2N + 1)π
N +
1
2
2
= sup
γ
N
|cot πz|O(N
1
).
So everything is good if we can show sup
γ
N
|cot πz| is bounded as N .
On the vertical sides, we have
z = π
N +
1
2
+ iy,
and thus
|cot(πz)| = |tan(y)| = |tanh(πy)| 1,
while on the horizontal sides, we have
z = x ± i
N +
1
2
,
and
|cot(πz)|
e
π(N+1/2)
+ e
π(N+1/2)
e
π(N+1/2)
e
π(N+1/2)
= coth
N +
1
2
π.
While it is not clear at first sight that this is bounded, we notice
x 7→ coth x
is
decreasing and positive for x 0. So we win.
Example. Suppose we want to compute the integral
Z
0
log x
1 + x
2
dx.
The point is that to define
log z
, we have to cut the plane to avoid multi-
valuedness. In this case, we might choose to cut it along
iR
0, giving a branch
of
log
, for which
arg
(
z
)
π
2
,
3π
2
. We need to avoid running through zero. So
we might look at the following contour:
R
ε ε
R
×
i
On the large semicircular arc of radius R, the integrand
|f(z)||dz| = O
R ·
log R
R
2
= O
log R
R
0 as R .
On the small semicircular arc of radius ε, the integrand
|f(z)||dz| = O(ε log ε) 0 as ε 0.
Hence, as
ε
0 and
R
, we are left with the integral along the negative
real axis. Along the negative real axis, we have
log z = log |z| + .
So the residue theorem says
Z
0
log x
1 + x
2
dx +
Z
0
log |z| +
1 + x
2
(dx) = 2πi Res(f; i).
We can compute the residue as
Res(f, i) =
log i
2i
=
1
2
2i
=
π
4
.
So we find
2
Z
0
log x
1 + x
2
dx +
Z
0
1
1 + x
2
dx =
2
2
.
Taking the real part of this, we obtain
Z
0
log x
1 + x
2
dx = 0.
In this case, we had a branch cut, and we managed to avoid it by going
around our magic contour. Sometimes, it is helpful to run our integral along the
branch cut.
Example. We want to compute
Z
0
x
x
2
+ ax + b
dx,
where
a, b R
. To define
z
, we need to pick a branch cut. We pick it to lie
along the real line, and consider the keyhole contour
As usual this has a small circle of radius
ε
around the origin, and a large circle
of radius R. Note that these both avoid the branch cut.
Again, on the R circle, we have
|f(z)||dz| = O
1
R
0 as R .
On the ε-circle, we have
|f(z)||dz| = O(ε
3/2
) 0 as ε 0.
Viewing
z
=
e
1
2
log z
, on the two pieces of the contour along
R
0
,
log z
differs
by 2
πi
. So
z
changes sign. This cancels with the sign change arising from
going in the wrong direction. Therefore the residue theorem says
2πi
X
residues inside contour = 2
Z
0
x
x
2
+ ax + b
dx.
What the residues are depends on what the quadratic actually is, but we will
not go into details.