\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

QUESTION

Using complex contour integration evaluate
\begin{description}

\item[(a)]
$$\int_0^{2\pi}\frac{d\theta}{1+8\sin^2\theta}$$

\item[(b)]
$$\int_0^{2\pi}\frac{d\theta}{3+4i\cos\theta}$$

\end{description}

\bigskip

ANSWER
\begin{description}

\item[(a)]
\begin{eqnarray*}
I&=&\int_0^{2\pi}\frac{d \theta}{1+8 \sin ^2 \theta}\\
&=&\int_{|z|=1}\frac{1}{1+8\left(\frac{1}{2i}\left(z-z^{-1}\right)\right)^2}\frac{dz}{iz}\\
&=&\int_{|z|=1}\frac{dz}{iz\left(1-2z^2-2z^{-2}+4\right)}\\
&=&\frac{i}{2}\int\frac{zdz}{z^4+1-\frac{5}{2}z^2}
\end{eqnarray*}
Now consider where the poles of this are.\\
$\left(z_0-\frac{5}{4}\right)^2=-1+\frac{25}{16}=\frac{9}{16},
z_0^2=\frac{5}{4}\pm \frac{3}{4},\ z_0^2=2,\ \frac{1}{2},\ z_0=\pm
\sqrt{2},\ \pm \frac{1}{\sqrt{2}}$ There are 4 simple poles, 2
inside the contour.\\
Res$\left(\frac{z}{z^4+1-\frac{5}{2}z^2},z_0\right)=\frac{z_0}{4z_0^3-5z_0}=\frac{1}{4z_0^2-5}$\\
Res$\left(\pm\frac{1}{\sqrt{2}}\right)=-\frac{1}{3}\Rightarrow I=2
\pi i \cdot
\frac{i}{2}\cdot2\cdot\left(-\frac{1}{3}\right)=\frac{2 \pi}{3}$

\item[(b)]
\begin{eqnarray*}
I&=&\int_0^{2\pi}\frac{d \theta}{3+4i \cos \theta}\\
&=&\int_{|z|=1}\frac{dz}{iz\left(3+2i\left(z^{-1}+z\right)\right)}\\
&=&-\frac{i}{2}\int\frac{dz}{z^2+1-\frac{3}{2}iz}
\end{eqnarray*}
Now consider where the poles of this are.

$\left(z-\frac{3}{4}i\right)^2=-1-\frac{9}{16}=-\frac{25}{16},\
z_0=\left(\frac{3}{4}\pm\frac{5}{4}\right)i,\ z_0=2i,-\frac{i}{2}$
There are 2 simple poles, 1 of which is inside the contour.

$\textrm{Res }
\left(\frac{1}{z^2+1-\frac{3}{2}iz},z_0\right)=\frac{1}{2z_0-\frac{3}{2}i}$,\
$\textrm{Res}\left(-\frac{i}{2}\right)=\frac{2i}{5}$
 $$I=2 \pi i
\left(-\frac{1}{2}\right)\frac{2i}{5}=\frac{2\pi}{5}$$

\end{description}


\end{document}
