# Let $f$ be continuous on an open interval $(a,b)$, and let its limits at $a$ and $b$ exist. Show that $f$ is uniformly continuous on the interval.

I'm given the following problem, for which I've begun to work out a solution, but have become stuck on.

Problem. Let $$f$$ be a function continuous on the interval $$(a,b)$$, and suppose that $$\lim_{x\to a} f(x) = l_a$$ and $$\lim_{x\to b} f(x) = l_b$$. Show that $$f$$ is uniformly continuous on $$(a,b)$$.

Attempt. To show the uniform continuity of $$f$$, we must show that for all $$\epsilon>0$$ there exists $$\delta > 0$$ such that $$\forall x,y\in (a,b)$$:

$$\textrm{if } |x-y| < \delta \textrm{ then } |f(x) - f(y)| < \epsilon$$

Select an arbitrary, positive $$\epsilon$$. As a consequence of the existence of the limits $$l_a$$ and $$l_b$$, we may assert the existence of $$\delta_1, \delta_2 > 0$$ such that, $$\forall x\in (a,b)$$:

$$\textrm{if }0< |x-a| < \delta_1 \textrm{ then } |f(x) - l_a| < \epsilon$$ $$\textrm{if }0< |x-b| < \delta_2 \textrm{ then } |f(x) - l_b| < \epsilon$$

Let $$\delta$$ be the smaller (that is, let $$\delta = \textrm{min}(\delta_1, \delta_2)$$). Clearly, then:

$$\textrm{if }0< |x-a| < \delta \textrm{ then } |f(x) - l_a| < \epsilon$$ $$\textrm{if }0< |x-b| < \delta \textrm{ then } |f(x) - l_b| < \epsilon$$

It occurs to me that there is perhaps some way to combine those last two lines such that we achieve the desired result (I haven't yet used the continuity of $$f$$, perhaps that can somehow be invoked here?). Is this a fruitful approach? How might I proceed? I ask that full solutions not be provided.

Extend $$f$$ to $$\tilde f: [a, b] \to \Bbb R$$ in the obvious way. Then $$\tilde f$$ is a continuous function on a compact set, and all such functions are uniformly continuous. The latter fact is fairly easy to prove directly from the definition of compactness, using that for any continuous function, the inverse image of an open set is open.
• Omitted is the last step: $f: (a, b) \to \mathbb{R}$ is a restriction of $\tilde{f}: [a, b] \to \mathbb{R}$, so the uniform continuity of the latter implies that of the former. Is this correct? Commented May 7, 2023 at 2:19