Is a continuous function vanishing at infinity always C_0? Let $f \colon \mathbb{R}^n \to \mathbb{R}$ be a continuous function with
$$ \lim_{|x| \to \infty} f(x) = 0. $$
Does that imply $f \in C_0$, i.e. is there a compact set $K_{\epsilon}$ for every $\epsilon > 0$, such that
$$ |f(x)| < \epsilon \qquad \forall x \in \mathbb{R}^n \setminus K_{\epsilon} $$
Note: It obviously is true for $n = 1$. The case I need to solve is $n = 2$ with $f \in C^2$.
 A: The (usual) definition of the limit simply means that for every $\varepsilon > 0$, there is some $R_\varepsilon>0$ such that for all $x \in \Bbb{R}^n$ with $|x|>R_\varepsilon$, we have $|f(x)| < \varepsilon$.
EDIT: If you have a different definition of this limit, the proof might be slightly more involved.
Hence, we can simply take $K_\varepsilon = \{x \in \Bbb{R}^n \mid |x| \leq R_\varepsilon\}$, which is closed and bounded, hence compact (because we are in a finite-dimensional space, so that Heine-Borel is applicable).
A: In general, 
$$
\lim_{g(x)\to \infty}f(x)=0
$$
means that 
$$
\forall \epsilon>0,\; \exists M_\epsilon:g(x)>M_\epsilon\implies |f(x)|<\epsilon 
$$
In this case, as stated before, you just need to take $K_\epsilon=\{x:g(x)\le M_\epsilon\}$.
A: For any sequence $\{a_n\} \subset \mathbb{R}$, $a_n \to \infty$ means $\forall_{R>0} \exists_{N \in \mathbb{N}} \forall_{n\geq N} \ a_n > R$.
The statements of arney are actually equivalent. We have for $f: \mathbb{R}^n \to \mathbb{R}$ continuous
$$\forall_{\{x_n\} \subset \mathbb{R}^n: |x_n| \to \infty} \ f(x_n) \to 0 \;\iff\; \forall_{\epsilon > 0} \exists_{K_\epsilon \subset \mathbb{R}^n\, \text{compact}} \forall_{x\in \mathbb{R}^n\setminus K_\epsilon}\ |f(x)| < \epsilon. $$
I will drop the irritating subscript $\epsilon$, since the dependences will be clear from context.
Prf: "$\Leftarrow$": Take $\{x_n\}$ with $|x_n| \to \infty$. Take $\epsilon > 0$. Take $K$ from the right hand-side. $K$ is compact and $\mathbb{R}^n$ is a metric space, thus $K$ is bounded. Thus there exists $R>0$ with $|x| \leq R$ for all $x \in K$. Since $|x_n| \to \infty$ there exists $N$ with $|x_n| > R$ for all $n \geq N$. Thus $\forall_{n\geq N} |f(x_n)| < \epsilon$ by the right hand side.
"$\Rightarrow$": Take $\epsilon>0$. Set $K := \{x \in \mathbb{R}^n: |f(x)| \geq \epsilon\}$. We want to evoke Heine-Borel, then the statement holds by construction. Clearly $K \subset \mathbb{R}^n$ is closed since $f$ is continuous. Suppose that $K$ is not bounded. Then, there exists a sequence $\{x_n\} \subset K$ with $|x_n| \to \infty$. But $|f(x_n)| \geq \epsilon$ for all $n$, so clearly we cannot have $f(x_n) \to 0$, contradicting the left hand side.
