Prove that $\{\cos(nx) : n=1, ... ,\infty \}$ is bounded but not totally bounded in $C([0,\pi])$ Prove that $\{f = \cos(nx) : n=1, ... ,\infty \}$ is a bounded subset (of functions), but not totally bounded, of $C([0, \pi])$ under the supremum norm (or uniform norm, see https://en.wikipedia.org/wiki/Uniform_norm). 
Note that a totally bounded set has a convergent subsequence in a complete metric space.
 A: Hint: For fixed $m,$
$$\lim_{n\to \infty}\int_0^\pi (\cos (mx)-\cos (nx))^2\,dx = \pi.$$
A: The set $S = \{x \mapsto \cos(nx) : n \in \mathbb{N}\}$ is clearly bounded since 
$$\|\cos(mx) - \cos(nx)\|_\infty \le \|\cos(mx)\|_\infty + \|\cos(nx)\|_\infty = 2$$
To show that $S$ is not totally bounded, notice that $S$ is an orthogonal set of functions in the inner product space $(C([0,\pi]), \|\cdot\|_2)$ w.r.t. to the the standard inner product $\langle f,g\rangle = \int_0^\pi f\overline{g}$.
In particular, $S$ is a discrete infinite set in $(C([0,\pi]), \|\cdot\|_2)$ and hence it cannot be totally bounded.
If $S$ were totally bounded in $(C([0,\pi]), \|\cdot\|_\infty)$ then for every $\varepsilon > 0$ there would exist $f_1, \ldots, f_n \in S$ and $r_1, \ldots, r_n > 0$ such that $$S \subseteq \bigcup_{i=1}^n B_\infty(f_i, r_i).$$
Since $\|\cdot\|_2 \le \pi\|\cdot\|_\infty$, we would have
$$S \subseteq \bigcup_{i=1}^n B_\infty(f_i, r_i) \subseteq \bigcup_{i=1}^n B_2(f_i, \pi r_i)$$
which would imply that $S$ is totally bounded in $(C([0,\pi]), \|\cdot\|_2)$. This is a contradiction.
