I'm trying to prove that if $f$ is continuous on $[a,\infty)$ and if $\lim\limits_{x\to \infty}f(x)$ exists then $f$ is uniformly continuous. Here's my work:
Let $\epsilon>0$ be given. Set $J=[a,\infty)$. By continuity of $f$ on $[a,\infty)$, $\exists\;\delta_1=\delta_1(a,\epsilon)>0$ s.t. $\forall\;x\in J$ with $|x-a|<\delta_1$ , we have $|f(x)-f(a)|<\epsilon/2$.
$\lim\limits_{x\to \infty}f(x):=l$ exists $\implies$ $\exists\;M\in \Bbb{R}$ s.t. $x\geq M$, we have $|f(x)-l|<\epsilon/2$. Take $\delta=\min\{\delta_1,M\}$ s.t. $\forall\;x,y\in J$ with $|x-y|<\delta$ , we have
$|f(x)-f(y)|=|f(x)-l+l-f(y)|\leq |f(x)-l|+|f(y)-l|<\epsilon/2+\epsilon/2=\epsilon$
Hence, $\forall \epsilon>0,$ $\exists\;\delta=\delta(a,\epsilon,M)>0$ s.t. $\forall\;x,y\in J$ with $|x-y|<\delta$ , we have $|f(x)-f(y)|<\epsilon$. So, $f$ is uniformly continuous. I'm I right, especially in my choice of $\delta$ in the conclusion? If no, can anyone please provide a better proof? I'm I not permitted to choose $\delta=\delta(\epsilon)>0$?