12. Applications of Residues

Trigonometric Integrals

Trigonometric Integrals in Complex Analysis

students, in many real problems, integrals are not written as sums of powers or exponentials—they appear as products of trigonometric functions like $\sin x$, $\cos x$, or rational expressions involving them. These are called trigonometric integrals. In complex analysis, a powerful idea is to rewrite these real integrals using the complex exponential $e^{ix}$ and then evaluate them with residues. 📌

What you will learn

By the end of this lesson, you should be able to:

  • Explain what trigonometric integrals are and why they matter.
  • Convert trigonometric expressions into complex exponential form using Euler’s formula.
  • Use contour integrals and residues to evaluate certain trigonometric integrals.
  • Recognize when a trigonometric integral fits the methods of the residue theorem.
  • Connect this topic to the larger Applications of Residues unit.

What are trigonometric integrals?

A trigonometric integral is any integral whose integrand contains trigonometric functions, often combined in a way that makes direct real-variable methods awkward. Examples include

$$\int_0^{2\pi} \frac{d\theta}{a+b\cos\theta}$$

$$\int_0^{2\pi} \frac{\cos(n\theta)}{5-4\sin\theta}\,d\theta$$

$$\int_0^{\pi} \sin^3\theta\,d\theta$$

Some of these can be solved with substitution or symmetry, but many become much easier when converted into complex form. The key reason is that trigonometric functions can be expressed using exponentials:

$$e^{i\theta}=\cos\theta+i\sin\theta$$

From this, we get

$$\cos\theta=\frac{e^{i\theta}+e^{-i\theta}}{2}$$

and

$$\sin\theta=\frac{e^{i\theta}-e^{-i\theta}}{2i}$$

These identities let us transform a trigonometric integral into a contour integral around the unit circle. That is the bridge from real analysis to complex analysis. 🌉

The main idea: replace $\theta$ with a complex variable

The most common substitution is

$$z=e^{i\theta}$$

When $\theta$ goes from $0$ to $2\pi$, the point $z$ traces the unit circle $|z|=1$ once counterclockwise. Also,

$$d\theta=\frac{dz}{iz}$$

because differentiating $z=e^{i\theta}$ gives

$$dz=ie^{i\theta}d\theta=iz\,d\theta$$

This substitution turns trigonometric functions into rational functions of $z$. For example,

$$\cos\theta=\frac{1}{2}\left(z+\frac{1}{z}\right)$$

and

$$\sin\theta=\frac{1}{2i}\left(z-\frac{1}{z}\right)$$

So a real integral over $\theta$ may become a contour integral of the form

$$\oint_{|z|=1} f(z)\,dz$$

If $f(z)$ has isolated singularities inside the unit circle, the residue theorem can be used.

Example 1: a classic integral

Consider

$$I=\int_0^{2\pi}\frac{d\theta}{a+b\cos\theta}$$

where $a$ and $b$ are real constants and $|a|>|b|$ to avoid zeros on the interval. Using $z=e^{i\theta}$, we substitute

$$\cos\theta=\frac{1}{2}\left(z+\frac{1}{z}\right), \qquad d\theta=\frac{dz}{iz}$$

Then

$$I=\oint_{|z|=1} \frac{1}{a+b\cdot \frac{1}{2}\left(z+\frac{1}{z}\right)}\cdot \frac{dz}{iz}$$

Multiply numerator and denominator by $2z$ to simplify:

$$I=\oint_{|z|=1} \frac{2}{i\left(bz^2+2az+b\right)}\,dz$$

Now the problem is purely complex. The denominator is a quadratic polynomial. Its roots are

$$z=\frac{-a\pm\sqrt{a^2-b^2}}{b}$$

Under the condition $|a|>|b|$, exactly one of these roots lies inside the unit circle. The residue theorem gives

$$I=2\pi i\times \text{(sum of residues inside }|z|=1\text{)}$$

After computing the residue, the standard result is

$$\int_0^{2\pi}\frac{d\theta}{a+b\cos\theta}=\frac{2\pi}{\sqrt{a^2-b^2}}$$

for $a>|b|>0$. This is a famous example showing how residues simplify a trigonometric integral dramatically. ✅

Example 2: integrals with sine and cosine powers

Now consider an integral such as

$$\int_0^{2\pi} \cos^n\theta\,d\theta$$

A direct approach using trigonometric identities may become lengthy for large $n$. In complex form, we use

$$\cos\theta=\frac{1}{2}\left(z+\frac{1}{z}\right)$$

so

$$\cos^n\theta=\left(\frac{1}{2}\left(z+\frac{1}{z}\right)\right)^n$$

and

$$d\theta=\frac{dz}{iz}$$

The integral becomes a contour integral around $|z|=1$:

