Read this lesson as text

Evaluating ∫₀²π 1/(2+cos θ) dθ

Complex Analysis · Axiom Academy

A real trigonometric integral evaluated with the unit-circle substitution and the residue theorem. Evaluate the real definite integral by turning it into a contour integral around the unit circle and applying the residue theorem. Nice work — you converted a real trigonometric integral into a single contour integral and finished it with one residue. The substitution: sends and , turning the integral into a loop around |z| = 1 . Poles come in reciprocal pairs: since the product of the roots of z^2 + 4z + 1 is 1 , exactly one root sits inside the unit circle and the other outside — only the interior one contributes. Don't drop the leading factor: the -2i pulled out front must multiply the residue-theorem result — that is where the i 's cancel and the answer comes out real. The same recipe handles any with , giving the general value .

This is the written version of the interactive lesson above. See the full Complex Analysis course.