A problem about exhaustion in general topology. Suppose that $X\subset\mathbb{R}^n$ be open. How can I find a sequence of subsets $X_1,X_2,\cdots,X_n,\cdots$ of $X$ such that
(1) $X_n$ is open and $\overline{X_n}$ is compact for every $n$.
(2) $\overline{X_n}\subset X_{n+1}$
(3) $\bigcup_{n=1}^{\infty}X_n=X$.
 A: Since $X$ is an open subset of $\mathbb{R}^n$ then it is a countable union of open balls, say $B(x_i,r_i)$ where each $B(x_i,r_i)$ is an open ball around $x_i$ of some radius $r_i>0$.
For each $i$ define a sequence $(p_{i,n})_{n=1}^{\infty}$ which is strictly increasing and covergent to $r_i$. For example $p_{i,n}=r_i\cdot(1-1/(n+1))$. With that put
$$X_n=B(x_1,p_{1,n})\cup B(x_2,p_{2,n})\cup\cdots\cup B(x_{n-1},p_{n-1,n}) \cup B(x_n,p_{n,n})$$
So the idea is that in $n$-th step we add a ball to previously created balls for set $\{x_1,\ldots, x_{n-1}\}$. But in order to guarantee condition (2), in each step of the construction we need to slightly increase the radius of each ball and at the same time stay inside $X$. That's where $(p_{i,n})$ sequences come from.
Can you formally show that $X_n$ satisfy all conditions?
A: The set of open balls $\{B(q, r) \mid (q,r) \in \mathbb Q^2\}$ is countable as $\mathbb Q$ is countable. Let say that $\mathcal B = \{B(q_n,r_n) \mid n \in \mathbb N\}$ enumerates it.
Now for each $x \in X$, you can find $n(x) \in \mathbb N$ such that $x \in B(q_{n(x)}, r_{n(x)}) \subseteq B(q_{n(x)}, 2r_{n(x)}) \subseteq X$. As $\mathcal B$ is countable, so is $\mathcal B_X = \{B(q_{n(x)}, r_{n(x)}) \mid x \in X\}$ that we can denote $\{\omega_n \mid n \in \mathbb N\}$. We have $\cup \mathcal B_X = X$.
Now let's build $X_n$ by induction.
We take $X_0= \omega_0$. $X_0$ is open and $\overline{\omega_0}$ compact.
Suppose that we've built $X_n$ satifying the required hypothesis. As $\overline{X_n} \subseteq X$ is supposed to be compact, and $\mathcal B_X$ is an open cover, we can extract a finite subcover $\omega_{i_1}, \dots , \omega_{i_p}$. We then define $X_{n+1}= \left(\cup_{k=1}^p \omega_{i_k}\right) \cup \omega_{n+1}$.
$X_{n+1}$ contains $\overline{X_n}$ as $\cup_{k=1}^p \omega_{i_k}$ does. $\overline{X_{n+1}}$ is compact. And we have $\bigcup_{n=1}^{\infty}X_n=X$ as $\cup \mathcal B_X = X$. So we're done.
