Let $f: [0, 1]\rightarrow R$ be continuous and suppose that $f(0) = f(1)$. Prove that for each positive integer $n$ there is an $x$ in $[0, 1 - \frac{1}{n}]$ such that $f(x) = f(x + \frac{1}{n}$).
Without loss of generality, take $f(0)=f(1)=0$. I have been able to show that if $f(x)\ge 0$ or $f(x)\le 0$ the statement is true. It actually isn't that difficult to show. The trick is to define $g_n(x) = f(x+\frac{1}{n})-f(x)$, on $[0,1-\frac{1}{n}]$ then notice that $g(0)=f(\frac{1}{n})$ and $g(1-\frac{1}{n}) = -f(1-\frac{1}{n})$. We want to exclude the cases where $f(\frac{1}{n})=0$ and $f(1-\frac{1}{n})=0$ since that will immediately prove our statement. Using our condition $f(x)\ge 0$ and $f(x)\le 0$ and applying intermediate value theorem, we deduce that there's some $c$ such that $g_n(c)=0$.
When we don't have the condition $f(x)\ge 0$ and $f(x)\le 0$, we could have continuous function such that $f(\frac{1}{n})\cdot f(1-\frac{1}{n}) = -|f(\frac{1}{n})\cdot f(1-\frac{1}{n})|$ (this is a long way of saying they have different sign). Notice that the method I described in the paragraph above can be extended to any interval $[a,b]$ if $b-a\ge \dfrac{1}{n}$. The main obstacle I face right now is that $f$ could have at least $n$ zeros such that the distance between any consecutive zeros the distance is at most $\frac{1}{n}$.
However, I have struggled with this problem for a while now and I have made little progress. I would appreciate some hints, but please don't post complete solutions.