Let $f:\mathbb R\to \mathbb R$ be a continuous function such that $\lim_{x\to \infty} \> f(x)$ and $\lim_{x\to -\infty} f(x)$ exist and are finite. Prove that $f:\mathbb R\to \mathbb R$ is uniformly continuous on $\mathbb R.$
I used the sequence definition of uniform continuity; can someone say whether my proof is complete?
Let $\lim_{x\to \infty} f(x)=l\;\;$ and $\lim_{x\to -\infty} f(x)=l'$ .
Assume $x_n,y_n\;$are any two sequences in$\;\mathbb R$ such that $\lim_{n\to \infty}(y_n-x_n)=0 $. Now the following four cases can occur.
Case I : $\lim_{n\to \infty}(y_n,x_n)$ is finite; then $\lim_{n\to \infty}y_n=\lim_{n\to \infty}x_n=m$. Therefore $\lim_{n\to \infty}(f(y_n)-f(x_n))=\lim_{n\to \infty}(f(m)-f(m))=0$.
Case II : $\lim_{n\to \infty}y_n=\lim_{n\to \infty}x_n\to \infty;$ then $\lim_{n\to \infty}(f(y_n)-f(x_n))=\lim_{n\to \infty}(f(l)-f(l))=0$
In Case III and Case IV, similar arguments can be made for sequences tending to $-\infty;$ then in every case $\lim_{n\to \infty}(f(y_n)-f(x_n))=0$. Therefore $f$ is convergent on $\mathbb R.$
Suppose $f$ is not uniformly continuous. Then there exists $\epsilon >0$ and points $x_y,y_n$ such that $x_n-y_n \to 0$ but $|f(x_n)-f(y_n)| >\epsilon$ for all $n$. One of the following three possibilities holds:
a) $\{x_n\}$ has a subsequence $\{x_n'\}$ converging to some finite limit $l$.
b) $\{x_n\}$ has a subsequence $\{x_n'\}$ converging to $\infty$.
c) $\{x_n\}$ has a subsequence $\{x_n'\}$ converging to $-\infty$.
In all three cases the sequence $\{y_n'\}$ has the same property. Now we get a contradiction to above inequality by using continuity of $f$ at $l$ in case a), using the fact that $\lim_{x \to \infty} f(x)$ exists and is finite in case b) and the fact that $\lim_{x \to -\infty} f(x)$ exists and is finite in case c).