Prove uniform continuity Prove that if $f: [a, \infty) \rightarrow \Bbb R$ is continuous on $[a, \infty)$ and has a finite limite $ \lim_{x\to \infty} f(x)$, then f is uniformly continuous.
I found such definition of uniform continuity:
$\forall  x_n,y_n  \subset [a, \infty) \lim_{x\to \infty} x_n-y_n=0 \Rightarrow \lim_{x\to \infty} f(x_n)-f(y_n)=0$
and tried to do this using Heine's definitions but i got stuck at one point and can't move on. I'd really appreciate any hints!
 A: I will do this with the classical definition of uniform continuity:
$$\forall \epsilon>0\exists \delta>0:\ \forall x,y\ge a\ \ \left|x-y\right|<\delta\implies\left|f(x)-f(y)\right|<\epsilon$$
Since $\lim_{x\to +\infty}f(x)=L$, for $\epsilon>0$,
$$\exists M>0:\forall x\ge a\ \ x\ge M\implies\left|f(x)-L\right|<\frac{\epsilon}3$$
But $f$ is continuous on $[a,M]$ and so uniformly continuous there:
$$\exists \delta>0:\forall x,y\in [a,M]\ \left|x-y\right|<\delta\implies\left|f(x)-f(y)\right|<\frac{\epsilon}{3}$$
But for $x,y>M$,
$$\left|f(x)-f(y)\right|\le \left|f(x)-L\right|+\left|f(y)-L\right|<\epsilon$$
The case that remains is $x\in [a,M],y>M$: $f$ is continuous at $M$ and so 
$$\exists \delta_1>0:\forall x\in [a,+\infty]\ \left|x-M\right|<\delta_1\implies\left|f(x)-f(M)\right|<\frac{\epsilon}{3}$$
Then, if $x\in [a,M],y>M$ and $\delta_2=\min\left\{\delta,\delta_2\right\}$,
$$\left|f(x)-f(y)\right|\le \left|f(x)-f(M)\right|+\left\|f(M)-L\right|+\left|f(y)-L\right|<\frac{\epsilon}{3}+\frac{\epsilon}{3}+\frac{\epsilon}{3}=\epsilon$$
whenever $\left|x-y\right|<\delta_2$ and $x\in [a,M],y>M$
A: Let $\epsilon>0$. Let $\lim_{x\rightarrow\infty}f(x)=L$. Choose a real number $M>a$ such that: 
$$\forall x\geq M[|f(x)-L|<\frac{\epsilon}{2}]$$
Since $f$ is continuous, therefore $f$ is uniformally continionus on $[a,M]$. Thus, there exists $\delta_1>0$ such that $\forall x,y\in[a,M] [|x-y|<\delta_1\implies|f(x)-f(y)|<\epsilon]$. Since $f$ is continuous at $M$, there exists $\delta_2>0$ such that $\forall x [|x-M|<\delta_2\implies|f(x)-f(M)|<\epsilon/2$. Now let $\delta=min\{\delta_1,\delta_2\}$ 
*Claim:*$\forall x,y\in [a,\infty)[|x-y|<\delta\implies|f(x)-f(y)|<\epsilon]$
Proof: Consider the cases when $x,y$ belong to the interval $[a,M]$ or do not .
 The idea is that we have made sure that $x,y$ are close enough such that $f(x)$ is close to $f(y)$. 
