4

I am trying to calculate $$I=\int_0^{\pi}\frac {\cos {n \theta}}{1-2r\cos \theta+r^2}\, \mathrm d \theta$$ where $r\in(0,1)$

I tried substituting $u = e^{2 i \theta}$ and using the Cauchy integral formula:

\begin{align}I&=\Re \int_{|u|=1}\frac {u^{n/2}}{(r-u^{1/2})(r-u^{-1/2})}\frac 1 {2iu} \,\mathrm d u \\&=\Re \frac {i} {2}\int_{|u|=1} \frac {u^{n/2 - 1}(r+u^{1/2})}{(u-r^2)(r-u^{-1/2})}\, \mathrm d u \\ &=\frac {2 \pi r^{n}}{1-r^2} \end{align}

but the correct answer is $\dfrac {\pi r^n}{1-r^2}$

Where did I make a mistake?

1 Answers1

6

In the integrand, you have $$ \begin{align} \frac {u^{n/2 - 1}\left(r+u^{1/2}\right)}{\left(u-r^2\right)\left(r-u^{-1/2}\right)} &=\frac{ru^{n/2-1}}{\left(u-r^2\right)\left(r-u^{-1/2}\right)} +\frac{u^{(n-1)/2}}{\left(u-r^2\right)\left(r-u^{-1/2}\right)} \end{align} $$ Unfortunately, $u^{-1/2}$ is not well defined on the unit circle. Similarly, if $n$ is odd, $u^{n/2-1}$ is not well defined on the unit circle, and if $n$ is even, $u^{(n-1)/2}$ has the same problem.


Here is how I would do it to avoid this problem: $$ \begin{align} \int_0^\pi\frac{\cos(n\theta)}{1-2r\cos(\theta)+r^2}\,\mathrm{d}\theta &=\frac12\int_{-\pi}^\pi\frac{\cos(n\theta)+i\sin(n\theta)}{1-2r\cos(\theta)+r^2}\,\mathrm{d}\theta\tag{1}\\ &=\frac12\oint_{\left|z\right|=r}\frac{z^n}{(z-r)\left(\frac1z-r\right)}\frac{\mathrm{d}z}{iz}\tag{2}\\ &=\frac1{2i}\oint_{\left|z\right|=1}\frac{z^n}{(z-r)(1-rz)}\,\mathrm{d}z\tag{3}\\ &=\frac1{2i}\frac{2\pi ir^n}{1-r^2}\tag{4}\\[3pt] &=\frac{\pi r^n}{1-r^2}\tag{5} \end{align} $$ Explanation:
$(1)$: $\cos(x)$ is even and $\sin(x)$ is odd
$(2)$: $z=e^{i\theta}$ and De Moivre's Formula
$(3)$: algebra
$(4)$: $z=r$ is the only singularity inside the unit circle
$(5)$: algebra

robjohn
  • 345,667
  • Well, the OP does not ask about how to do it, he specifically asks about finding the mistake that he has made in his calculation. A mistake frustratingly well hidden, I've been staring at the problem for half an hour, unable to spot it. – Alex M. May 08 '16 at 14:04
  • @AlexM. Glad it's not just me! – user85798 May 08 '16 at 14:24
  • 3
    @AlexM.: The problem is hidden because when one plugs in $u=r^2$ into the formula for the residue of $$\frac i2\frac {u^{n/2-1}\left(r+u^{1/2}\right)}{\left(u-r^2\right)\left(r-u^{-1/2}\right)}$$ we get $$\frac i2\frac{r^{n-2}(r+r)}{r-\frac1r}=\frac{ir^n}{r^2-1}$$ This hides the fact that the integrand, as given, is not well-defined on the unit circle. – robjohn May 08 '16 at 16:27