# Showing a function is continuous at 'a' implies continuity on a compact set

Ok, so I have the question:

"Suppose that $f : (a,b]$ $\rightarrow$ $\mathbb{R}$ is continuous and that the limit as $x$ tends to $a$ of $f(x)$ exists. Show that $f$ is uniformly continuous."

Here is what I have attempted, although I'm not entirely convinced it's correct.

Let $\lim_{x \to a} f(x) = L$

From the definition of limit we have that $\forall \epsilon > 0$ $\exists \delta_1 > 0$ such that $\forall x \in [a,b]$ such that $0<|x-a|<\delta_1$, $|f(x) - L| < \frac{\epsilon}{2}$

Also, as $f$ is continuous on $(a,b]$ we can write

$\forall p \in (a,b]$ and $\forall \epsilon > 0$, $\exists \delta_2 > 0$ such that $\forall x \in (a,b]$ such that $|x-p| < \delta_2$,

$|f(x) - f(p)| < \epsilon$

If we pick $\delta = min \left\{\delta_1,\delta_2\right\}$ then $\forall p \in [a,b]$ and $\forall x \in [a,b]$ such that $|x-p|<\delta$

$|f(x) - f(p)| = |f(x) + L - L - f(p)| = |(f(x) - L) + (L - f(p))| \ \leq \ |f(x)-L| + |L-f(p)|$

$\leq \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon$

Thus $f$ is continuous on $[a,b]$ and hence is uniformly continuous as it is a compact set.

Thanks!

You have a continuous extension of $f$ to $[a,b]$. You can then choose a $\delta$ in the definition of continuity that works uniformly for all $\epsilon$ and all points in $[a,b]$. Clearly this $\delta$ then also works uniformly on $(a,b]$, so $f$ is uniformly continuous there.
• @Noble. I'm concerned about your last step. You can only conclude that $|f(x)-L|<\epsilon/2$ if $x$ is close to $a$. (The same remark applies to $|L-f(p)|$. Feb 22 '13 at 4:36
• So from the last step, I've only actually proved that $f$ is continuous at $a$ and I now need to prove that continuity at $a$ and continuity at $(a,b]$ implies continuity at $[a,b]$? Thanks again. Feb 22 '13 at 4:43
• Thanks. So if we had $x \in (a,b]$ and $p \in (a,b]$ it's true from the hypothesis, if $x \in [a,a]$ and $p \in [a,a]$ it's true as $|f(x) - f(p)| = 0 < \epsilon$ so the case it needs to be shown for is when $x \in [a,a]$ and when $p \in (a,b]$. Feb 22 '13 at 4:51