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

Solution 1:

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)$.