let $f:[0,1] \rightarrow \mathbb R$ be continuous and non-negative.its given that $f(0)=f(1)=0$.
show that for each $0<r<1$ there is such $x,y \in [0,1]$ s.t. $|x-y|=r$ and $f(x)=f(y)$.
SOLUTION ATTEMPT: I'm trying to use the Intermediate value theorem in order to show what they want. which means, defining a new function $G(x)$ such that by inserting the values $G(1)$ and $G(0)$ I get two values that their product is less than zero, and that means there is such $0<c<1$ in which $G(c)=0$. and from here somehow get that $f(x)=f(y)$, but I'm stuck here and don't know what is $G(x)$. any kind of help would be appreciated.