It is well-known that if a differentiable function $f:I \to \mathbb{R}$ ($I$ an interval) has bounded derivative, then it is uniformly continuous. On the other hand, there are differentiable functions, which are uniformly continuous, but whose derivative is unbounded. My related question is as follows. Does there exist a differentiable function $f:\mathbb{R} \to \mathbb{R}$, and a subset $X \subseteq \mathbb{R}$, such that $f'$ is bounded on $X$, and yet $f$ is not uniformly continuous on $X$? Note that $X$ cannot be an interval, a finite disjoint union of intervals, nor can it be a discrete set.

  • $\begingroup$ Exactly my question too, beat me to it by a day. ;-) $\endgroup$ Mar 1, 2014 at 21:58
  • $\begingroup$ My one change would be, I am wondering about the stronger $f'$ bounded on $\mathbb{R}$. $\endgroup$ Mar 1, 2014 at 22:08
  • $\begingroup$ Are you forbidding that $X$ be a disjoint union of intervals, or are you claiming that that isn't possible? $\endgroup$ Mar 1, 2014 at 22:49
  • 4
    $\begingroup$ @Travis If $f'$ is bounded on all of $\mathbb{R}$, then $f$ is globally Lipschitz-continuous, and hence uniformly continuous. $\endgroup$ Mar 1, 2014 at 22:52

2 Answers 2


Let us start with

$$h(x) = \begin{cases} \hphantom{-}4(x+2) &, -2\leqslant x < -\frac{3}{2}\\ -4(x+1) &, -\frac{3}{2} \leqslant x < -1\\ -4(x-1) &, \hphantom{-}\; 1 \leqslant x < \frac{3}{2}\\ \hphantom{-} 4(x-2) &, \hphantom{-}\frac{3}{2}\leqslant x < 2\\ \qquad 0 &, \hphantom{-} \text{ otherwise.} \end{cases}$$

For $c > 0$, let

$$h_c(x) = c\cdot h(c\cdot x).$$

Then $h_c$ is continuous, and $\int_{-\infty}^0 h_c(x)\,dx = 1$ as well as $\int_{-\infty}^\infty h_c(x)\,dx = 0$. Now let

$$g(x) = \sum_{n=1}^\infty h_{5^n}\left(x-n-\frac{1}{2}\right).$$

Every $g_n(x) = h_{5^n}\left(x-n-\frac12\right)$ vanishes identically outside the interval $[n,n+1]$, so $g$ is continuous, and

$$f(x) = \int_0^x g(t)\,dt$$

is well-defined and continuously differentiable.

Furthermore, $f(x) \equiv 0$ on every interval $\left[n, n+\frac{1}{2} - \frac{2}{5^n}\right]$, and $f(x) \equiv 1$ on every interval $\left[n+\frac{1}{2}-\frac{1}{5^n}, n+\frac{1}{2}+\frac{1}{5^n}\right]$. Thus on

$$X = \bigcup_{n=1}^\infty \left(\left[n, n+\frac{1}{2} - \frac{2}{5^n}\right] \cup \left[n+\frac{1}{2}-\frac{1}{5^n}, n+\frac{1}{2}+\frac{1}{5^n}\right]\right)$$

we have $f' \equiv 0$, so the derivative is bounded, but

$$f\left(n+\frac{1}{2}-\frac{1}{5^n}\right) - f\left(n+\frac{1}{2}-\frac{2}{5^n}\right) = 1$$

for all $n$, while the distance between the two points is $5^{-n}$ which becomes arbitrarily small, so $f$ is not uniformly continuous on $X$.

If the sentence

Note that $X$ cannot be an interval, a disjoint union of intervals, nor can it be a discrete set.

was meant to forbid a construction as above where $X$ is a disjoint union of intervals, we can obey the letter of the law (but not the spirit) by adding an arbitrary subset of $(-\infty,0)$ that is not a union of disjoint intervals.

  • $\begingroup$ Dear Daniel, Thank you for your answer and your clever construction. I wonder if there is a simpler example. Regarding my statement about $X$, I meant to say that it cannot be a finite disjoint union of intervals. $\endgroup$
    – user127542
    Mar 4, 2014 at 0:49
  • $\begingroup$ Your $f'=0$ is nice, but it requires a while to decipher to get there. This is where my mind was headed, but I was trying to get it done with shrinking neighborhoods centered on the peaks of sin waves. I suppose I don't need to constructively define my segments of $X$ though, so my solution below just occurred to me. $\endgroup$ Mar 4, 2014 at 1:57

Let $$f(x)=cos(x^2),\quad \text{and}$$ $$X=\{x:|f'(x)|\le1\}.$$

The function is differentiable everywhere, and oscillates faster and faster to $\pm\infty$, yet keeps attaining $\pm1$ with $f'(x)=0$ at those points. Thus there is a tiny, but nonzero length neighborhood around each peak where the derivative is $-1\le f'(x)\le1$. $X$ is the set of exactly those points.

The peaks are at $x=\pm\sqrt{2k\pi}$ $(k\in\mathbb{Z})$ and the valleys are at $y=\pm\sqrt{(2k+1)\pi}$. Creating sequences out of the peaks and troughs going off to the right from the origin $(n\in \left\{0,1,... \right\})$, we have $$|y_n-x_n|=\left|\sqrt{(2n+1)\pi}-\sqrt{2n\pi}\right|\rightarrow0$$ but $$\left|f(y_n)-f(x_n)\right|=|-1-1|=2$$so by the sequential characterization of uniform continuity, the function is not uniformly continuous on this set.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .