Integrating $\int_0^{2\pi}\frac{1}{1+8\cos^2\theta}d\theta$ Can someone please help me integrate $$\int_0^{2\pi}\frac{1}{1+8\cos^2\theta}d\theta$$ the question says, as a hint, use $\cos\theta = \frac{z + z^{-1}}{2}$ with $|z|=1$. I'm not really sure where to start. 

Let $p(x) = (x-x_1) (x-x_2) \cdots (x-x_n).$ An application of the product rule shows this useful identity (for all $x$ not a root of $p$): $$\frac{p'(x) }{p(x) }= \sum_{k=1}^n \frac{1}{x-x_k}.$$
Now since $\displaystyle \cos t = \frac{e^{it} + e^{-it}}{2} $ we have $$ 1+ 8\cos^2 \left( \frac{k\pi}{n} \right) = 5 + 2a_k + 2a^{-1}_k $$ where $a_k= \exp(2k\pi i/n),$ which are precisely the roots of $x^n-1.$ Thus, we have (after some partial fractions) that
$$\sum_{k=0}^{n-1} \frac{1}{1+8\cos^2(k\pi/n)}  =  \frac{1}{6} \sum_{k=0}^{n-1} \frac{1}{\frac{-1}{2} - a_k} - \frac{2}{3} \sum_{k=0}^{n-1} \frac{1}{-2-a_k} .$$
Applying the identity we developed lets us evaluate these sums in closed form, and we have 
$$ \sum_{k=0}^{n-1} \frac{1}{1+8\cos^2(k\pi/n)} = \frac{2n}{3} \frac{2^{n-1} }{2^n + (-1)^{n+1} } + \frac{1}{6} \frac{n (-1/2)^{n-1} }{ (-1/2)^n -1} .$$
Hence $$ \int^1_0 \frac{d\theta}{1+8\cos^2(\pi \theta)} = \lim_{n\to\infty} \frac{1}{n} \sum_{k=0}^{n-1} \frac{1}{1+8\cos^2(k\pi/n)} = \frac{1}{3}$$
which immediately implies that your integral has value $2\pi/3.$
