If $f$ is continuous, then there exists $x+\frac{1}{n}\in[0,1]$ and $f\left(x+\frac{1}{n}\right)=f(x)$

Let $f:[0,1]\to \mathbb{R}$ is continuous, such that $f(0)=f(1)$. For each $n\in\mathbb{N}$, prove that $\exists x\in [0,1]$ such that $x+\dfrac{1}{n}\in[0,1]$ and $f\left(x+\dfrac{1}{n}\right)=f(x)$.

My approach: The interval $[0,1]$ is connected, then if $f$ is continuous, we have $f([0,1])\subset\mathbb{R}$ is a interval. And I suppose that, I can define a closed path such that $f(0)=f(1)$. Any hint pls,


Solution 1:

Hint: apply the Intermediate Value Theorem to $g(x) = f(x + 1/n) - f(x)$ on $[0, 1-1/n]$.