Considering $\mathbb{R}^2$ with the standard metric. Suppose that, for each integer $n\geq 1$, there is a compact set $K_n \subseteq \mathbb{R}^2$ and a point $x_n \in\mathbb{R}^2$ such that:
- $K_n \subseteq B(x_n, 2^{-n})$
- the sequence $(x_n)_{n=1}^\infty$ converges to a point $x \in K$
Prove that $K=\cup_{n=1}^\infty K_n$ is compact.
I know that the infinite union of compact sets is not necessarily compact, so I would like to know where that fails and why the fact that the sequence of the centres of the sets that bound each $K_n$ fixes that. I want to use the Heine-Borel theorem in $\mathbb{R}^n$ and therefore to prove that $K$ is closed and bounded, and have thought to say $K \subset B(x_1, ||x1-x||+1/2)$, but do not see why I can say that the set is closed.
Let's see. So why would an infinite sequence of compact sets not be compact? By the Heine Borel theorem,
The best way of phrasing the above is that $\cup_{i=1}^{\infty} K_i$ won't be compact if there exists a sequence $y_i \in \cup_{i=1}^{\infty} K_i$ such that $\|y_i\| \to \infty$, because that's what you get by contradicting boundedness.
The best way of phrasing the above is that $\cup_{i=1}^{\infty} K_i$ won't be compact if there exists a sequence $y_i \in \cup_{i=1}^{\infty} K_i$ such that $y_i$ converges to a point outside $K$ (a limit point of $K$ lying outside $K$), because that's what you get by contradicting closedness.
So how do you work? You have two tasks :
Make sure that every sequence is bounded (by the same constant). This will make the whole set bounded.
Make sure that every sequence is converging to a point inside $K$. This will make the set closed.
But what about the structure of the given set does this?
The answer to both questions centers around the fact that $x_i \to x$, where $x_i$ are the centers of the balls.
Because this occurs, the maximal distance of $x_i$ from $x$ is something that is bounded i.e. $\sup_{x \geq 1} \|x_n-x\| = M < \infty$.
For boundedness, one can use the triangle inequality : if $y \in \cup_{i=1}^{\infty} K_i$, and say that it belongs to $K_j$, then $$ \|x-y_j\| \leq \|x-x_j\|+ \|x_j-y_j\| \leq M+2^{-j} \leq M+\frac 12. $$
I believe you attempted this argument, except that you probably assumed that $\sup_{x \geq 1} \|x_n-x\| = \|x_1-x\|$ (because it feels like $x_1$ is the "furthest" from $x$). This need not be true, but the maximum I took is what is to be done, leading to the answer.
As for closedness, there's something very nice happening here. See, suppose that you have a "bad" sequence which converges outside $K$. As mentioned earlier, that bad sequence has to have elements from all the $K_i$, so that some kind of "overflow" occurs. What we're doing, by ensuring that $K_i \subset B(x_i,2^{-i})$, is that the possibility of that bad subsequence to go haywire is becoming smaller, because the sets $K_i$ are themselves becoming smaller.
So a bad sequence has to not converge, but it also has to somehow belong to each $K_i$ for some $i$. That makes that bad sequence's possibilities continuously shrink : and because your $K_i$s are going to shrink to a point (which is $x$), it turns out that bad subsequence can only go to $x$!
Let's see how. Suppose that $y_i \in \cup_{i=1}^{\infty}$ is any sequence. Then, it is possible to see that one of the following is true :
Either, there is some $M>0$ such that $y_i \in \cup_{i=1}^{M} K_i$ for all $i$, OR
There is a subsequence of $\{y_n\}_{n \geq 1}$, call it $y_{n_k}, k \geq 1$ such that $y_{n_j} \in K_j$ for all $j \geq 1$.
In the first case, obviously $\cup_{i=1}^{M} K_i$ is compact, so $\{y_i\}$ will converge to a point within that set itself, if it converges somewhere.
On the other hand, if we have the subsequence $y_{n_j} \in K_j$ for all $j \geq 1$, then keep in mind that $y_{n_j}$ will converge to the same point as the original sequence $y_n$.
However, because of what I said earlier, we are well within our rights to expect that $x$ is the limit of the $y_{n_j}$, and knowing that, we simply execute the triangle inequality : $$ 0 \leq \|x-y_{n_j}\| \leq \|x-x_{n_j}\| - \|x_{n_j} - y_{n_j}\|\leq \|x-x_{n_j}\|+2^{-n_j}. $$
By the squeeze theorem, $\|x-y_{n_j}\| \to 0$, so $y_{n_j} \to x$. Thus, $y_n$ is a convergent sequence, which has a subsequence that converges to $x$. The only possibility left is that $y_n$ converges to $x$ as well, an easy exercise.
And since we assumed that $x \in K$, as part of the second point, we are able to handle the "bad" sequences by forcing them all to go to the exceptional point $x$.
Note that if $x \in K$ then the bad sequences won't have a limit point and one can get a counterexample. This hopefully explains the question, the principle behind solving it, and how it's actually done, modulo basic some details I leave readers to fill in.