$f(x+1)=f(x)$ for all $x \implies f$ is uniformly continuous? Suppose $f$ is a continuous function on $\mathbb{R}$ such that $f(x+1)=f(x)$ for all $x$ then does it imply $f$ is uniformly continuous?
My idea is suppose I want to calculate $f(10)$ then what i basically do is that $f(10)=f(9)=f(8) = \cdots = f(1)= f(0)$. 
I am planning to restrict the domain to a compact set so that it because uniformly conintuous automatically. Is my idea correct?
A formal solution will help.
Thanks
 A: You want to prove $\forall \delta>0, \exists \varepsilon>0, \forall x, y \in \Bbb R, \left[\left|y-x\right| \le \varepsilon \Rightarrow \left|f(y)-f(x)\right|<\delta\right]$

Let $\delta>0$
By the Heine–Cantor theorem on $\left[-2,2\right]$, $\exists \varepsilon>0,\forall a,b \in \left[-2,2\right], \left[\left|b-a\right| \le \varepsilon \Rightarrow \left|f\left(b\right)-f\left(a\right)\right|<\delta\right]$
Let $ x,y\in \Bbb R$
$\exists (q_x,r_x) \in \Bbb Z\times [0.1), x = q_x+r_x$
$\exists (q_y,r_y) \in \Bbb Z\times [0.1), y = q_y+r_x+r_y$
With $a=r_x,b=r_x+r_y$, $\left[\left|\left(r_y+r_x\right)-r_x\right| \le \varepsilon \Rightarrow \left|f\left(r_y+r_x\right)-f\left(r_x\right)\right|<\delta\right]$
We have that $\left|r_y\right|= \left|\left(r_x+r_y\right)-r_x\right|=\left|\left(y-q_y\right)-\left(x-q_x\right)\right|\le\left|y-x\right|+\left|q_y-q_x\right| \le \left|y-x\right|$
So $\left|y-x\right| < \varepsilon \Rightarrow \left|r_y\right| < \varepsilon$
So $\left|y-x\right| < \varepsilon \Rightarrow\left|\left(r_y+r_x\right)-r_x\right| \le \varepsilon \Rightarrow \left|f\left(r_y+r_x\right)-f\left(r_x\right)\right|<\delta$
So $\left|y-x\right| < \varepsilon \Rightarrow \left|f\left(r_y+r_x\right)-f\left(r_x\right)\right|<\delta$
Since we also have $f\left(x\right)=f\left(q_x+r_x\right)=f\left(r_x\right)$
and $f\left(y\right)=f\left(q_y+r_y+r_x\right)=f\left(r_y+r_x\right)$
We can conclude that $\left|y-x\right| < \varepsilon \Rightarrow \left|f\left(y\right)-f\left(x\right)\right|<\delta$
