# Show f is uniformly continuous on $(a,b)$ if it is continuous and $\lim\limits_{x\to a^+}f(x)$ and $\lim\limits_{x\to b^-}f(x)$ exist

Let $f:(a,b)\to\mathbb{R}$ be continuous at all $x\in(a,b)$. If $\lim\limits_{x\to b^-}f(x)$ and $\lim\limits_{x\to a^+}f(x)$ exist in $\mathbb R$, how can we prove that $f$ is uniformly continuous on $(a,b)$?

This is my attempt, but I'm just not certain it is correct:

Let $\epsilon>0$. It is clear that $[a+\epsilon,b-\epsilon]\subseteq(a,b)$. It is known that $f(x)$ is continuous on $(a,b)$, so it is uniformly continuous on the bounded interval $[a+\epsilon,b-\epsilon]$. But, $[a+\epsilon,b-\epsilon] \iff (a,b)$. Thus $f$ is uniformly continuous on $(a,b)$.

Is my proof correct? Is there a better way?

• As it stands, your proof is insufficient, and the equivalence $[a+\epsilon,b-\epsilon]\Leftrightarrow (a,b)$ makes no sense (and cannot be modified to make sense). Jan 2 '13 at 9:42
• You haven't used the extra condition that $\lim_{x\to a^+} f(x)$ and $\lim_{x\to b^-} f(x)$ exist. Without them, the statement is false. (Take for example $f(x) = 1/(x-a)$.)
– mrf
Jan 2 '13 at 9:45
• I know what you're trying to do with the line $[a+\epsilon, b-\epsilon] \Leftrightarrow (a,b)$, but as Olivier said, it doesn't work. (Take $a = -\pi/2, b = \pi/2, f(x) = \tan(x)$ for a counterexample. Of course, the limits don't exist here as required.) Here's a hint: what do you know about continuous functions on closed intervals? Once you've answered that, can you find a large closed interval on which f is continuous? Jan 2 '13 at 9:47
• You have made mention of the theorem according to which a continuous function on a closed bounded interval $[c,d]$ is automatically uniformly continuous. Instead of trying to use this property on subintervals of $(a,b)$, use the hypothesis on $f$ to extend it continuously to some larger interval, and use the theorem. Jan 2 '13 at 9:48
• @Olivier Ahhh... A neat alternative to the tedious epsilon-delta approach.
– Did
Jan 2 '13 at 9:53

Your proof is incorrect, because $f$ being uniformly continuous on all closed subintervals of $(a,b)$ doesn't imply it is so on $(a,b)$ itself.
Here is one way to do it. Extend the function $f$ to the function $g:[a,b]\to\mathbb R$ with $g(a)=\lim_{x\to a^+} f(x)$ and $g(b)=\lim_{x\to b^-}f(x)$. Then $g$ is continuous on $[a,b]$. It follows that $g$ is uniformly continuous on $[a,b]$ so that $f$ is uniformly continuous on $(a,b)$.