36.6. EVALUATION OF IMPROPER INTEGRALS 741
Example 36.6.4 The integral is ∫π
0
cosθ
2+ cosθdθ
This integrand is even and so it equals
12
∫π
−π
cosθ
2+ cosθdθ .
For z on the unit circle, z = eiθ , z = 1z and therefore, cosθ = 1
2
(z+ 1
z
). Thus dz = ieiθ dθ
and so dθ = dziz . Note that this is done in order to get a complex integral which reduces
to the one of interest. It follows that a complex integral which reduces to the integral ofinterest is
12i
∫γ
12
(z+ 1
z
)2+ 1
2
(z+ 1
z
) dzz
=12i
∫γ
z2 +1z(4z+ z2 +1)
dz
where γ is the unit circle oriented counter clockwise. Now the integrand has poles of order1 at those points where z
(4z+ z2 +1
)= 0. These points are
0,−2+√
3,−2−√
3.
Only the first two are inside the unit circle. It is also clear the function has simple poles atthese points. Therefore,
res( f ,0) = limz→0
z(
z2 +1z(4z+ z2 +1)
)= 1.
res(
f ,−2+√
3)=
limz→−2+
√3
(z−(−2+
√3)) z2 +1
z(4z+ z2 +1)=−2
3
√3.
It follows ∫π
0
cosθ
2+ cosθdθ =
12i
∫γ
z2 +1z(4z+ z2 +1)
dz
=12i
2πi(
1− 23
√3)
= π
(1− 2
3
√3).
Other rational functions of the trig functions will work out by this method also.Sometimes we have to be clever about which version of an analytic function that re-
duces to a real function we should use. The following is such an example.
Example 36.6.5 The integral here is ∫∞
0
lnx1+ x4 dx.