# Compute complex integral

Integrate the function using the residue theorem $$\int_0^{2\pi}\frac{d\theta}{(2-\sin \theta)^2}$$ Using the formula $\sin \theta=1/2i(z-1/z)$ and $d\theta=dz/(iz)$

• Well, you told us what to use. What happens when you plug those things in to the integral you want? Plus, think of what contour is being used to assert $d\theta = dz/(iz)$. – GEdgar Aug 9 '13 at 16:41
• This is a real integral, which you want to compute using complex analytical methods. – Ron Gordon Aug 10 '13 at 0:41
• Try $z=e^{i\theta}$, so that, when $\theta$ goes from $0$ to $2\pi$, we have $z$ going once around the unit circle. So convert the problem into a contour integral. That is where you can apply the residue theorem. – GEdgar Aug 10 '13 at 13:38

Dr. Edgar has given you excellent hint in his 2nd comment. If you are still stuck, here is an evaluation of different integral, which has similar flavour. See if you can evaluate your original integral after looking at this one.

Let's evaluate

$$\int_{0}^{2\pi} \frac{d\theta}{5+\cos(\theta)} d\theta$$

We make the substitution: $z=e^{i\theta}$. As $\theta$ runs from $0$ to $2\pi$, observe that $z$ runs around the unit circle once (counterclockwise). Now, $dz=ie^{i\theta}d\theta$ which, after substituting $z=e^{i\theta}$, becomesrewrite as $dz=izd\theta$, that is, $d\theta= \dfrac{dz}{iz}$. Also, $$\cos(z)=\frac{e^{i\theta}+e^{-i\theta}}{2}=\frac{z+z^{-1}}{2}$$ Substituting all of this, we can rewrite the above integral as: $$\int_{0}^{2\pi} \frac{d\theta}{5+\cos(\theta)} d\theta=\oint_{|z|=1}\frac{\dfrac{dz}{iz}}{5+\left(\dfrac{z+z^{-1}}{2}\right)}$$ So we get $$\oint_{|z|=1}\frac{\dfrac{dz}{iz}}{5+\left(\dfrac{z+z^{-1}}{2}\right)}=\frac{2}{i}\oint_{|z|=1}\frac{dz}{z^2+10z+1}$$ To evaluate the last integral, we will use residue theory. The function $$f(z)=\frac{1}{z^2+10z+1}$$ has its poles at $z=\dfrac{-10\pm\sqrt{96}}{2}=-5\pm 2\sqrt{6}$. Only the pole $-5 +2\sqrt{6}$ lies inside the unit circle, so we find the residue here: $$\operatorname{Res}(f, -5+2\sqrt{6})=\lim_{z\to -5+2\sqrt{6}}\frac{1}{2z+10}=\frac{1}{4\sqrt{6}}$$ Here I used the fact that if $f(z)=\dfrac{h(z)}{g(z)}$ has a simple pole at $z_0$, then the residue of $f$ at $z_0$ is given by $\dfrac{h(z_0)}{g'(z_0)}$. There are other ways of finding residues, of course. Finally, using Residue Theorem, we obtain that

$$\int_{0}^{2\pi} \frac{d\theta}{5+\cos(\theta)} d\theta = \frac{2}{i}\oint_{|z|=1}\frac{dz}{z^2+10z+1}=\frac{2}{i}\cdot 2\pi i \cdot \operatorname{Res}(f, -5+2\sqrt{6}) = 4\pi \frac{1}{4\sqrt{6}}=\frac{\pi}{\sqrt{6}}$$

which can be verified here using Wolfram Alpha. Now I shall leave you the enjoyment of working out the integral in your post :)

Here is one without residue theorem. Note that $$\dfrac1{(2-\sin(t))^2} = \dfrac14 \dfrac1{\left(1-\dfrac{\sin(t)}2 \right)^2} = \dfrac14 \sum_{k=0}^{\infty}\dfrac{(k+1)}{2^k} \sin^k(t)$$ Now $$\int_0^{2 \pi} \sin^{2k}(t)dt = \dfrac{2\pi}{4^k} \dbinom{2k}k$$ Hence, the integral is $$I = \dfrac14 \sum_{k=0}^{\infty} \dfrac{2k+1}{4^k} \dfrac{2\pi}{4^k} \dbinom{2k}k = \dfrac{\pi}2 \sum_{k=0}^{\infty}\dfrac1{16^k}(2k+1)\dbinom{2k}k$$ We have $$\sum_{k=0}^{\infty}x^k (2k+1)\dbinom{2k}k = \dfrac1{(1-4x)^{3/2}}$$ Hence, $$I = \dfrac{\pi}2 \dfrac1{(1-1/4)^{3/2}} = \dfrac{4 \pi}{3\sqrt3}$$