Let $\phi:\mathbb{R}\to\mathbb{R}$ be a continuous function with $\phi(x)=\phi(x+1)\;\forall x\in\mathbb{R}$. Prove that $\phi$ is uniformly continuous.
I'm struggling with finding $\delta >0$, such that $|f(x)-f(y)|<\epsilon\;\forall x,y$ with $|x-y|<\delta$, for a given $\epsilon$, which is basically the definition of uniform continuity.
Let $\varepsilon>0$. By Heine-Cantor, $\left.\phi\right\rvert_{[0,2]}$ is uniformly continuous, and therefore there is some $\delta_\varepsilon<\frac12$ such that, for all $x,y\in[0,2]$ such that $\lvert x-y\rvert<\delta_\varepsilon$, $\lvert \phi(x)-\phi(y)\rvert<\varepsilon$.
Now, consider $x,y\in\Bbb R$ such that $\lvert x-y\rvert<\delta_\varepsilon$. Since the two points are in the interval $\left(x-\frac12,x+\frac12\right)$, there is an integer $n_{x,y}$ such that $x-n_{x,y}, y-n_{x,y}\in [0,2]$. Namely, a choice such as $$n_{x,y}=\begin{cases} \lfloor x\rfloor&\text{if }x-\lfloor x\rfloor \ge\frac12\\ \lfloor x\rfloor-1&\text{if }x-\lfloor x\rfloor <\frac12\end{cases}$$ works.
Now, $x-n_{x,y}$ and $y-n_{x,y}$ are in $[0,2]$ and $\lvert (x-n_{x,y})-(y-n_{x,y})\rvert=\lvert x-y\rvert<\delta_\varepsilon$. Therefore $\lvert \phi(x-n_{x,y})-\phi(y-n_{x,y})\rvert<\varepsilon$. By hypothesis, $\phi(t+n_{x,y})=\phi(t)$ for all $t$, thus proving that $\lvert \phi(x)-\phi(y)\rvert<\varepsilon$.