Let $f:[0,2]\to \mathbb{R}$ be a continuous function such that $f(0)=f(2)$. Use the intermediate value theorem to prove that there exist numbers $x,y\in [0,2]$ such that $f(x)=f(y)$ and $|x-y|=1$.

Hint: Introduce the auxiliary function $g:[0,1]\to \mathbb{R}$ defined by $g(x)=f(x+1)-f(x)$.

Hint: Introduce the auxiliary function $g:[0,1]\to \mathbb{R}$ defined by $g(x)=f(x+1)-f(x)$.