Show that the image of a periodic $C^1$ function is compact I am given a question as follows.
Let $f : \mathbb{R} \rightarrow \mathbb{R}^n$ be a periodic $C^1$ function. Show that the image of $f$ is compact or give counter example.
My textbook defines a comapact set is a set that is closed and bounded. And if $f$ is periodic function, then there is $r \in \mathbb{R}$ such that $f(t) = f(t + r).$ I believe that this is true statement. The reason is that if $f$ is periodic and differentiable function, there are maximum and minimum at certain point where the derivative is equal to $0$. So this will handle the boundedness. I learned that a set is closed if it contains limit points, or the complement is open. My book gives one theorem as follows.
Given $S \subset \mathbb{R}^n$, $a \in S$, and $f : S \rightarrow \mathbb{R}^m$, the following are equivalent.


*

*$f$ is continuous at $a$.

*For any $\{x_k\}$ in $S$ that converges to $a$, the sequence $\{f(x_k)\}$ converges to $f(a)$.


I think this will handle the closedness. However, I have no idea how I am going to give formal proof for this question. Can anyone help me with this?? If this statement is false, what would be a counter example??
 A: The statement is true. 
Note that we can consider the restriction $f:[0,r] \to \mathbb R^n$, since $f$ is periodic. 
First we show boundedness. Assume the contrary that the image is unbounded. Then there is $r_1, r_2, \cdots \in [0,r]$ so that $|f(r_i)| \ge i$ for all $i \in \mathbb N$. 
Since $\{r_i\}$ is a bounded sequence in $[0,r]$, a subsequence of $r_i$ converges to some $s\in [0,r]$. (That's Bolzano Weiestruass theorem)
So there is $\{s_i\} \in [0,r]$ so that $s_i \to s$ and $|f(s_i)| \to \infty$. But as $f$ is continuous, 
$$\lim_{i\ to \infty} f(s_i) = f(\lim_{i \to \infty} s_i) =f(s)$$
Thus $|f(s_i)|$ is bounded and that's a contradiction. Thus the image is bounded. 
To show that the image is also closed, let $y_1, y_2 , \cdots$ be elements in the image and $y_i \to y$. Then there is $r_1, r_2, \cdot \in [0,r]$ so that $f(r_i) = y_i$. As in the previous case, one can find a subsequence so that $s_i \to s$. Then by continuity of $f$ again, 
$$y =\lim_{i \to \infty} y_i = \lim_{i\to \infty} f(s_i) = f(s).$$
Thus $y$ is also in the image of $f$. Thus the image is closed. 
