4

Calculate the integral for $\left|a\right|<1$

$$\int_{-\pi}^{\pi} \dfrac{\cos(n\theta)}{1-2a\cos(\theta)+a^2}d\theta$$

I'm supposed to evaluate this using method of residues, but the parameter a is confusing me. I'm not even sure what contour I should use. Any help would be very appreciated.

Jonas Meyer
  • 53,602
  • what is n in $cosn\theta$? – Yimin Apr 25 '15 at 21:25
  • @Yimin Natural number – Jimmy2Goons Apr 25 '15 at 21:26
  • http://math.stackexchange.com/questions/367798/evaluating-a-trigonometric-integral-using-residues?rq=1 may help? – Yimin Apr 25 '15 at 21:34
  • 2
    why is the parameter $a$ confusing you ? You will obtain an answer in terms of $a$.

    HINT Let $|z|=1$ ($z=e^{i\theta}$) and $\cos(\theta)=(1/2)(z+\overline{z})$, then since $dz=ie^{i \theta} d\theta$ implies $d\theta=-i/z$ obtain you integral $\int_{-\pi}^{\pi}d\theta$ in the form $\int_{|z|=1}dz$ and now use Residues

    – Alonso Delfín Apr 25 '15 at 21:35
  • I saw the symmetries and so offered a way forward without exploiting them. I was able to persevere after some effort. Brute force is ugly but effective. And please let me know how I can improve the answer. – Mark Viola Apr 25 '15 at 23:05
  • 1
    I added two notes. The first covers the case for $|a|>1$. The second exploits symmetry in a different way from others. In Note 2, symmetry is exploited after we transform the original integral to a contour integral in the complex plane. – Mark Viola Apr 26 '15 at 16:38
  • @Dr.MV Hey man, thanks for all the extra work. Very cool of you. – Jimmy2Goons Apr 26 '15 at 22:10
  • You are more than welcome! My pleasure. – Mark Viola Apr 26 '15 at 22:19

3 Answers3

2

use the unit circle as the contour, so that we have $z=e^{i\theta}$ with $d\theta = \frac{dz}{iz}$

since $\cos n\theta = \Re z^n$ we require $\Re I$ where:

$$ I = \int_{|z|=1} \frac{z^n}{1-a(z+\frac1{z})+a^2}\frac{dz}{iz} \\ $$ $$ = -\frac1{ia}\int_{|z|=1} \frac{z^n}{z^2-(a+\frac1{a})z+1}dz $$

$$ = -\frac1{ia}\int_{|z|=1} \frac{z^n}{(z-a)(z-\frac1{a})}dz $$ since $|a| \lt 1$ only the residue at this point is required which is easily seen to be $\frac{a^n}{a-\frac1{a}}$

hence $$ I = -\frac1{ia} 2\pi i \frac{a^n}{a-\frac1{a}} = 2\pi \frac{a^n}{1-a^2} $$ since $I$ is already real, this is the required value of the original integral

David Holden
  • 18,040
2

Look at the integral $$ I_n = \int_{-\pi}^{\pi} \frac{e^{in\theta}}{(1-ae^{i\theta})(1-ae^{-i\theta})} \, d\theta. $$ It is easy to see the denominator expands to $1-2a\cos{\theta}+a^2$.

Since the interval of integration is symmetric, we can add the integral with $\theta \mapsto -\theta$ to $I$, and we find the integrand is $$ \frac{2\cos{n\theta}}{1-2a\cos{\theta}+a^2}, $$ so $I_n$ is equal to your integral. Now set $e^{i\theta}=z$, so the interval of integration transforms to the circle $|z|=1$, and $dz/z = i d\theta$. Hence $$ I_n = \frac{1}{i}\int_{|z|=1} \frac{z^{n}}{(1-az)(z-a)} \, dz. $$ Now you do the residues bit: since $|a|<1$, the only pole inside the unit circle is at $z=a$, where the residue is just $$ \left. \frac{z^n}{1-az} \right\rvert_{z=a} = \frac{a^n}{1-a^2} $$ Now we do $I_n = 2\pi i \sum \text{Res}$, and so $$ I_n = \frac{2\pi i}{i} \frac{a^n}{1-a^2} = \frac{2\pi a^n}{1-a^2}. $$

Chappers
  • 67,606
  • Ah- that first step was nice and the piece I didn't think of. Thanks. – Jimmy2Goons Apr 25 '15 at 22:04
  • @Jimmy2Goons Always try to evaluate as few residues as possible, that's my motto. :) (Which is why I normally do this using a Fourier series trick...) – Chappers Apr 25 '15 at 22:05
  • I realized the symmetries, so decided to not exploit then and went brute force. I was able to persevere after a bit of work. Brute force is ugly, but effective. – Mark Viola Apr 25 '15 at 23:03
1

Let's let $z=e^{i\theta}$ so that $dz=i\,e^{i\theta}d\theta$. This complex plane contour $C$ is the unit circle. Thus,