$$\int_0^{2\pi}\cos^n\theta\,d\theta=\oint_{|z|=1} \left(\frac{1}{2}\left(z+\frac{1}{z}\right)\right)^n\frac{dz}{iz}$$

To evaluate it, we expand the expression as a Laurent series and find the coefficient of $z^{-1}$. That coefficient is the residue at $z=0$. This method is efficient because for contour integrals over the unit circle,

$$\oint_{|z|=1} \sum_{k=-\infty}^{\infty} a_k z^k\,dz=2\pi i\,a_{-1}$$

So rather than integrating term by term on the real line, we can identify the residue directly.

For example, when $n$ is odd, symmetry already tells us the integral is $0$ over $[0,2\pi]$ in many cases. When $n$ is even, the value is nonzero and can be computed using residue or binomial expansion.

A general pattern for rational trigonometric integrals

Many trigonometric integrals have the form

$$\int_0^{2\pi} R(\sin\theta,\cos\theta)\,d\theta$$

where $R$ is a rational function. The standard strategy is:

  1. Substitute $z=e^{i\theta}$.
  2. Rewrite $\sin\theta$ and $\cos\theta$ in terms of $z$ and $z^{-1}$.
  3. Convert the integral to a contour integral on $|z|=1$.
  4. Simplify to a rational function of $z$.
  5. Find the poles inside the unit circle.
  6. Use residues to evaluate the integral.

This works especially well when the resulting function has only isolated poles. The residue theorem then converts a difficult real integral into a finite algebraic computation.

Why residues are useful here

Residues are useful because they capture the local behavior of a function near its singularities. Instead of computing the whole contour integral directly, we only need the residues of the poles inside the contour. For trigonometric integrals, this is powerful because the substitution $z=e^{i\theta}$ usually creates a rational function with a small number of poles.

This is part of the larger Applications of Residues topic. Other applications include improper real integrals and, in some courses, arguments about winding number and the argument principle. Trigonometric integrals are one of the clearest examples because they show how a periodic real integral becomes a contour integral on the unit circle. 🔁

Important terminology

Here are a few terms you should know:

  • Contour integral: an integral taken along a curve in the complex plane.
  • Unit circle: the set of points $|z|=1$.
  • Residue: the coefficient of $\frac{1}{z-z_0}$ in a Laurent expansion about a pole $z_0$.
  • Pole: an isolated singularity where a function blows up like a power of $\frac{1}{z-z_0}$.
  • Laurent series: a series that includes both positive and negative powers of $z$.
  • Counterclockwise orientation: the standard positive orientation for contour integration.

Knowing these terms makes the method much easier to follow.

A quick strategy checklist

When you see a trigonometric integral, ask yourself:

  • Is the interval $[0,2\pi]$ or another full period?
  • Can I rewrite the integrand using $z=e^{i\theta}$?
  • Will the result become a rational function of $z$?
  • Where are the poles, and which are inside $|z|=1$?
  • Can I find the needed residues quickly?

If the answer to these questions is yes, the residue theorem is likely the best tool.

Conclusion

Trigonometric integrals are an important application of residues because they show how complex methods can solve real integrals involving sine and cosine. By using $z=e^{i\theta}$, trigonometric functions become algebraic expressions in $z$ and $z^{-1}$. This changes the problem from integration over angles to finding residues inside the unit circle.

students, the big takeaway is that complex analysis is not just about abstract functions—it gives a practical way to compute integrals that appear hard in their original form. Trigonometric integrals are a classic example of how the residue theorem turns periodic real-variable problems into elegant complex-variable solutions. ✨

Study Notes

  • Trigonometric integrals involve expressions with $\sin\theta$ and $\cos\theta$.
  • The substitution $z=e^{i\theta}$ maps $\theta\in[0,2\pi]$ to the unit circle $|z|=1$.
  • Use $\cos\theta=\frac{1}{2}\left(z+\frac{1}{z}\right)$ and $\sin\theta=\frac{1}{2i}\left(z-\frac{1}{z}\right)$.
  • Also use $d\theta=\frac{dz}{iz}$ when converting to complex form.
  • Many trigonometric integrals become contour integrals of rational functions.
  • The residue theorem evaluates these integrals by summing residues inside the contour.
  • A common result is $\int_0^{2\pi}\frac{d\theta}{a+b\cos\theta}=\frac{2\pi}{\sqrt{a^2-b^2}}$ for $a>|b|>0$.
  • The method is especially effective for periodic integrals over a full cycle.
  • Trigonometric integrals are a major example of the broader Applications of Residues unit.
  • The main advantage is turning a hard real integral into a small algebraic calculation.

Practice Quiz

5 questions to test your understanding

Trigonometric Integrals — Complex Analysis | A-Warded