TITLE: Let $f: [0, 1] \to \mathbb{R}$ s.t $f(0)=f(1)=0$ then measure of $A = \{h \in [0, 1] \mid \exists x \text{ such that }f(x+h) =f(x)\} \geq 1/2$.
QUESTION [5 upvotes]: Let $f:[0,1]\to\mathbb R$ be a continuous function s.t. $f(0)=f(1)=0$. Let $$A = \{h \in [0, 1] \mid \exists x \text{ such that }f(x+h) =f(x)\}.$$ Show that set $A$ has Lebesgue measure $\geq 1/2$.

I have no clue to prove the claim. Can anyone give me some detail hints? Thank you in advance.

REPLY [2 votes]: First let's show that $A$ is Borel. Given $\epsilon>0$, let $A_\epsilon=\left\{h\in[0,1]:\exists x\in[0,1-h]\text{ such that }|f(x)-f(x+h)|<\epsilon\right\}$. Since $f$ is continuous, we can consider only rational numbers in the definition of $A_\epsilon$, that is, if $\left\{q_n:n=1,2,\ldots\right\}$ denote the rationals in $[0,1]$, we have
\begin{align*}
A_\epsilon&=\left\{h\in[0,1]:\exists n\text{ s.t. }q_n+h\leq 1\text{ and }|f(q_n)-f(q_n+h)|<\epsilon\right\}\\
&=\bigcup_{n=1}^\infty\left\{h\in[0,1-q_n]:|f(q_n)-f(q_n+h)|<\epsilon\right\}
\end{align*}
Each set in the union in the RHS is Borel (because $h\mapsto f(q_n+h)$ is continuous), so each $A_\epsilon$ is Borel, and thus $A=\bigcap_{k=1}^\infty A_{1/k}$ is Borel.
Now extend $f$ to $[0,2]$ by setting $f(x)=f(x-1)$ for each $x\in[0,2]$. Let $M\in[0,1]$ be a point of maximum for $f$ and $m\in[0,1]$ be a point of minimum for $f$ (so they are also points of maximum and minimum for the extension of $f$).
Given $h\in[0,1]$, we have $f(M+h)\leq f(M)$ and $f(m+h)\geq f(m)$, so by Intermediate Value Theorem there exists a point $x\in[0,1]$ between $M$ and $m$ such that $f(x+h)=f(x)$. We have two cases:

If $x+h\in[0,1]$, then $h\in A$.
If $x+h\not\in[0,1]$, i.e., $x+h\in[1,2]$. Denote $y=x+h-1$, so that $y\in[0,1]$, $y+(1-h)=x\in[0,1]$, and $f(y+(1-h))=f(x)=f(x+h)=f(x+h-1)=f(y)$, therefore $1-h\in A$.

Anyway, for each $h\in[0,1]$ we have either $h\in A$ or $1-h\in A$. Denoting by $\chi_B$ the characteristic function of a set $B$, this implies that $\chi_{[0,1]}(h)\leq \chi_A(h)+\chi_{A}(1-h)$. Integrating this over $[0,1]$ yields $1<2\lambda(A)$ (to integrate the last term use invariance of $\lambda$ under the map $h\mapsto(1-h)$), which is what we wanted.

If $f$ is positive, then we indeed have $A=[0,1]$. Indeed, in this case, for each $h\in[0,1]$ we have $f(0)\leq f(h)$ and $f(1-h)\geq f(1)$, so again there is some point $x$ between $0$ and $1-h$ for which $f(x)=f(x+h)$, so $h\in A$.
An example to see that the inequality $\lambda(A)\geq 1/2$ is optimal in the general case is $f(x)=\sin(2\pi x)$, in which case $A=[0,1/2]$.