(a) Suppose that a function $f:R→R$ is continuous and “vanishes at infinity,” i.e., $lim_{x \rightarrow \infty}f(x) = 0 = lim_{x\rightarrow -\infty} f(x)$. Prove that $f$ is uniformly continuous on $\mathbb{R}$.
(b) Suppose that $f:\mathbb{R}\rightarrow \mathbb{R}$ is continuous and there is some $R >0$ such that $f(x) = 0$ whenever $|x|> R$. Prove that $f$ is uniformly continuous on $\mathbb{R}$. (Hint: Even though the domain of $f$ is not a compact set, a theorem from class will be very helpful)
I know that a function $f:\mathbb{R}^n\rightarrow \mathbb{R}^m$ is uniformly continuous if for any $\epsilon >0$, there exists a $\delta >0$ such that for any $x \in \mathbb{R}^n$ and $y \in \mathbb{R}^n$, \begin{equation*} ||x-y||<\delta \implies ||f(x)-f(y)||<\epsilon \end{equation*}
I am not quite sure how to prove uniform continuity for these 2 parts given this definition. I am thinking the hint in part b refers to the theorem "if f is continuous and $K \subseteq R^n$ is compact, then f is uniformly continuous on the set K.