Countable union of the images of compact set under continuous function is compact I have the following excercise:
Let $f_j:\mathbb{R}^n \to \mathbb{R}^m$ be continuous for $j \in \mathbb{N}$. Suppose $K$ is a compact subset of $\mathbb{R}^n$ and $f_j\to j$ uniformly on $K$. Prove that $S=f(K)\cup (\cup_{j=1}^{\infty} f_j(K))$ is compact.
Clearly $f(K)$ is compact and also every $f_j(K)$. I know that an arbitrary countable union of compacts is not necessarily compact, but the fact that $f_j \to j$ uniformly, say that (intuitively) all images of this functions are very close, but I don't know how to say this in a formal way, can you give me some hint? Thanks
 A: Hints: Let $(y_i)$ be a sequence in $S$. We want to show that $(y_i)$ has  convergent subsequence.  If $y_i \in f(K)$ for infinitely many values of $i$ the we are done since $f(K) $ is compact. Otherwise, we can go to a subsequence and assume that $y_i=f_{j_i}(x_i)$ for each $i$ where $x_i \in K$. Now consider two cases:
Case 1 : $\{j_i: i \geq 1\}$ is a finite set
and
Case 1 : $\{j_i: i \geq 1\}$ is an infinite set
In case 1  one particular $j_i$ is repeated infinitely many times and we can use compactness of $f_{j_i}(K)$ to finish the proof.
In case 2 we can go to a subsequence and assume that $j_i \to \infty$. This allows us to use uniform convergence: $\|y_i-f(x_i)\| <\frac 1 i$ for all $i$ sufficiently large. Now finish the proof using compactness of $f(K)$.
A: HINT: Suppose that $y\in\Bbb R^m\setminus S$. Then $y\notin f[K]$, and $f[K]$ is compact and therefore closed, so there is an $\epsilon>0$ such that $\|y-f(x)\|\ge 2\epsilon$ for all $x\in K$. There is then an $n_0\in\Bbb N$ such that $\|f_n(x)-f(x)\|<\epsilon$ for all $x\in K$ and $n\ge n_0$. Do a bit more work and conclude that $y\notin\operatorname{cl}S$. Use a similar idea to show that $S$ is bounded, and conclude that $S$ is compact.
