The question and its proof are given below:
$ \text{Page 86, Problem 12} $
$ \color{red}{\text{A function $ f $ is said to be periodic with period $ p $ if $ f(x + p) = f(x) $ for all real $ x $.}\\\text{Prove that if $ f(x) $ is continuous and periodic then it is uniformly continuous on the}\\\text{reals.}} $
$ \qquad \text{Proof: First, since it is continuous on the closed interval $ [0, p] $ it is uniformly}\\\text{continuous on $ [0, p] $:} $
$$ x \text{, } y \text{ in } [0,p] \text{, } \lvert x - y \rvert < \delta \Rightarrow \lvert f(x) - f(y) \rvert < \varepsilon $$
$ \qquad \text{Second, if $ x $ and $ y $ are numbers with $ \lvert x - y \rvert < \delta $ then there is an integer such}\\\text{that $ x + jp $ and $ y + jp $ are in $ [0, p] $, and} $
$$ \begin{align} &\lvert x - y \rvert < \delta \Rightarrow \lvert (x + jp) - (y + jp) \rvert < \delta \Rightarrow \\ &\lvert f(x)- f(y) \rvert = \\ &\lvert f(x + jp) - f(y + jp) \rvert < \varepsilon \end{align} $$
$ \text{That is,} $
$$ \lvert x - y \rvert < \delta \Rightarrow \lvert f(x) - f(y) \rvert < \varepsilon \text{.} $$
However I can not understand why we are sure that there exists an integer $j$ such that $x + jp$ is in the interval $[0,p]$. Could anyone explain this for me please?
Write $\frac{x}{p} = [\frac{x}{p}] + \{\frac{x}{p}\}$, where $[\cdot]$ denotes integer part and $\{\cdot\}$ denotes fractional part. Then $\{\frac{x}{p}\} \in [0,1)$, so $x = p \cdot \frac{x}{p} = p[\frac{x}{p}] + p\{\frac{x}{p}\}$. Then take $j=-[\frac{x}{p}]$ and note that $p\{\frac{x}{p}\} \in [0,p]$.