# Globally differentiable non-Lipschitz function that is uniformly continuous?

Is there a uniformly continuous function $f$ from $\mathbb{R} \to \mathbb{R}$ such that $f$ is differentiable everywhere, but $f$ is not globally Lipschitz?

The only non-Lipschitz uniformly continuous functions I can come up with are not differentiable everywhere (like $\sqrt{\vert x \vert}$)

• $$f(x) = \begin{cases} 0 &, x = 0 \\ x^2 \sin \frac{1}{x^3} &, x \neq 0\end{cases}$$ – Daniel Fischer Feb 16 '16 at 21:33
• I don't think your $f$ is uniformly continuous on $\mathbb{R}$. – bartgol Feb 16 '16 at 21:38
• @bartgol Why? It's continuous on $\mathbb R$ and $\to 0$ at $\pm \infty.$ – zhw. Feb 16 '16 at 21:52
• Oh, right, I did not see right away it goes to 0 at $\infty$. My bad. – bartgol Feb 17 '16 at 4:02

Hint: Every continuous function $f$ on $\mathbb R$ such that $f \to 0$ at $\pm \infty$ is uniformly continuous on $\mathbb R.$ This still allows for $f'$ to be unbounded, and if that holds, then $f$ is not globally Lipschitz.
• Correct. Graphically, one could take something "nice" like $1/(1+x^2)$ and make smooth spikes of amplitude $1/n$ and width $1/n^2$ at every natural number (or any countable set of points). Incidentally, this is also an example of how a $C^\infty$ function approaching 0 at infinity need not have a derivative that approaches zero. – bartgol Feb 16 '16 at 21:41
• $\sin(e^x)/(1+x^2)$ also comes to mind. – zhw. Feb 16 '16 at 21:51