<s>[INST] For an even and $2\pi$ periodic function, why does $\int_{0}^{2\pi}f(x)dx = 2\int_{0}^{\pi}f(x)dx $ How does one derive the fact that $$\int_{0}^{2\pi}f(x)dx = 2\int_{0}^{\pi}f(x)dx $$ whenever $f(x)$ is an even and $2\pi$ periodic function. I do know the result that for even functions, we have $$\int_{-a}^{a}f(x)dx = 2\int_{0}^{a}f(x)dx$$
But for the case where the end points are not symmetrical wrt the origin i do not know how to do.
 [/INST] Hint:
We have,
$$\int_{0}^{2\pi}\frac{1}{a+b\cos x}dx$$
$$=\int_{0}^{\pi} \frac{1}{a+b \cos x} dx+\int_{\pi}^{2\pi} \frac{1}{a+b \cos (x-2\pi)} dx$$
Can you see why? What happens if you let $x-2\pi=u$ on the second part?

 \begin{align} \int_{0}^{2\pi} \frac{1}{a+b\cos x}dx \ =\int_{0}^{\pi} \frac{1}{a+b\cos x}dx+\int_{\pi}^{2\pi} \frac{1}{a+b\cos x}dx \ =\int_{0}^{\pi} \frac{1}{a+b\cos x}dx+\int_{\pi}^{2\pi} \frac{1}{a+b\cos (x-2\pi)}dx \ =\int_{0}^{\pi} \frac{1}{a+b\cos x}dx+\int_{-\pi}^{0} \frac{1}{a+b\cos x} dx \ =\int_{-\pi}^{\pi} \frac{1}{a+b\cos x}dx \ =2 \int_{0}^{\pi} \frac{1}{a+b\cos x}dx \end{align}

</s>