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.

36.6. EVALUATION OF IMPROPER INTEGRALS 741Example 36.6.4 The integral is7 cos@Jo 2+cos@This integrand is even and so it equals1 (7 cos@2 J-_n 2+cos@For z on the unit circle, z =e’, = 4 and therefore, cos @ = 3 (¢+ +). Thus dz = ie!®d6and so d@ = az, Note that this is done i in order to get a complex integral which reducesto the one of interest. It follows that a complex integral which reduces to the integral ofinterest isape es ne 1 | 2+1 dk2i Jy 245 zg iJyz(4z+24+1)where ¥ is the unit circle oriented counter clockwise. Now the integrand has poles of order1 at those points where z (4z+z” + 1) = 0. These points are0,-2+ V3,-2- V3.Only the first two are inside the unit circle. It is also clear the function has simple poles atthese points. Therefore,+1res(f, 0) = limz (as) =1res (/,-2+ v3) =lim (2- (-2+v3)) rn = ~EV3pod V3 z(4z+2 +1)It follows= cos@ _ =| z+0 24+c0s0°” Jy z(4z 241)1 2= —2ni(1—=Vv3: xi( v3)2Other 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%° Inx—_d.[ ow