There were two previous threads (first and second) that I found which asked the same question but offered different methods of proof. I want to know if at least the logic behind my proof is valid.
My reasoning behind the proof is that if I can show that a periodic continuous function is bounded and uniformly continuous on the compact interval $\displaystyle I=[ 0,k]$, where k is the period, then it is bounded and continuous on $\displaystyle \mathbb{R}$. Because essentially the interval $\displaystyle [ 0,k]$ would contain all the points of f, so these points would just repeat over all of $\displaystyle \mathbb{R}$. Does this work? For thoroughness I've included the proof here, and I apologize for the specific theorem references, but they are very well-known theorems and it would be my application of them that would be at fault since their validity I assume won't be disputed.
Problem: Assume that $\displaystyle f:\mathbb{R}\rightarrow \mathbb{R}$ is periodic and continuous. Prove that $\displaystyle f$ is bounded and uniformly continuous on $\displaystyle \mathbb{R}$.
Solution:
Let $\displaystyle f:\mathbb{R}\rightarrow \mathbb{R}$ be a periodic continuous function. Then there exists some real number $\displaystyle k >0$ such that for all $\displaystyle x\in \mathbb{R}$, $\displaystyle f( x+k) =f( x)$, where $\displaystyle k$ is the period of $\displaystyle f$. Now consider the compact interval $\displaystyle I=[ 0,k]$. Since $\displaystyle I$ is compact, $\displaystyle f( I)$ is also compact by Theorem 5.3.10. Hence $\displaystyle f$ is closed and bounded on $\displaystyle I$ (by Heine-Borel Theorem). Let $\displaystyle m_{1}$ be the minimum and $\displaystyle m_{2}$ be the maximum of $\displaystyle f$ on $\displaystyle I$. Thus $\displaystyle f([ 0,k]) =[ m_{1} ,m_{2}]$. Since $\displaystyle f$ is periodic with period $\displaystyle k$, it follows that $\displaystyle m_{1} \leq f( x) \leq m_{2}$ for all $\displaystyle x\in \mathbb{R}$. Hence $\displaystyle f$ is bounded on $\displaystyle \mathbb{R}$.
Now since $\displaystyle I$ is compact, then by Theorem 5.4.6, $\displaystyle f$ is uniformly continuous on $\displaystyle I$. That is, for every $\displaystyle \varepsilon >0$ there exists $\displaystyle \delta >0$ such that $\displaystyle | f( x) -f( y)| < \varepsilon $ whenever $\displaystyle | x-y| < \delta $ and $\displaystyle x,y\in I$. Since $\displaystyle f$ has period $\displaystyle k$, then for any integer $\displaystyle n$, $\displaystyle f( x+nk) =f( x)$ and $\displaystyle f( y+nk) =f( y)$. Thus $\displaystyle | f( x+nk) -f( y+nk)| < \varepsilon $ whenever $\displaystyle | ( x+nk) -( y+nk)| < \delta $. Hence $\displaystyle f$ is uniformly continuous on $\displaystyle \mathbb{R}$. $\displaystyle \blacksquare $