Let $f:[a,\infty)\rightarrow \mathbb{R}$ be continuous such that $lim_{x\rightarrow \infty} f(x)$ exists(say $c$). Show that $f$ is uniformly continuous on $[a,\infty)$.
My work:
Let $\epsilon >0$. Then there is $M$ such that $x> M$ implies $|f(x)-c|<\epsilon$. Now, $|f(x)-f(y)|\leq |f(x)-c|+|f(y)-c|$. So, now I am stuck in finding $\delta >0$ using $M$. Can anyone please help me?
since $lim_{x\rightarrow \infty}f(x)=c$ so given $\epsilon>0 \exists G>0 $ such that $\forall x>G,|f(x)-c|<\epsilon$.
so $f$ is uniformly continuous on $(G,\infty)$
Now $f$ is continuous on $[a,G]$ which is compact and hence $f$ is uniformly continuous on $[a,G]$