# Continuous functions which are Uniformly continuous

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]$

Your part of the proof shows that for $|x|,|y|>M$, any $\delta$ would do! In fact no matter how far are $x$ and $y$ from each other, if they lie in the region outside $[a,M]$ the difference in the images is going to be smaller than $2\epsilon$, as you said.

Now, you need to fix the region $[a,M]$. There is a general result saying that a continuous function on a compact set is uniformly continuous (Heine's theorem). That gives you the answer (and the $\delta$ you were looking for).

For Heine's theorem, you can argue as follows by contradiction: let $f$ be a continuous function on a compact set which is not absolutely continuous. Then there exists a certain $\epsilon$ such that FOR ALL choiches of $\delta$ the condition is false. If you make successive choices of $\delta=1/k$ you find two sequences of points, $x_k,y_k$, such that $|x_k-y_k|<1/k$, but $|f(x_k)-f(y_k)|>\epsilon$. Since the set is compact, we can extract sequences $x_{k_i}$ and $y_{k_i}$ which converge. By construction, they have the same linit $x=y$. Since $f$ is continuous, $0=f(x)-f(y)=\lim f(x_{k_i})-f(y_{k_i})\geq \epsilon$. This is a contradiction.