# Let $f: [0,\infty] \to \mathbb{R}$ be continuous such that its limit tends to $0$ as $x \to \infty$. Prove that $f$ is uniformly continuous.

This question has been answered in the past but I am confused about a point in the proof.

Here is the problem statement:

Let $f$ be a continuous function from $[0, \infty)$ to $\mathbb{R}$ such that $$\lim_{x\to\infty} f(x) = 0$$. Prove that $f$ is uniformly continuous on $[0, \infty)$.

Proof:

Since $$\lim_{x\to\infty} f(x) = 0$$ given $\epsilon >0$ there exists an $N>0$ such that for all $x,y > N$, $|f(x)-f(y)| < \epsilon$.

Now, since $[0,N]$ is a compact set, and $f$ is continuous, $f$ is uniformly continuous on $[0,N]$. That is, given the same $\epsilon >0$, there exists a $\delta > 0$ such that $|f(x)-f(y)| < \epsilon$ for all $x,y \in [0,N]$ with $|x-y| < \delta$.

Now we just need to show that $f$ is uniformly continuous on $(N,\infty)$.

My question is, can't we just say that for all $x,y > N$ with $|x-y| < \delta$, $|f(x) - f(y)| < \epsilon$ and hence, we have $f$ is uniformly continuous on all of $[0, \infty)$?

A previous prove says to let $\delta_j = min\{1,\delta\}$ before proving uniform continuity of $f$ on $(N, \infty)$ and I don't see the need for this step.

• I would argue differently. For $\varepsilon>0$ choose $N$ such that $|f(x)-f(y)|<\varepsilon/2$ for $x,y >N$. Then for $[0,N]$ choose the $\delta$ corresponding to $\varepsilon/2$ from the uniform continuity property. This $\delta$, then works for all $x,y$ since if $x,y>N$ or $x,y<N$ the property is obviously satisfied. If $x<N<y$, then apply the uniform continuity bound on $|f(x)-f(N)| <\varepsilon/2$ and $|f(N)-f(y)|<\varepsilon/2$. – Beni Bogosel Apr 8 '15 at 22:14
• Another way to do it: Since $f$ has a limit at $+\infty$, you can say that $f(x) = f(\tan y)$ with $y \in [0,\pi/2]$. If you denote $g: [0,\pi/2],\ g(y) = f(\tan y)$, then $g$ is continuous. Furthermore, $f(x) = g(\arctan x)$. Now use the fact that $g$ is uniformly continuous and that $|\arctan x-\arctan y| \leq |x-y|$. – Beni Bogosel Apr 8 '15 at 22:19
• Possible Duplicate – Empty Apr 9 '15 at 11:44

A possible leak in the proof follows if we ask: Is $f$ continuous on $N$. A simple way to solve this: In stead of taking $[0,N]$, take $[0,N+1]$ as the compact set. Where $N$ is chosen such that: $$\forall x>N: |f(x)-0|<\frac{\epsilon}{2}$$ Than we have: $$\forall x,y>N: |f(x)-f(y)| \leq |f(x)-0|+|f(y)-0|<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon \: \: (1)$$ As in the OP we have a $\delta_1>0$ such that: $$\forall x,y: x,y \in [0,N+1]: |x-y|<\delta_1 \Rightarrow |f(x)-f(y)| <\epsilon \: \: (2)$$ Now take $\delta$ such that: $0<\delta <min \{\frac{1}{2},\delta_1 \}$.
Final step: Take $x,y \in [0,+\infty[$. There can be three cases:
Case 1: $\:$ $x,y \in [0,N+\frac{1}{2}]$. Then it follows directly from $(2)$ that: $|f(x)-f(y)|<\epsilon$.
Case 2: $\:$ $x,y \in [N+\frac{1}{2},+\infty]$. Then: it follows directly from $(1)$.
Case 3: By the choice of $\delta$ we can see that $y<N+1$ so both $x,y$ are smaller than $N+1$. And thus case 1 applies.