# proving uniformly continuous with a given continuous function

Define $f:\mathbb{R} \to \mathbb{R}$ as continuous where $\lim_{p \to +\infty}f(p) = \ell_1$ and $lim_{p \to -\infty}f(p) = \ell_2$ such that $\ell_1, \ell_2 \in \mathbb{R}$, I want to show that $f$ is uniformly continuous.

What I know:

1. I know that since $\lim_{p \to +\infty}f(p) = \ell_1$ then for any $\epsilon > 0$ there is some $N$ such that for all $x > N$, $|f(p) - \ell_1| < \epsilon$.

2. Also as $\lim_{p \to -\infty}f(p) = \ell_2$ then for any $\epsilon > 0$ there is some $M$ such that for all $x < M$, $|f(p) - \ell_2| < \epsilon$.

My concern is trying to tie this to uniformly continuous. I'm given that the definition of uniformly continuous is that for all $\epsilon > 0$ there exists some $\delta > 0$ such that $d(f(p),f(q)) < \epsilon$ for all $p,q$ in some metric space where $d(p,q) < \delta$ is satisfied. How can I get to a definition like this with what I am given?

There are integers $n$ and $-n$ such that

$\tag1x\ge n\Rightarrow |f(x)-l_1|<\epsilon/3$ and $\tag2x\le -n\Rightarrow |f(x)-l_2|<\epsilon/3.$

As $f$ is uniformly continuous on the compact set $[-n,n]$ there is a $\delta >0$ such that

$\tag3|x-y|<\delta \Rightarrow |f(x)-f(y)|<\epsilon/3$ whenever $x,y\in [-n,n].$

Now suppose $|x-y|<\delta.\$ We consider cases:

If $x,y\in [-n,n]$ then the result follows by $(3).$

If $x,y>n$ then the result follows by $(1)$ because then $|f(x)-f(y)|\le |f(x)-l_1|+|l_1-f(y)|<2\epsilon/3$

A similar calculation shows that if $x,y<-n,$ the result is true by $(2)$.

If $x\in [-n,n]$ and $y>n$ then the distance between $x$ and $n$ is less than $\delta$ and $y\ge n$ so we have $|f(x)-f(y)|\le |f(x)-f(n)|+|f(n)-f(y)|\le |f(x)-f(n)|+|f(n)-l_1|+|f(y)-l_1|<\epsilon.$

The remaining case is handled similarly.

• This is a great explanation. Thank you very much! – tanner carbonati Mar 23 '17 at 2:01
• Sure, glad to help! – Matematleta Mar 23 '17 at 2:06

So outside some closed and bounded interval, the function is either uniformly close to $l_1$ or $l_2$. On the (compact) interval, we know the function is uniformly continuous. Thus, we have a partition of the real line into 3 sets so that $f$ is uniformly continuous on each one. So the only issue is when we have two points that are close to each other in two different partitions. But we can easily resolve this issue using continuity at the $2$ points where the partitions change.