then take the limit as R → ∞. To obtain our final

EVALUATING REAL INTEGRALS
USING THE RESIDUE THEOREM
PR HEWITT
All examples taken from chapter 7 of Complex Variables and Applications,
8th edition, by James Brown and Ruel Churchill.
Problem 6, page 267. We start with a simple example which nevertheless
illustrates the general strategy. We wish to evaluate
Z ∞
dx
(1)
2
−∞ x + 2x + 2
To do this we first evaluate
Z
f (z) dz
CR
where
f (z) =
1
z 2 + 2z + 2
and CR is the contour
then take the limit as R → ∞. To obtain our final result we show that the
contribution to the integral from the semicircle AR tends to 0.
Date: 27 March 2013.
1
2
PR HEWITT
First we evaluate the contour integral using the Residue Theorem. Since
z 2 + 2z + 2 = (z + 1)2 + 1 we see that there is exactly one singularity interior
to the contour, namely a simple pole at z = −1 + i. Hence
Z
1
f (z) dz = 2πi · Res f (z) = 2πi ·
=π
z=−1+i
2(−1 + i) + 2
CR
Now we need to estimate |f (z)| when |z| = R. There are several ways to do
this. Using an idea from a previous exercise we note that if z 2 +2z +2 = z 2 w
then
2
2
w = 1 + + 2 → 1 as z → ∞.
z z
Hence we may choose an R so that |w| ≥ 12 when |z| ≥ R. In this range we
find that
2
1
|f (z)| ≤ 1 2 ≤ 2 when |z| ≥ R
R
2 |z|
Hence
Z
2
f (z) dz ≤ πR · 2 → 0 as R → ∞
lim R→∞ AR
R
When we put this all together we find that
Z ∞
Z ∞
dx
dx
= P. V.
2
2
x + 2x + 2
−∞ x + 2x + 2
Z−∞
f (z) dz
= lim
R→∞ IR
Z
Z
= lim
f (z) dz −
f (z) dz
R→∞
CR
AR
Z
= lim π −
f (z) dz
R→∞
AR
= π − 0.
We can check our work directly, without recourse to complex variables,
by making the substitution u = x + 1 in (1):
b+1
Z b
Z b+1
dx
du
→ 12 π − − 12 π
=
= arctan(u)
2
2
a x + 2x + 2
a+1 u + 1
a+1
as a → −∞ and b → +∞.
REAL INTEGRALS AND RESIDUES
3
Problem 8, pages 267–268. We are asked to evaluate
Z ∞
dx
(2)
3
x +1
0
The book suggests taking f (z) = 1/(z 3 + 1) and integrating f along the
contour
This will proceed along the same lines as above, using the Residue Theorem
and demonstrating that the contribution to the integral from the circular arc
tends to 0. The main difference is the extra segment JR : the contribution
from this segment is significant, and so we must parametrize it carefully and
study the integral there.
Again there is only one singularity inside the contour, and that is a simple
pole at eiπ/3 . Hence
Z
1
= i 32 πe−i 2π/3
f (z) dz = 2πi · Res f (z) = 2πi ·
iπ/3
2
iπ/3
3(e
)
z=e
CR
When |z| = R > 1 the Triangle Inequality tells us that
1
|f (z)| ≤ 3
R −1
whence
Z
2
1
≤ πR ·
f
(z)
dz
→ 0 as R → ∞.
3
3−1
R
AR
Now the new and interesting bit. Along JR we take the parametrization
z = rei 2π/3 for 0 ≤ r ≤ R. This parametrizes JR backwards, hence
Z
Z
Z R i 2π/3
Z
e
dr
i 2π/3
f (z) dz = −
f (z) dz = −
= −e
f (z) dz.
r3 + 1
JR
−JR
0
IR
4
PR HEWITT
When we put all this together we find that
Z
Z
i 23 πe−i 2π/3 = (1 − ei 2π/3 )
f (z) dz +
IR
f (z) dz.
AR
If we take the limit as R → ∞ and divide both sides by
conclude that
Z ∞
i 2π
π
dx
=
=
=
3+1
i
2π/3
−i
2π/3
x
3
sin(2π/3)
3(e
−e
)
0
1 − ei 2π/3 we
2π
√
3 3
This integral can also be done without recourse to the Residue Theorem,
by factoring x3 + 1 as (x + 1)(x2 − x + 1) and then applying the standard
techniques from Callc II — partial fractions, trig substitution, etc. I will
leave this as an exercise.
Problem 7, page 276. We now do a simple application of Jordan’s Lemma.
We are asked to evaluate
Z ∞
x sin x dx
(3)
2
2
−∞ (x + 1)(x + 4)
Notice that the integrand is even. Hence
Z ∞
Z ∞
x eix dx
x sin x dx
=
Im
P.
V.
2
2
2
2
−∞ (x + 1)(x + 4)
−∞ (x + 1)(x + 4)
We take
f (z) =
(z 2
z
+ 1)(z 2 + 4)
and integrate f (z)eiz over the contour below and apply Jordan’s Lemma to
the integral over the semicircle.
REAL INTEGRALS AND RESIDUES
5
Inside this contour there are two singularities, simple poles at i and 2i.
Hence
Z
iz
iz
iz
f (z)e dz = 2πi · Res f (z)e + Res f (z)e
z=i
CR
z=2i
ie−1
2ie−2
= 2πi ·
+
2i · (−1 + 4) (−4 + 1) · 4i
π(e − 1)
=i
.
3e2
When |z| = R > 2 we find that
R
|f (z)| ≤
→ 0 as R → ∞.
2
(R − 1)(R2 − 4)
Hence by Jordan’s Lemma we have
Z
f (z)eiz dz → 0 as R → ∞.
AR
If we put this all together then we conclude
Z
Z ∞
x sin x dx
=
Im
lim
f (z)eiz dz
2 + 1)(x2 + 4)
R→∞
(x
I
−∞
ZR
Z
= Im lim
f (z)eiz dz −
R→∞
CR
π(e − 1)
− 0)
3e2
π(e − 1)
=
3e2
= Im(i
AR
iz
f (z)e dz
6
PR HEWITT
Problem 1, page 286. We are asked to evaluate
Z ∞
cos(ax) − cos(bx)
dx
(4)
x2
0
Note that
cos(az)
1
a
= 2 − + ···
2
z
z
2
and thus
cos(az) − cos(bz)
b−a
=
+ ···
z2
2
which is entire! There will be no residues to compute if we integrate this
function.
Instead we integrate
a−b
eiaz − eibz
=i
+ ··· ,
2
z
z
which has a simple pole at 0, and then look at the real part. The complication is that this function is singular at a point along the natural contour
for this problem — in fact the improper integral near 0 diverges. So we
take an “indented contour” to ensure that the integrand is analytic along
the contour:
f (z) =
By the Residue Theorem we have that
Z
f (z) dz = 0.
CR
Since
that
1/|z|2
=
1/R2
along AR Jordan’s Lemma (applied twice) tells us
Z
f (z) dz → 0 as R → ∞
AR
REAL INTEGRALS AND RESIDUES
7
Along J we take the parametrization z = −x for ρ ≤ x ≤ R and find that
Z R −iax
Z
Z
e
− e−ibx
f (z) dz = −
f (z) dz = −
(−dx)
x2
ρ
−J
J
Hence
Z
Z
f (z) dz = 2
ρ
I+J
R
cos(ax) − cos(bx)
dx
x2
It remains to study what happens to the integral along Γρ as ρ → 0. Here
we meet an old friend in a new guise. Let us consider a slightly more general
situation. Suppose that g(z) has a simple pole at z0 with residue B, and we
integrate g along circular arc of small radius ρ:
Near z0 we have that
g(z) =
B
+ h(z)
z − z0
where h(z) is analytic. For sufficiently small ρ we have (say)
|h(z)| ≤ |h(z0 )| + 1
whence
Z
h(z) dz ≤ (β − α)ρ · (|h(z0 )| + 1) → 0 as ρ → 0
Γρ
This yields
Z
Z
lim
g(z) dz = lim
ρ→0 Γρ
β
ρ→0 α
B · iρeiθ dθ
+ lim
ρ→0
ρeiθ
Z
h(z) dz = i (β − α)B
Γρ
When α = 0 and β = 2π we recover the essential computation in the proof of
the Residue Theorem. In our case we have α = π, β = 0, and B = i(a − b).
8
PR HEWITT
If we put all this together then we obtain
Z ∞
Z
cos(ax) − cos(bx)
1
dx =
lim
f (z) dz
ρ→0, R→∞ 2 I+J
x2
0
Z
Z
1
1
= − lim
f (z) dz − lim
f (z) dz
ρ→0 2 Γρ
R→∞ 2 AR
= − 12 i (−π) · i (a − b) − 0
Problem 3, page 286. We are asked to use the function
f (z) =
z 1/3 log z
, − 12 π < arg z < 32 π
z2 + 1
to evaluate the integrals
Z ∞ √
Z ∞√
3
3
x ln x
x
dx
and
dx
(5)
2
2
x +1
x +1
0
0
Two for the price of one! As with the previous example we will use what
the text calls an “indented contour”, but in this case we will be eschewing
a branch cut, not an isolated singularity. The limit calculations will be very
different for the indentation.
We use the same contour as above:
When R is large and ρ is small the enclosed region contains exactly one
singularity, namely a simple pole at i. Hence
Z
i1/3 log i
π 2 iπ/6
f (z) dz = 2πi · Res f (z) = 2πi ·
=i
e
z=i
2i
2
C
REAL INTEGRALS AND RESIDUES
9
Now we need to estimate the contributions to the integral from A and Γ.
When |z| = r we find that
|f (z)| ≤
r1/3 (| ln r| + 32 π)
|r2 − 1|
Hence
Z
AR
R1/3 (ln R + 32 π)
f (z) dz ≤ πR ·
→ 0 as R → +∞
R2 − 1
and
Z
ρ1/3 (− ln ρ + 32 π)
→ 0 as ρ → 0+
f (z) dz ≤ πρ ·
Γρ
1 − ρ2
by L’Hospital’s Rule.
Thus, in the limit, all of the action is along I and J. We can parametrize
J backwards using z = −x for ρ ≤ x ≤ R. Along this segment we have that
−x = eiπ x. Thus
Z
Z
Z R iπ/3 √
3
x (ln x + iπ)
e
(−dx)
f (z) dz = −
f (z) dz = −
x2 + 1
J
−J
ρ
Z R√
Z R √
3
3
x ln x
x
iπ/3
= eiπ/3
dx
+
i
πe
dx
2
2
x
+
1
x
+
1
ρ
ρ
When we put all these integrals together we find that
Z
Z
Z
Z
π 2 iπ/6
i
e
= f (z) dz + f (z) dz + f (z) dz +
f (z) dz
2
I
J
Γ
A
Z R √
Z R√
3
3
x ln x
x
iπ/3
iπ/3
= (1 + e
)
dx
+
i
πe
dx
2
2
x +1
ρ x +1
ρ
Z
Z
+ f (z) dz +
f (z) dz
Γ
A
If we take limits as ρ → 0 and R → +∞, then divide both sides by eiπ/6
then we obtain
Z ∞√
Z ∞ √
3
3
π2
x ln x
x
iπ/6
i
= 2 cos(π/6)
dx
+
i
πe
dx
2
2
2
x +1
x +1
0
0
If we look at the real and imaginary parts of the above equation we find
that
√
√
Z
√ Z ∞ 3 x ln x
π ∞ 3x
3
dx =
dx
x2 + 1
2 0 x2 + 1
0
√
√
Z
π2
π 3 ∞ 3x
=
dx
2
2
x2 + 1
0
which lead to the answers given in the text.
10
PR HEWITT
Problem 6, page 291. Finally we show how we can sometimes use residues
to evaluate ordinary (that is, not improper) integrals by making a substitution that transforms the real integral into a contour integral. For example,
to compute
π
Z
(6)
0
dθ
, a > 1.
(a + cos θ)n
we use the substitution
z = eiθ , dz = i eiθ dz = iz dz, cos θ = 21 (z + z −1 ).
Thus
Z
π
0
Z
1 2π
dθ
dθ
=
n
(a + cos θ)
2 0 (a + cos θ)n
Z
1
dz
=
1
2 |z|=1 iz(a + 2 (z + z −1 ))n
Z
2n−1
z n−1 dz
=
2
n
i
|z|=1 (z + 2az + 1)
Z
2n−1
z n−1 dz
=
n
n
i
|z|=1 (z − r) (z − s)
where
r, s = −a ±
p
a2 − 1.
Since r < −1 we find that the only singularity in the circle is a pole of order
n is the root s = 1/r. Thus
Z
0
π
dθ
z n−1
n
=
2
π
·
Res
z=s (z − r)n (z − s)n
(a + cos θ)n
We expand z n−1 /(z − r)n in a Laurent series around s:
z n−1
(z − s + s)n−1
=
(z − r)n
(s − r + z − s)n
n−1
X n − 1
1
=
sj (z − s)n−1−j
(s − r)n
j
j=0
∞
X −n (z − s)k
×
k (s − r)k
k=0
REAL INTEGRALS AND RESIDUES
Hence
Z π
11
`
n−1 dθ
2n π X n − 1 −n
s
=
n
(s − r)n
s−r
`
`
0 (a + cos θ)
`=0
n−1 −s `
2n π X n − 1 n + ` − 1
=
(s − r)n
s−r
`
`
`=0
n−1
X n − 1n + ` − 1
2n π
(−s)` (s − r)n−`−1
=
(s − r)2n−1
`
`
`=0
√
√
2
Note that −s = a − a − 1 and s − r = 2 a2 − 1. Thus when n = 2 we
obtain
p
p
πa
4π
2 − 1 + 2(a −
2 − 1) =
2
a
a
8(a2 − 1)3/2
(a2 − 1)3/2
When n = 3 we obtain
p
p
p
8π
2
2 − 1) · 2 a2 − 1 + 6(a −
2 − 1)2
a
a
4(a
−
1)
+
6(a
−
32(a2 − 1)5/2
π(4a2 + 2)
=
4(a2 − 1)5/2
What is the pattern for arbitrary n?