Continuous function and IVT. Let $f:[0,1]->\mathbb R$ be a continuous function which satisfies $f(0)=f(1)$. Prove that there exists a number $a \in [0,1/2]$ such that $f(a)=f(a+1/2)$.
I know that i'll use IVT theorem but i confused a bit.Can you help me ?

Consider the function $g: [0, \frac{1}{2}] \to \mathbb{R}$ given by
$$
g(x) = f(x) - f\left(x + \frac{1}{2}\right).
$$
Then $g$ is continuous, and $g(0) = -g\left(\frac{1}{2}\right)$. It follows from the intermediate value theorem that $g$ has a zero somewhere.
