logo

Definite Integration through Trigonometric Substitution on the Complex Plane 📂Complex Anaylsis

Definite Integration through Trigonometric Substitution on the Complex Plane

Theorem

$$ \int_{0}^{2 \pi} f( \cos \theta , \sin \theta ) d \theta = \int_{\mathscr{C}} f(z) dz = 2 \pi i \sum \text{Res} f(z) $$

Description

Integrating real functions that are difficult to integrate can often be more straightforward through complex analysis. Among these, let’s look into integration techniques for integrands made up of trigonometric functions. The basic strategy involves changing the integration range to $z(\theta) = e^{ i \theta} , 0 < \theta < 2 \pi$ and taking the necessary parts from there. If needed, a slight manipulation to turn it into the form of $-\pi < \theta < \pi$ is also perfectly fine.

Viewing $f$ as a function of $\cos \theta$ and $\sin \theta$ allows for the substitution of the trigonometric functions with $\displaystyle \sin z = {{1} \over {2i}} \left( z - {{1} \over {z}} \right) $ and $\displaystyle \cos z = {{1} \over {2}} \left( z + {{1} \over {z}} \right) $, respectively. This is essentially using Euler’s formula $z = e ^ { i \theta } = \cos \theta + i \sin \theta$ in reverse to transform the integrand from a trigonometric function to a polynomial one. Once the integrand takes the form of a rational function, it becomes easy to find residues, so we can find the value using the residue theorem and then take the real or imaginary part as needed.

Example 1

As an example, let’s consider when $I := \displaystyle \int_{0}^{\pi} {{\cos 2 \theta} \over {1 - 2 a \cos \theta + a^2 }} d \theta , |a| <1$, and find the value of $I$.

Solution

Since $\displaystyle {{\cos 2 \theta} \over {1 - 2 a \cos \theta + a^2 }}$ is an even function, $$ \int_{0}^{\pi} {{\cos 2 \theta} \over {1 - 2 a \cos \theta + a^2 }} d \theta = {{1} \over {2}} \displaystyle \int_{-\pi}^{\pi} {{\cos 2 \theta} \over {1 - 2 a \cos \theta + a^2 }} d \theta $$ substituting gives us $\displaystyle dz = i e ^{i \theta} d \theta \iff d \theta = {{1} \over {i z}} dz $, so $$ \begin{align*} I =& {{1} \over {2}} \displaystyle \int_{ \mathscr{C} } {{ \cos 2 \theta } \over {1 - 2 a {{1} \over {2}} \left( z + {{1} \over {z}} \right) + a^2 }} {{1} \over {i z}} dz \\ =& {{1} \over {2i}} \int_{ \mathscr{C} } {{ \cos 2 \theta } \over {z - a \left( z^2 + 1 \right) + a^2 z }} dz \end{align*} $$ therefore, $I$ becomes the real part of the complex integral $\displaystyle {{1} \over {2}} \int_{ \mathscr{C} } {{ -i z^2 } \over {z - a \left( z^2 + 1 \right) + a^2 z }} dz $. Factoring the denominator simplifies calculations, $$ I = \operatorname{Re} {{1} \over {2a}} \int_{ \mathscr{C} } {{ i z^2 } \over { ( z - {{1} \over {a}} ) (z - a) }} dz $$ by the Residue theorem, $$ {{1} \over {2a}} \int_{ \mathscr{C} } {{ i z^2 } \over { ( z - {{1} \over {a}} ) (z - a) }} dz = {{2 \pi i} \over {2a}} \sum \text{Res} {{ i z^2 } \over { ( z - {{1} \over {a}} ) (z - a) }} $$ $|a| < 1$, thus $a$ is a singularity inside the unit circle $\mathscr{C}$, while $\displaystyle {{1} \over {a}}$ lies outside $\mathscr{C}$ and does not need to be considered. Calculating the residue at the simple pole $a$ gives us $$ \text{Res} {{ i z^2 } \over { ( z - {{1} \over {a}} ) (z - a) }} = {{ i a^2 } \over { a - {{1} \over {a}} }} = {{ i a^3 } \over { a^2 - 1 }} $$ therefore $$ {{1} \over {2a}} \int_{ \mathscr{C} } {{ i z^2 } \over { ( z - {{1} \over {a}} ) (z - a) }} dz = {{ \pi i} \over {a}} {{ i a^3 } \over { a^2 - 1 } } = {{ \pi a^2 } \over { 1 - a^2 } } $$ Since $I$ was the real part of $\displaystyle {{ \pi a^2 } \over { 1 - a^2 } }$, we get $\displaystyle I = {{ \pi a^2 } \over { 1 - a^2 } }$.

Commentary

This solution might seem overly complex and difficult at first glance. However, attempting the calculations without using complex analysis will reveal how much easier and more convenient this method actually is.

Furthermore, upon examining the unique shape of the example’s denominator, if we consider two vectors $\mathbf{p}$ and $\mathbf{q}$, then $|\mathbf{p}-\mathbf{q}|$ would be the length of the difference between the two vectors.

$$ \begin{align*} | \mathbf{p} - \mathbf{q} | ^2 =& (\mathbf{p} - \mathbf{q}) \cdot (\mathbf{p} - \mathbf{q}) \\ =& |\mathbf{p}|^2 - 2 |\mathbf{p}| |\mathbf{q}| \cos \theta + |\mathbf{q}|^2 \\ =& |\mathbf{p}|^2 \left( 1 - 2 {{|\mathbf{q}|} \over {|\mathbf{p}| }} \cos \theta + {{|\mathbf{q}|^2} \over {|\mathbf{p}|^2 }} \right) \end{align*} $$ Setting it as $\displaystyle a := {{|\mathbf{q}|} \over {|\mathbf{p}| }}$ gives us the shape we observed. Such a shape is frequently seen in physics, and questioning whether ‘integrals of this form are possible’ is undoubtedly important.


  1. Osborne (1999). Complex variables and their applications: p162. ↩︎