[Math] A proof about uniformly continuous function on an open interval and its extension

continuityproof-verificationreal-analysisuniform-continuity

I try to prove:

If $g$ is a continuous function on $(a,b)$ then $g$ is uniformly continuous on $(a,b)$ if and only if it is possible to define values $g(a)$ and $g(b)$ at the endpoints so that the extended function $g$ is continuous on $[a,b]$.

Please can you check my proof?

If there are $g(a)$ and $g(b)$ such that $g:[a,b]\to \mathbb R$ is continuous then because $g:[a,b]\to \mathbb R$ is uniformly continuous, so is $g:(a,b)\to \mathbb R$.

Let $g$ be uniformly continuous on $(a,b)$ and let $x_n \to a$ and $y_n \to b$. Because $x_n$ and $y_n$ are Cauchy and $g$ is uniformly continuous, $g(x_n)$ and $g(y_n)$ are Cauchy. Define $g(a) = \lim g(x_n)$ and $g(b) = \lim g(y_n)$. Now this extended function $g$ is continuous at $a$ and $b$. It is enough to show it for one of the two points because the proof is similar. Let $\varepsilon >0$. The goal is to find $\delta$ such that $|x-a|<\delta$ implies that $|g(x) -g(a)|<\varepsilon$. By definition, $g(x_n) \to g(a)$ hence there is $N$ such that for $n>N$ it holds that $|g(x_n) – g(a)| < \varepsilon$. Now let $\delta = |a-x_{N+1}|$.


I now know why my proof is false, thanks to the answer but I can't understand one part of the answer. The bounty is for extension of answer not for more answers.

Best Answer

The second half of the proof is not correct, as the $\delta>0$, does not necessarily work for all $x$, $|x-a|<\delta$, but only for the terms of the sequence you chose.

Updated version. First define $g(a)=\lim_{n\to\infty} g(x_n)$, as you have done. Let $\varepsilon>0$, then there is a $\delta>0$, due to uniform continuity, such that $$ |x-y|<\delta\quad\Longrightarrow\quad |g(x)-g(y)|<\varepsilon/2.\tag{1} $$ In particular, let $$|x-a|<\delta/2, \tag{2}$$ and $n_0$, such that $n\ge n_0$, implies $|x_n-a|<\delta/2$. Then every $x$ satisfying $(2)$, also satisfies $$ |x-x_n|\le |x-a|+|x_n-a|<\delta,\quad \text{for every}\,\,n\ge n_0. $$ Hence, due to $(1)$, if $x$ satisfies $(2)$ and $n\ge n_0$, then $$ |g(x)-g(x_n)|<\varepsilon/2, $$ or equivalently $$ g(x)-\varepsilon/2<g(x_n)<g(x)+\varepsilon/2, \quad \text{for every $\,\,n\ge n_0\,\,$ and $\,\,|x-a|<\delta/2$,} $$ and taking the limits, as $n\to \infty$, we obtain $$ g(x)-\varepsilon/2\le g(a) \le g(x)+\varepsilon/2, \quad \text{for every $\,\,|x-a|<\delta/2$,} $$ or $$ |g(x)-g(a)|\le\varepsilon/2<\varepsilon \quad \text{for every $\,\,|x-a|<\delta/2$.} $$ Thus, for every $\varepsilon>0$, there exists a $\delta>0$ such that $$ |x-a|<\delta/2\quad\Longrightarrow\quad|g(x)-g(a)|<\varepsilon. $$

Related Question