Recipe
Evaluate a trigonometric integral using the unit circle
Use when: you need \int_0^{2\pi}R(\cos\theta,\sin\theta)\,d\theta for R a rational function of sine and cosine, over one full period, with no singularity on the circle itself
Goal: the trigonometric integral's exact value, rewritten as a contour integral around |z|=1 and finished by residues
Taught in Trigonometric integrals via the unit circle
Quick recipe
-
1
Replace \cos\theta, \sin\theta, and d\theta using \cos\theta=\frac12(z+1/z), \sin\theta=\frac1{2i}(z-1/z), and d\theta=dz/(iz).
Example
For \displaystyle\int_0^{2\pi}\dfrac{\cos2\theta}{5-4\cos\theta}\,d\theta, first write \cos2\theta=\dfrac12(z^2+z^{-2}) alongside \cos\theta=\dfrac12(z+z^{-1}).
Why: this substitution is exactly the statement that z traces the unit circle once as \theta sweeps a full period.
-
2
Multiply the integrand by the power of z that clears every fraction. This leaves one rational function of z.
Example
The integral becomes \displaystyle\oint_{|z|=1}\dfrac{i(z^4+1)}{2z^2(2z^2-5z+2)}\,dz after multiplying out and simplifying.
Why: the residue theorem needs the integrand written as an ordinary function of z, with no 1/z terms left tangled in.
-
3
Factor the denominator and keep only the poles with modulus less than 1. A pole outside the circle contributes nothing.
Example
The denominator's zeros are z=0 (order 2), z=\tfrac12, and z=2. Only z=0 and z=\tfrac12 satisfy |z|<1.
Why: unlike the semicircle method, the contour never grows here. The circle's radius is fixed at 1 from the start.
-
4
Apply the residue shortcut formula at each enclosed pole. Use the order that pole actually has.
Example
At the order-2 pole z=0: \operatorname{Res}=\dfrac{5i}{8}. At the simple pole z=\tfrac12: \operatorname{Res}=-\dfrac{17i}{24}.
- the enclosed pole is simple — use the p(z_0)/q'(z_0) quotient shortcut.
- the enclosed pole has order m>1 — differentiate m-1 times, as the pole-order recipe describes.
Why: the substitution does not always leave only simple poles, so both cases come up in practice.
-
5
Add every enclosed residue and multiply by 2\pi i to get the value of the original integral over \theta.
Example
\dfrac{5i}{8}-\dfrac{17i}{24}=-\dfrac{i}{12}, so \displaystyle\int_0^{2\pi}\dfrac{\cos2\theta}{5-4\cos\theta}\,d\theta=2\pi i\left(-\dfrac{i}{12}\right)=\dfrac{\pi}{6}.
Why: this is the residue theorem applied to the unit circle, just as it was applied to the semicircle in the previous section.
Common mistakes
- Forgetting the extra factor of i that \sin\theta=\frac1{2i}(z-1/z) carries, unlike \cos\theta's substitution.
- Including a pole with |z|=1 exactly on the circle itself, where the method's own hypothesis has already failed.
- Treating every pole as simple by default and missing that a higher-order pole needs the derivative formula instead.
- Multiplying by 2\pi alone and dropping the factor of i.