# Prove that a monotonic bounded function is uniformly continuous

Prove that every bounded monotonic $f: \mathbb R \to \mathbb R$ is uniformly continuous.

I know it's true, but even if I can prove that $f$ is continuous on every point on $\mathbb R$, I can't conclude the $f$ is uniformly continuous, because $\mathbb R$ is not a closed interval.

• If you do not impose continuity of $f$ in addition, that is obviously wrong. $$f(x) = \begin{cases} \arctan x & x \le 213\\ \arctan x + 3423 & x > 213 \end{cases}$$ is bounded and monotone. – martini Jan 13 '17 at 12:33
• If $f$ is not continuous, then $f(x) = \begin{cases} 0, & x \le 0 \\ 1, & x > 0 \end{cases}$ is monotonic but not even continuous. – Alex M. Jan 13 '17 at 12:36

Suppose that $f\colon \def\R{\mathbf R}\R \to \R$ is continuous, bounded and monotone. Then $f$ is uniformly continuous.
Suppose wlog that $f$ is monotonically increasing. Let $s := \sup f$ and $i := \inf f$. Let $\epsilon > 0$, choose $L > 0$ such that $$f(x) > s-\epsilon, \qquad x \ge L$$ and $$f(x) < i +\epsilon, \qquad x \le -L$$ Note that $f$ is uniformly continuous on $[-L-1, L+1]$ choose $\delta_0$ such that $$|x-y| <\delta_0, |x|,|y| < L+1 \implies |f(x)- f(y)| < \epsilon$$ Now let $\delta := \min(1, \delta_0)\le \delta_0$. Let $x,y\in \R$ be arbitrary. If $x \ge L+1$, then $y \ge L$, hence both $x,y\ge L$, therefore $f(x),f(y) \in [s-\epsilon,s]$, that is $$|f(x)-f(y)| \le \epsilon$$ Doing this same line of thought again we obtain $$|f(x) - f(y)| \le \epsilon, \qquad \text{one of x,y\not\in [-L-1,L+1]}$$ Now suppose $x,y \in [-L-1,L+1]$, then as $|x-y|<\delta \le \delta_0$, we also have $$|f(x) - f(y)| \le \epsilon$$ Hence, $f$ is uniformly continuous.