Let $f: I \to \mathbb{R}$ be a continuous monotonic and bounded function on an interval $I$, then $f$ is uniformly continuous The question is as the title says. Here, the interval $I$ is not necessary bounded, for example, $f(x)=1/{(1+e^{x})}$ with $f: \mathbb{R} \to \mathbb{R}$ is an exemple of such function.
My attempts:
a) I have tried to construct $\phi$ such that $\phi(x)=\lim_{y \rightarrow x} f(y)$  , and then look the range (the range is bounded and "almost" closed), but without success.
b) I have tried "to bind functions" in such sense: if $f$ is continuous at b and $f|{[c,b]}$ and $f|[b,d]$ is uniformly continuous, then $f:[c,d] \to \mathbb{R}$ is uniformly continuous, but without success, cos I cant "bind" indefinitely.
c) I have tried by contradiction, but again without success.
 A: Hint:
Assume $f$ is nondecreasing, and write $I=(q,p)$ where $p$ and $q$ may be infinite. Show that $\lim_{x \to p} f(x) = u$, where $u:=\sup_{x \in I} f(x)$. Similarly show that $\lim_{x \to q} f(x) = v$, where $v := \inf_{x \in I} f(x)$.
Next fix $\epsilon>0$. Choose $M, N \in I$ with $M \geq N$, such that $x\geq M$ implies that $u-f(x)<\epsilon/2$, and such that $x \leq N$ implies that $ f(x)-v < \epsilon/2$. Conclude that $|f(x)-f(y)|<\epsilon/2$ whenever $x,y \in (q, N]$ or $x,y \in [M, p)$.
Since $[N,M]$ is a compact interval, $f$ is uniformly continuous on $[M,N]$, so there exists $\delta>0$ such that for all $x,y\in [M,N]$, if $|x-y|<\delta$ then $ |f(x)-f(y)|<\epsilon/2$.
Conclude that for all $x,y \in I$, if $|x-y|<\delta$ then $|f(x)-f(y)|<\epsilon$.
A: Without loss of generality, one may assume that $f$ is nondecreasing. The continuity and boundedness of $f$ shows that $J:=f(I)$ is a bounded interval. Let the closure of $J$ be $[a,b]$. To prove that $f$ is uniformly continuous, let $\epsilon>0$ be given. Make a partition of $[a,b]$ such that $a=y_0<y_1<\cdots<y_n=b$ and $|y_i-y_{i-1}|<\frac {\epsilon} 2$ for $1\leq i\leq n$. For each $y_i$ with $1\leq i\leq n-1$, let $f^{-1}(y_i)=x_i$ (if $f$ is not strictly monotone, $x_i$ may not be unique, so just choose one in this case). These $x_i$'s together with the (possibly infinite) boundary points of $I$ form a partition $P$ of $I$. Note that $I$ is the union of the subintervals $I_1,I_2,\cdots,I_n$, where $I_1=I\cap \{x~|~x\leq x_1\},$ $I_n=I\cap \{x~|~x\geq x_{n-1}\}$, and $I_k=[x_{k-1},x_k]$ for $2\leq k\leq n-1.$ For convenience, one may use less precise notations $I_1=[x_0,x_1]$ and $I_n=[x_{n-1},x_n]$ with the understanding that $x_0,x_n$ may not be in $I$, and one sets $f(x_0):=\lim_{x\rightarrow x_0+}f(x)$ and $f(x_n):=\lim_{x\rightarrow x_n^-}f(x),$ where $x_0=-\infty$ or $x_n=\infty$ is allowed. Let $\delta=\|P\|$ be the norm of the partition, i.e. the minimum length among the subintervals determined by the partition. Now to prove uniform continuity, take $z_1<z_2\in I$ with $z_2-z_1<\delta$, one needs to show that $$|f(z_2)-f(z_1)|=f(z_2)-f(z_1)<\epsilon.$$ To see this, look at the interval $[z_1,z_2]$. By construction, $(z_1,z_2)$ can contain at most one of $x_i$'s with $1\leq i\leq n-1,$ so one has two cases to consider. First if $(z_1,z_2)$ contains none of the $x_i$'s, then $[z_1,z_2]$ is contained in exactly one of the subintervals, say $I_i=[x_{i-1},x_i],$ so $$f(z_2)-f(z_1)\leq f(x_i)-f(x_{i-1})<\frac{\epsilon}2<\epsilon.$$ Secondly, if $(z_1,z_2)$ contains $x_i$ with $1\leq i\leq n-1$, then $$[z_1,x_i]\subset I_i=[x_{i-1},x_i]~{\rm and~}[x_i,z_2]\subset I_{i+1}=[x_i,x_{i+1}].$$ By construction, $$f(z_2)-f(z_1)=(f(z_2)-f(x_i))+(f(x_i)-f(z_1))$$$$\leq (f(x_{i+1})-f(x_i))+(f(x_i)-f(x_{i-1})<\frac {\epsilon}2+\frac {\epsilon}2=\epsilon,$$ which combined with the first case finishes the proof.
