# 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.

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}

• Hello, for your first part you can do this because $\cos x$ is even, so you basically replaced $\cos(x)$ with $\cos(x-2\pi)$, however after i followed your step to do substitution i can only get to $\int_{-2\pi}^{0}\frac{1}{a+b\cos(u)}du$. – nan Apr 26 '17 at 2:44
• For the first step I used $\int_{0}^{\pi}+\int_{\pi}^{2\pi}$ and the fact cosine is $2\pi$ periodic to write $\cos x=\cos (x-2\pi)$. You should do substitution on only the second part this gives $\int_{-\pi}^{0} \frac{1}{a+b\cos u} du$. Let me know if you still have questions @ilovewt – Ahmed S. Attaalla Apr 26 '17 at 2:54
• Oh i got it, the key thing in the substitution is that $du = dx$ and hence our result will not change. Thank you as i cannot visualize this by diagrams since $2\pi$ to $0$ is not symmetric about origin. – nan Apr 26 '17 at 3:26
• You're welcome, in general if $f$ is even and $2\pi$ periodic the same argument shows $\int_{0}^{2\pi} f=\int_{0}^{\pi} f+\int_{\pi}^{2\pi} f(x-2\pi)=\int_{0}^{\pi} f+\int_{-\pi}^{0} f=\int_{-\pi}^{\pi} f=2\int_{0}^{\pi} f$ – Ahmed S. Attaalla Apr 26 '17 at 3:39
• No it doesn't because $\sin$ isn't event but you can say $\int_{0}^{2\pi}=\int_{-\pi}^{\pi}$ in that case. I hope that's what you mean. – Ahmed S. Attaalla Apr 26 '17 at 5:34

For an even function $f(x)$, the statement $$\int_{0}^{2\pi}f(x)dx = 2\int_{0}^{\pi}f(x)dx$$ is not generally true. Counterexample:

$$\int_{0}^{2\pi}x^2dx = \frac{8\pi^3}{3} \ne2\int_{0}^{\pi}x^2dx = \frac{2\pi^3}{3}.$$

However, if an even function is $2\pi$ periodic, $f(x)=f(x+2\pi)$, then

$$\int_{0}^{2\pi}f(x)dx = \int_{-\pi}^{\pi}f(x)dx = 2\int_{0}^{\pi}f(x)dx.$$

A verbal argument for the first equality in the prior line is that we're still integrating over one period of the function, so the integral is invariant. You can achieve the transformation via substitutions like in Ahmed's answer.