$$\begin{align} \int_{-\pi}^{\pi}\frac{\cos (n\theta)}{1-2a\cos \theta+a^2}d\theta&=\frac12\,\oint_C \frac{z^n+z^{-n}}{1-a(z+z^{-1})+a^2}\frac{dz}{iz}\\\\ &=\frac{i}{2a}\,\oint_C \frac{z^n+z^{-n}}{(z-a)(z-1/a)}dz\\\\ &=\frac{i}{2a}\,\oint_C \frac{z^n}{(z-a)(z-1/a)}dz+\frac{i}{2a}\,\oint_C \frac{z^{-n}}{(z-a)(z-1/a)}dz \end{align}$$

Note that the first integral has a singularity at $z=a$ only (since $|a|<1$; we examine the case $|a|>1$ in Note 1), while integrand has singularities at both $z=0$ (a pole of order $n$) and $z=a$. To evaluate the first integral one needs to determine the residue at $a$. This is simply, $\frac{a^n}{a-1/a}=\frac{a^{n+1}}{a^2-1}$.

In Note 2, we will exploit symmetry to simplify the second integral. This development is different from those shown in other posts inasmuch as the symmetry is exploited after transforming the original integral to a contour integral in the complex plane.

Here, we proceed "brute force." We need to determine the residues at both $0$ and $a$. The residue at $a$ is straightforward and is $a^{-n}/(a-1/a)=a^{-n+1}/(a^2-1)$. For the residue at $0$, we use the formula for an $n$th order pole

$$\begin{align} \text{Res}_{z=0}&=\frac{1}{(n-1)!}\lim_{z\to 0} \frac{d^{n-1}}{dz^{n-1}}\left(\frac{1}{(z-a)(z-1/a)}\right)\\\\ &=\frac{1}{(n-1)!}\lim_{z\to 0} \sum_{k=0}^{n-1} \binom{n-1}{k} \frac{d^{k}}{dz^{k}}\left(\frac{1}{(z-a)}\right)\,\frac{d^{n-1-k}}{dz^{n-1-k}}\left(\frac{1}{(z-1/a)}\right)\\\\ &=a^{-n+1}\sum_{k=0}^{n-1} a^{2k}\\\\ &=\frac{a^{n+1}-a^{-n+1}}{a^2-1} \end{align}$$

Adding the two residues reveals that the second integral is $a^{n+1}/(a^2-1)$, which is identical to the value of the first integral.

Finally, adding the results and multiplying by $(2\pi i) (i/2a)$ yields

$$\int_{-\pi}^{\pi}\frac{\cos (n\theta)}{1-2a\cos \theta+a^2}d\theta=2\pi \frac{a^n}{1-a^2}$$

which agrees with previously obtained results.


Note 1: Integral for $|a|>1$

Note that the entire development for the case $|a|>1$ is trivial given the symmetry of the integrand in $a$ and $1/a$. Thus we can immediately write

$$\begin{align} \int_{-\pi}^{\pi}\frac{\cos (n\theta)}{1-2a\cos \theta+a^2}d\theta&= 2\pi \frac{a^{-n}}{1-a^{-2}}\\\\ &=2\pi \frac{a^{-n+2}}{a^2-1} \end{align}$$


Note 2: Exploiting Symmetry

As was shown in other posts, symmetry can be exploited up front in the original integral representation. Here, we show that this tactic can be delayed until after recasting the problem as a contour integral. To that end, we write

$$\begin{align} \int_{-\pi}^{\pi}\frac{\cos (n\theta)}{1-2a\cos \theta+a^2}d\theta&=\frac{i}{2a}\,\oint_C \frac{z^n+z^{-n}}{(z-a)(z-1/a)}dz\\\\ &=\frac{i}{2a}\,\left(\oint_C \frac{z^n}{(z-a)(z-1/a)}dz+\oint_C \frac{z^{-n}}{(z-a)(z-1/a)}dz\right) \end{align}$$

and focus on the second integral on the right-hand side of the last expression. Here, we make the substitution $z=w^{-1}$. Note that (1) $dz=-w^{-2}dw$, (2) the contour's orientation transforms from counter-clockwise to clockwise, (3) $z^{-n}=w^{n}$, and (4) $(z-a)(z-1/a)=w^{-2}(w-a)(w-1/a)$. Implementing the substitution shows that

$$\begin{align} \oint_C \frac{z^{-n}}{(z-a)(z-1/a)}dz=\oint_C \frac{z^{n}}{(z-a)(z-1/a)}dw \end{align}$$

where the contour $C$ is identical (i.e., counter-clockwise) as the minus sign in the differential has been absorbed. Thus, the integral is an even function of $n$ and we need only evaluate the integral with $z^n$ in the numerator.

Mark Viola
  • 179,405
  • This is awesome. Thanks for the interest. I would've given you a check but I already gave it to someone before you commented. Cool stuff. – Jimmy2Goons Apr 26 '15 at 22:11
  • Again you're quite welcome. There is a way to change a best vote, but only do that if you like. And you can check more than 1 I believe. – Mark Viola Apr 26 '15 at 22:21