# $f:[0,1] \to \Bbb R$ is continuous function s.t. $f(0)=f(1)$. Prove that $\forall n\geq 1$ $\exists x \in [ 0 ,1]$ s.t. $f(x)=f(x+\frac{1}{n})$

Problem: Let $$f: [ 0,1 ] \to \Bbb R$$ be continuous function s.t. $$f(0) = f(1)$$. Prove that for all natural $$n \geq 1$$ there exists $$x \in [ 0 ,1]$$ s.t. $$f(x) = f(x + \frac{1}{n} )$$

Attempt: For $$n = 1$$ we'll choose $$x =0$$ and then we'll have $$f(0) = f(1)$$. Let $$n\geq 2$$. If $$f$$ is constant then we're finished. Assume $$f$$ is not constant. Define $$g(x) = f(x) - f(x+\frac{1}{n})$$, $$\forall x \in [0,1-\frac{1}{n}]$$, note this function is continuous by the continuity of $$f$$ on the given interval. [ I don't know how to proceed from here ]

Do you have any ideas as to how to proceed? I don't have any intuition as to what I should do next.
Thanks for the help in advance!

• If $g$ does not have a zero, then either $g>0$ everywhere or $g<0$ everywhere, by continuity. Do you see how this helps you? Jun 26, 2021 at 8:27
• Think of the difference between these two numbers. Can it be always positive? How would it go with $f(0) = f(1)$? Jun 26, 2021 at 8:27
• Maybe if g does not have a zero then it could be either monotonically increasing or decreasing which would be a contradiction. Maybe I could also use intermediate value theorem here somehow. Jun 26, 2021 at 8:34
• hazelnut_116 if $g$ does not have a zero then as PhoemueX says, it is $>0$ or $<0$ on $[0,1-\frac{1}{n}]$ (it cannot be both, since then by the intermediate value theorem it would have a zero!). Now if it is $>0$ on $[0,1-\frac{1}{n}]$, how does that contradict $f(0) = f(1)$? Jun 26, 2021 at 8:37

## 1 Answer

Let us define $$0 = x_0 and $$x_i= \frac{i}{n}$$ for $$i = 0,...,n$$. We define also the function $$g(x) = f(x+\frac{1}{n})-f(x).$$

If there exists $$x_i$$ (for $$0 \le i \le n-1$$) such that $$g(x_i) = 0$$ then the problem is solved.

If not, calculate the sum of $$g(x_i)$$, we have $$\sum_{i=0}^{n-1}g(x_i) =\sum_{i=0}^{n-1}\left(f(x_{i+1}) -f(x_{i}) \right) = f(1) -f(0) = 0 \tag{1}$$

As $$g(x_i) \ne 0$$ then $$g(x_i)<0$$ or $$g(x_i)>0$$. From $$(1)$$ we deduce that there must exist 2 values $$x_i such that $$g(x_i)g(x_j)<0$$ (if not, the LHS of $$(1)$$ is strictly positive or negative).

As $$g(x)$$ is a continuous function, by the intermediate value theorem, there exists $$x'$$ satisfying $$x_i and $$g(x') = 0$$. Then $$f(x') = f(x'+\frac{1}{n})$$.

Q.E.D