<s>[INST] Integration of complex functions with trig functions: $\int_0^{2 \pi} \frac{ d\theta}{5-\cos( \theta )}$ $\int_0^{2 \pi} \frac{ d\theta}{5-\cos( \theta )}$ 
How should I integrate this? Using the exponantial identities of trig? Any hints will be great...
Thank you! 
 [/INST] Here's an answer using Fourier series.
First fact: if $\beta\in(-1,1)$,
$$\sum_{n=0}^{+\infty}\beta^n\cos(n\theta)=\Re\left(\frac1{1-\beta\mathrm{e}^{i\theta}}\right)=\frac{1-\beta\cos\theta}{1+\beta^2-2\beta\cos\theta}=\frac12\frac{2-2\beta\cos\theta}{1+\beta^2-2\beta\cos\theta}=\frac12\frac{\bigl(1+\beta^2-2\beta\cos\theta\bigr)+1-\beta^2}{1+\beta^2-2\beta\cos\theta}=\frac12+\frac12\frac{1-\beta^2}{1+\beta^2-2\beta\cos\theta}.$$
Now we find $\beta\in(-1,1)$ such that $1+\beta^2=10\beta$ so that the denominator is a multiple of $5-\cos\theta$:
$$\beta=5-2\sqrt6$$
fulfills this requirement. Observe that $1-\beta^2=2-10\beta$, we'll use it below.
With this value of $\beta$ we have:
$$\sum_{n=0}^{+\infty}\beta^n\cos(n\theta)=\frac12+\frac1{2\beta}\frac{1-5\beta}{5-\cos\theta}.$$
Now, integrating on a period, we clearly have:
$$1=\frac1{2\pi}\int_0^{2\pi}\left(\frac12+\frac1{2\beta}\frac{1-5\beta}{5-\cos\theta}\right)\,\mathrm{d}\theta,$$
i.e.,
$$1=\frac12+\frac{1-5\beta}{4\beta\pi}\int_0^{2\pi}\frac1{5-\cos\theta}\,\mathrm{d}\theta,$$
hence
$$\int_0^{2\pi}\frac1{5-\cos\theta}\,\mathrm{d}\theta=\frac{2\beta\pi}{1-5\beta}=\frac{\pi\sqrt6}6.$$

As a by-product, we also obtain a more general formula: for all $n\in\mathbb{N}^*$,
$$\beta^n=\frac1\pi\int_0^{2\pi}\left(\frac12+\frac1{2\beta}\frac{1-5\beta}{5-\cos\theta}\right)\cos(n\theta)\,\mathrm{d}\theta,$$
hence
$$\beta^n=\frac1{2\beta\pi}\int_0^{2\pi}\frac{1-5\beta}{5-\cos\theta}\cos(n\theta)\,\mathrm{d}\theta,$$
hence
$$\frac{2\beta^{n+1}\pi}{1-5\beta}=\int_0^{2\pi}\frac{\cos(n\theta)}{5-\cos\theta}\,\mathrm{d}\theta,$$
(and this equality also happens to be correct for $n=0$).
</s>