Real integrals of the form
∫02πF(cosθ,sinθ)dθ
can be evaluated using residues. Here F is a rational function of cosθ and sinθ with no poles on the unit circle after the substitution below.
Substitution
Let
z=eiθ=cosθ+isinθ,0≤θ≤2π
Then z moves once counterclockwise around the unit circle ∣z∣=1, and
cosθ=21(z+z1),sinθ=2i1(z−z1),dθ=izdz
Thus
∫02πF(cosθ,sinθ)dθ=∮∣z∣=1F(21(z+z1),2i1(z−z1))izdz
The right side equals 2πi times the sum of the residues of the integrand at its poles inside the unit circle.
Examples:
- ∫02π1+3cos2θdθ=π
- ∫02π5−4cosθcos2θdθ=6π
Worked Examples
Even Integrand
Show that ∫02π1+3cos2θdθ=π.
Substitute cos2θ=41(z+z1)2=4z2z4+2z2+1.
1+3cos2θ=4z23z4+10z2+3=4z2(3z2+1)(z2+3)
∫02π1+3cos2θdθ=∮∣z∣=1(3z2+1)(z2+3)4z2⋅izdz=∮∣z∣=1i(3z2+1)(z2+3)4zdz
The poles are z=±3i and z=±i3. Only ±3i lie inside the unit circle.
For z0=±3i, the factor 3z2+1 has derivative 6z, so
Res=i⋅6z0⋅(z02+3)4z0=6i⋅384=4i1
∫02π1+3cos2θdθ=2πi(4i1+4i1)=π
Higher Harmonic
Show that ∫02π5−4cosθcos2θdθ=6π.
Use cos2θ=Re(e2iθ)=21(z2+z−2)=2z2z4+1.
5−4cosθ=5−2(z+z1)=−z(2z−1)(z−2)
∫02π5−4cosθcos2θdθ=∮∣z∣=1g(z)dz,g(z)=−2iz2(2z−1)(z−2)z4+1
The poles inside the unit circle are z=0 (order 2) and z=21 (order 1). The pole z=2 lies outside.
Res(g,21)=−2i⋅41⋅2⋅(−23)161+1=24i17
For z=0, differentiate −2i(2z2−5z+2)z4+1 at 0.
Res(g,0)=−2i1⋅220⋅2−1⋅(−5)=−8i5
∫02π5−4cosθcos2θdθ=2πi(24i17−24i15)=6π
Linear Denominator
Evaluate ∫02π2+cosθdθ.
2+cosθ=2zz2+4z+1
∫02π2+cosθdθ=∮∣z∣=1i(z2+4z+1)2dz
The roots of z2+4z+1 are z1,2=−2±3. Only z1=−2+3≈−0.27 lies inside the unit circle.
Res=i(z1−z2)2=23i2=3i1
∫02π2+cosθdθ=2πi⋅3i1=32π