Let $f$ be a continuous function on $\mathbb{R}$ which is periodic with period $2\pi$. This means $f(t + 2\pi) = f(t)$ for all $t$. Show that there exists $x\in[0,\pi]$ such that $f(x) = f(x + \pi)$.
I know it's an intermediate-value theorem problem. I think I have to take the difference of both sides, but not quite sure. Can anyone help?