How to determine if a continuous function is uniformly continuous I have a continuous function $f:\mathbb{R}\rightarrow\mathbb{R}$, where $f(x) \rightarrow a$ for $x \rightarrow \pm \infty$, and I want to determine whether it is uniformly continuous.
Is it sufficient to check the limits $\pm \infty$ (why?), and what are some tips for getting started?
 A: Yes, if $f$ is continuous in $\mathbb{R}$ it suffices to check its behaviour at $\pm \infty$.
More generally, if $f$ is continuous in $\mathbb{R}$,  $g$ is uniformly continuous in $\mathbb{R}$, and $\lim_{x\to \pm\infty} (f(x)-g(x))=0$ then 
$f$ is uniformly continuous in $\mathbb{R}$ too (in your case $g$ is the constant function $a$).
Let $\epsilon>0$. Then, by the uniform  continuity of $g$, there is $\delta>0$ such that if $|x-y|<\delta$ then $|g(x)-g(y)|<\epsilon/3$. Moreover, $\lim_{x\to \pm\infty} (f(x)-g(x))=0$ implies that
there is $R>0$ such that, for $|x|\geq R$, $|f(x)-g(x)|<\epsilon/3$. 
Therefore, if $x,y\in [R,+\infty)$ and $|x-y|<\delta$ then
$$|f(x)-f(y)|\leq |f(x)-g(x)|+|g(x)-g(y)|+|g(y)-f(y)|<3\epsilon/3=\epsilon,$$
that is $f$ is uniformly continuous in $[R,+\infty)$. In the same way we show that $f$ is uniformly continuous in $(-\infty,-R]$.
By Heine-Cantor Theorem, $f$ is uniformly continuous on the compact set $[-R,R]$. Hence, we may conclude that $f$ is uniformly continuous in the union set $\mathbb{R}$.
A: Suppose otherwise. Then there is a $\varepsilon>0$ such, for each $\delta>0$, you can find $x,y\in\mathbb R$ with $|x-y|<\delta$ and $\bigl|f(x)-f(y)\bigr|\geqslant\varepsilon$. In particular, for each $n\in\mathbb N$, there are $x_n,y_n\in\mathbb R$ such that $|x_n-y_n|<\delta$ and $\bigl|f(x_n)-f(y_n)\bigr|\geqslant\varepsilon$. Now, what can you say about subsequences of $(x_n)_{n\in\mathbb N}$ and of $(y_n)_{n\in\mathbb N}$ which have a limit in $\mathbb{R}\cup\{\pm\infty\}$?
