Continuous on $\left[0,\infty\right)$ with limit implies uniform continuous

45 Views Asked by At

Suppose $f:\left[0,\infty \right) \to \mathbb{R}$ is continuous and there exists $L\in\mathbb{R}$ such that $f(x)\rightarrow L $ as $x\rightarrow\infty$. Prove that $f$ is uniformly continuous on $\left[0,\infty \right)$.

My attempt was that since $lim_{x\to\infty}f(x)=L$. This implies that for all $\epsilon >0$, there exists an $N>0$ such that for all $x \ge N$ $|f(x)-L|<\frac{\epsilon}{2}$, which implies for all $x,y\ge N$, $|f(x)-f(y)|<|f(x)-L|+|L-f(y)|<\epsilon$. Since any continuous function on a compact set is uniformly continuous $f$ is uniformly continuous on $\left[0,N\right]$ This implies for all $\epsilon>0$, there exists $\delta_{\left[0,N\right]}$ such that for all $x,y \in\left[0,N\right]$, $|x-y|<\delta_{\left[0,N\right]}$ implies $|f(x)-f(y)|<\epsilon$. Therefore choose the common delta as $\delta=\delta_{\left[0,N\right]}$. The only problem is that we need to show this $\delta$ works for $x>N$ and $y<N$. This clearly works for all other cases. In this case $(x-y)=(x-N)+(N-y)$ therefore if $|x-y|<\delta$ then $|x-N|<\delta$ and $|N-y|<\delta$, those imply that by the uniform continuity of $f$ on $\left[0,N\right]$, $|f(y)-f(N)|<\frac{\epsilon}{2}$ and by the existence of limit $|f(x)-f(N)|<\frac{\epsilon}{2}$. Thus $|f(x)-f(y)|<\epsilon$. Is everything correct?