The space of functions that vanish at infinity is a Banach space Prove that $C_0(X) = \{ f \in C(X) \mid \forall \varepsilon >0 \ \exists K \subset X \text{ compact such that } |f(x)| < \varepsilon \text{ for } x \notin K \}$ is a Banach space with the norm $\|f\|_{\infty}$.
I'm trying to prove that $C_0(X)$ is closed subset of $C(X)$, therefore I suppose $f \in \overline{C_0(X)}$ so there exist a sequence $f_n \in C_0(X)$ such that $f_n \to f$. I am stuck here: why $f \in C_0(X)$?
 A: Let $\epsilon >0$ and $n_0$ such that for all $n\geq n_0$, $\| f_n-f\|_\infty \leq \epsilon $. Since $f_n\in C_0(X)$ there is compact $K_0$ such that $|f_n(x)|<\epsilon $ for $x\in X\setminus K_0$. So $\sup _{X\setminus K_0} | f(x)|\leq \sup _{X\setminus K_0} | f(x)|+\|f_n-f\|_\infty \leq 2\epsilon $.
A: This is a typical $\varepsilon/2$-argument. Fix $\varepsilon>0$. Then there exists  $n$ such that $\|f-f_n\|<\varepsilon/2$. Since $f_n\in C_0 (X) $, there exists $K\subset X $, compact, with $|f_n (x)|<\varepsilon/2$ for all $x\in X\setminus K $. So, outside $K $,
$$
|f (x)|\leq|f(x)-f_n (x)|+|f_n (x)|<\frac\varepsilon2+\frac\varepsilon 2=\varepsilon. 
$$
A: As $C(X)$ is a Banach space, you only need to prove as you noticed that $C_0(X)$ is closed in $C(X)$.
Suppose that $f_n \to f$. $f$ is continuous because $C(X)$ is a Banach space. You only need to prove that $f$ vanishes at infinity.
Take $\epsilon > 0$. By hypothesis you can find $N \in \mathbb{N}$ with $\Vert f-f_N \Vert_\infty < \epsilon/2$. As $f_N \in C_0(X)$, there exists a compact $K \subset X$ such that $\vert f_N(x) \vert < \epsilon/2$ for all $x \in X \setminus K$.
Hence for $x \in X \setminus K$:
$$\vert f(x) \vert \le \vert f_N(x) \vert + \Vert f-f_N \Vert_\infty \le \epsilon$$
Proving that $f$ vanishes at infinity. And you're done.
