11.5. THE METHOD OF RESIDUES 265
Example 11.5.5 Find∫
∞
−∞
x+2
(x2+1)(x2+4)2 dx
The poles of interest are located at i,2i. The pole at 2i is of order 2 and the one at i isof order 1. In this case, the partial fractions expansion is
19 x+ 2
9x2 +1
−13 x+ 2
3
(x2 +4)2 −19 x+ 2
9x2 +4
You could do these integrals by elementary methods. However, I will consider the originalproblem by finding 2πi times the sum of the residues.
The pole at i would be
limz→i
( 19 z+ 2
9
)(z− i)
(z+ i)(z− i)=
( 19 i+ 2
9
)(i+ i)
=118− 1
9i
Now consider the pole at 2i which is a pole of order 2. Using Procedure 11.5.2, it is
limz→2i
ddz
((z−2i)2 (z+2)
(z2 +1)(z2 +4)2
)= lim
z→2i
ddz
((z+2)
(z2 +1)(z+2i)2
)
= limz→2i
(− 1
(z2 +1)2 (z+2i)3
(3z3 +(8+2i)z2 +(1+8i)z+4−2i
))
= − 118
+11
144i
Integral over a large semicircle is
2πi(− 1
18+
11144
i)+2πi
(118− 1
9i)=
572
π
Letting R→ ∞, this is the desired improper integral. More precisely, it is the Cauchyprincipal value integral, limR→∞
∫ R−R
x+2
(x2+1)(x2+4)2 dx . In this case, it is a genuine improper
integral.Sometimes you don’t blow up the curves and take limits. Sometimes the problem of
interest reduces directly to a complex integral over a closed curve. The integral of rationalfunctions of cosines and sines lead to this kind of thing. Here is an example of this.
Example 11.5.6 The integral is∫
π
0cosθ
2+cosθdθ .
This integrand is even and so it equals 12∫
π
−πcosθ
2+cosθdθ . For z ousn the unit circle, z =
eiθ , z = 1z and therefore, cosθ = 1
2
(z+ 1
z
). Thus dz = ieiθ dθ and so dθ = dz
iz . Note thatthis is done in order to get a contour integral which reduces to the one of interest. It followsthat a contour integral which reduces to the integral of interest is
12i
∫γ
12
(z+ 1
z
)2+ 1
2
(z+ 1
z
) dzz
=12i
∫γ
z2 +1z(4z+ z2 +1)
dz