TITLE: Is a continuous function between two uniformly continuous functions uniformly continuous?
QUESTION [8 upvotes]: I'm sorry for the long question in the title. Given three functions $\underline{f}(x), f(x), \overline{f}(x)$ that satisfy the following

$\underline{f}(x)\leq f(x)\leq \overline{f}(x)$ for all $x\in\mathbb{R}$,
$\underline{f}(x)$ and $\overline{f}(x)$ are both uniformly continuous and bounded in $\mathbb{R}$, and
$f(x)$ is continuous in $\mathbb{R}$.

Is $f(x)$ uniformly continuous in $\mathbb{R}$?
The desired conclusion seems intuitive but I get stuck when trying to prove it. I have hard time putting the conditions together. Any hint is highly appreciated!

REPLY [27 votes]: The functions $\bar f(x) = 1$ and $\underline f(x) = -1$ are uniformly continuous.
The function $f(x) = \sin(x^2)$ is not uniformly continuous. (Take $\epsilon = \frac{1}{2}$ for instance).

REPLY [13 votes]: No, since a bounded function like $\sin(x^2)$ is not necessarily uniformly continuous.  For instance, $\sin(x^{1/2})$ is not.