Uniform continuity on an open interval? Suppose I want to check if $f(x)$ is uniform continuous on a bounded interval $I$ (for eg open interval $(0,1)$), given that it is continuous on $I$. How do I do that?
My approach: Take $\bar{I}$, then two case can happen:
Case I: If I can continuously extend the function, then $f(x)$ is uniformly continuous on $I$.
Case II: If I cannot extend the function continuously, then two sub cases are possible 
Subcase II a: $f(x)$ is tends to an infinite limit i.e. it shoots up/down arbitrarily for eg functions like $\frac{1}{x}$. In which case I conclude that $f$ is not uniformly continuous on $I$.
Subcase II b: $f(x)$ doesn't have a limit i.e. function of the type sin$\frac{1}{x}$. In this case as well $f(x)$ is not uniform continuous on $I$.
So is my above classification of continuous function sufficient to determine which functions are uniform continuous and which are not? So far it had worked well for me.
 A: Yes, that is correct. In fact, assuming that the domain of $f$ is $(a,b)$:


*

*If both limits $\lim_{x\to a^+}f(x)$ and $\lim_{x\to b^-}f(x)$ exist, then $f$ is uniformly continuous, because you can define$$\begin{array}{rccc}F\colon&[a,b]&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}\lim_{x\to a^+}f(x)&\text{ if }x=a\\f(x)&\text{ if }x\in(a,b)\\\lim_{x\to b^-}f(x)&\text{ if }x=b.\end{cases}\end{array}$$Then $F$ is continuous and, since its domain is a closed and bounded interval, $F$ is unifomly continuous. In particular, $f$ is uniformly continuous.

*If the limit $\lim_{x\to a^+}f(x)$ doesn't exist, then $f$ cannot be uniformly continuous because then either $\lim_{x\to a^+}\bigl\lvert f(x)\bigr\rvert=+\infty$ or there will two real numbers $m$ and $M$, with $m<M$, such that the inequalities $f(x)>M$ and $f(x)<m$ will occur for values of $x$ arbitrarily close to $a$. It is easy to prove that each possibility is incompatible with the fact that $f$ is uniformly continuous.

*The case in which the limit $\lim_{x\to b^-}f(x)$ doesn't exist is similar.

A: Let $f:(0,1)\rightarrow \Bbb R$ be uniformly continuous and consider a sequence $\{x_n\}$ converging to $0$ , so that $\{x_n\}$ is cauchy. Now a uniformly continuous function sends Cauchy sequence to Cauchy sequence i.e. $\{f(x_n)\}$ is also cauchy , hence $\{f(x_n)\}$ converges to some limit $l\in \Bbb R$. Again using uniform continuity you can show this limit is independent of choice of sequence converging to $0$ i.e. both $x_n,y_n$ converges to $0$ implies that $|x_n-y_n|$ can be made arbitrarily small for large $n$, so by uniform continuity $|f(x_n)-f(y_n)|$ can be made arbitrarily small for large $n$ and since both $\{f(x_n)\},\{f(y_n)\}$ are convergent ,the converges same limit. So that we can extend $f$ by defining $f(0)=l$. In a similar manner one can assign a value for $f$ on the point $1$. This gives a continuous extension of $f$ on $[0,1]$.
For the converse , let $\tilde f$ be a continuous extension of $f$ on $[0,1$, then $\tilde f$ is uniformly continuous as $[0,1]$ is compact , hence $f$ , being a restriction of $\tilde f$ is uniformly continuous on $(0,1)$.
More general statement---
 Let $D$ be a dense subset of $[0,1]$ and $f:D\rightarrow \Bbb R$ is uniformly continuous then $f$ can be extended to whole $[0,1]$ continuously.
