How do I show that all continuous periodic functions are bounded and uniform continuous? 
A function $f:\mathbb{R}\to \mathbb{R}$ is periodic if there exits $p>0$ such that $f(x+P)=f(x)$ for all $x\in \mathbb{R}$. Show that every continuous periodic function is bounded and uniformly continuous.

For boundedness, I first tried to show that since the a periodic function is continuous, it is continuous for the closed interval $[x_0,x_0+P]$. I know that there is a theorem saying that if it is continuous on a closed interval, then it is bounded. However, I'm not allowed to state that theorem directly. Should I just aim for a contradiction by supposing f is not bounded on the interval stated above?
 A: A periodic continuous function is simply a function defined on a circle,
$$f:S^1 \longrightarrow R.$$
Circle is a compact space. A continuous function on a compact space is both bounded and uniformly continuous.
A: Suppose that $f$ has period one. Since $f:[0,2]\to\Bbb R$ is continuous, it is bounded, so $f$ is bounded all over $\Bbb R$ (why?). Also, $f:[0,2]\to\Bbb R$ is uniformly continuous, being continuous on a compact set. Thus, given $\varepsilon >0$ there exists $\delta>0$ such that, whenever $|x-y|<\delta,x,y\in[0,2]$, then $|f(x)-f(y)|<\varepsilon$. Pick arbitrary $x,y$, and assume $x<y$ with $|x-y|<\delta$. We may take $\delta <1$. I claim there is an integer $n$ such that $x-n,y-n\in [0,2]$. Then $|x-y|=|x-n-(y-n)|$ and $f(x-n)=f(x)$, $f(y-n)=f(y)$. Can you continue now?
Drawing a picture would prove useful. Essentially, you're translating the problem to $[0,2]$ where we already solved the issue. 
A: Here's proof for boundedness part by contradiction :
Fix $a \in \Bbb R$. Consider the domain $I=[a,a+p]$. Assume $f$ is not bounded. Then there exists a sequence $x_n \in I$ such that $|f(x_n)| \gt n$.
Since $x_n$ is bounded and consists of real numbers, it has a convergent subsequence $x_{n_k}$. But $I$ is closed hence $x_{n_k}$ converges inside $I$. i.e. $\exists x \in I$ such that $x_{n_k} \to x$.
What we have got is a sequence $x_{n_k} \to x \in I$ and $|f(x_{n_k})| \to \infty \; (\because |f(x_{n_k})| \gt n_k)$. This is contradiction for $f$ being continuous on $I$ and hence at $x$.
A: It is easier to prove a more general statement.
Consider $X$ a locally compact metric space, $G$ a group of isometries such that there exists a compact subset $K\subset X$ with
$G\cdot K = X$.  Let $f$ be a continuous $G$-periodic function from $X$ to another metric space $Y$. Then $f$ is uniformly continuous.
Proof:
Consider $\tilde K\supset K$ a compact neighborhood (it exists since $X$ is locally compact). Then  $\Delta \colon = d(K, X\backslash \tilde K) >0$.  Take $\epsilon>0$ arbitrary. There exists $\delta= \delta({\epsilon})>0$ such that $\tilde x_1$, $\tilde x_2$ in $\tilde K$, $d(\tilde x_1,\tilde x_2)< \delta$ implies $d(f(\tilde x_1), f(\tilde x_2)) < \epsilon$. Let us show that  $\delta'= \min(\delta, \Delta)$ works for $f$ on the whole $X$. Indeed, consider now $x_1$, $x_2$ in $X$ such that $d(x_1, x_2) < \delta'$.  Let $g \in G$ such that $\tilde x_1 = g x_1 \in K$. Since $d(x_1, x_2) = d(gx_1, gx_2)$, we get $d(\tilde x_1, \tilde x_2) < \delta'\le \Delta$, so $\tilde x_2 \in \tilde K$. Now we also have $d(\tilde x_1, \tilde x_2) < \delta$, so $d(f(\tilde x_1), f(\tilde x_2)) < \epsilon$. But note that $f(x_i) = f(\tilde x_i)$. We are done.
Comment: the idea is: translate one of the points $x_i$ to the compact fundamental domain. Under the same translation, the other point will fall in the compact neighborhood of the fundamental domain. Now use the uniform compactness of $f$ on $\tilde K$. So for the original problem,  consider $K=[0,p]$, $\tilde K= [-\Delta, p+\Delta]$.
