Integral $\int_0^{2\pi}\frac{dx}{2+\cos{x}}$ How do I integrate this?
$$\int_0^{2\pi}\frac{dx}{2+\cos{x}}, x\in\mathbb{R}$$
I know the substitution method from real analysis, $t=\tan{\frac{x}{2}}$, but since this problem is in a set of problems about complex integration, I thought there must be another (easier?) way.
I tried computing the poles in the complex plane and got 
$$\text{Re}(z_0)=\pi+2\pi k, k\in\mathbb{Z}; \text{Im}(z_0)=-\log (2\pm\sqrt{3})$$
but what contour of integration should I choose?

Here is an elementary treatment: 
First note that $\displaystyle2+\cos x=\frac{3+\tan ^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}$. Also note that for $\displaystyle f(x)=\frac{3+\tan ^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}$, it holds that $\displaystyle f(x+\pi)=f(x)$ for $0<x<\pi$. Therefore
$$\begin{align}\int_0^{2\pi}\frac{1}{2+\cos x}dx&=\int_0^{2\pi}\frac{1+\tan^2 \frac{x}{2}}{3+\tan ^2 \frac{x}{2}}dx\\
&=2\int_0^{\pi}\frac{1+\tan^2 \frac{x}{2}}{3+\tan ^2 \frac{x}{2}}dx \\
&=2\pi-4\int_0^{\pi}\frac{1}{3+\tan ^2 \frac{x}{2}}dx \\
&=2\pi-8\int_0^{\infty}\frac{1}{(3+u^2)(1+u^2)}du\\
&=2\pi-4\int_0^{\infty}\frac{1}{1+u^2}du+4\int_0^{\infty}\frac{1}{3+u^2}du\\
&=\frac{2\pi}{\sqrt{3}}
\end{align}$$
