# Prove that, any continuous and periodic function on $\Bbb{R}$ is uniformly continuous on $\Bbb{R}$.

There is a hint in my book to solve the problem. It goes as follows-

Suppose, $f:\Bbb{R}\to\Bbb{R}$ is continuous and has the period $p\in\Bbb{R}$. Hence, $f(x+np)=f(x)\forall x\in\Bbb{R}, \: \forall n\in\Bbb{Z}$
Thus, $f$ is continuous on $[0,p]\implies f$ is uniformly continuous on $[0,p]$.
Choose $\varepsilon>0$, then $\exists \delta>0$ such that if $|x-y|<\delta,\:x,y\in[0,p]$ we have $|f(x)-f(y)|<\varepsilon$
Now, take any two $x,y\in\Bbb{R}$ with $|x-y|<\delta$. Now, we can find an integer $j$ such that $x+jp,\: > y+jp \in[0,p]$. Then $|x-y|<\delta\implies|(x+jp)-(y+jp)|<\delta$, hence from the uniform continuity of $f$ on $[0,p]$ we have $|f(x+jp)-f(y+jp)|<\varepsilon\implies|f(x)-f(y)|<\varepsilon$
Therefore, $\forall x,y\in\Bbb{R}$ with $|x-y|<\delta\implies|f(x)-f(y)|<\varepsilon$ and this is true for any arbitrarily chosen $\varepsilon>0$.

Now, my question is:: How for $x,y\in\Bbb{R}$ we can have SAME $j\in\Bbb{Z}$ for which both of $(x+jp),\:(y+jp)\in [0,p]$. Although I can establish that we can find $n, m\in\Bbb{Z}$ such that $(x+np),\:(y+mp)\in [0,p]$(beacuse $x,y\in\Bbb{R}\implies\exists n_1,m_1\in\Bbb{Z}$ such that $(n_1-1)p\le x\le {n_1}p,\:(m_1-1)p\le y\le {m_1}p\implies 0\le x-(n_1 -1)p\le p, \: 0\le y-(m_1 -1)p\le p$, now just fix $(n_1 -1)=n,\: (m_1 -1)=m$). BUT HOW THESE $n,m\in\Bbb{Z}$ CAN BE SAME?
Can anybody clear up my confusion?
• Yes, that is wrong. Prove instead the uniform continuity on $[0,2p]$. Now, in the definition of uniform continuity, the $\delta$ can always be chosen to be $<p$. This is because if a $\delta$ works for a given $\epsilon$, then any smaller positive $\delta$ also works. When $\delta <p$, then $|x-y|<\delta$ implies that there is single $j$ such that $x+jp,y+jp\in [0,2p]$. You can see why I took an interval the size of double the period. The thing is that even if $x$ and $y$ are very close, the $x$ can be very close to $p$ from below, and then the $y$ fall above $p$. – user561777 May 15 '18 at 19:16
• @fishroe, can please explain how does the single $j$ come? – Biswarup Saha May 15 '18 at 19:19
• @fishroe No matter how small $\delta$ we choose, take $x \in \left\langle 2p -\frac\delta2, 2p\right\rangle$ and $y \in \left\langle 2p, 2p +\frac\delta2\right\rangle$. We have $|x-y| < \delta$ but $x+jp, y+jp$ cannot both be in $[0,2p]$ for any $j \in \mathbb{Z}$. – mechanodroid May 15 '18 at 19:24
• @mechanodroid You are confused. If $x,y$ are as in your example, and $\delta <p$, then take $j'= j-1$ and $x$ is going to be in $[0,p]$ and $y$ in $[p,2p]$. – user561777 May 15 '18 at 19:26
• @fishroe, one thing I should mention- why you are considering $\delta < p$? here you are working with the interval $[0,2p]$ instead of $[0,p]$ so there may be a $\varepsilon >0$ for which $p<\delta <2p$ – Biswarup Saha May 15 '18 at 19:31