# Example of uniformly continuous function on R that is not differentiable on all of R

Give an example of a uniformly continuous function $g:\mathbb{R} \rightarrow \mathbb{R}$ that is not diff erentiable on all of $\mathbb{R}$.

Hmm. I can't think creatively enough for one! Would f(x) = |x| on (-1,1) be an example? Certainly not differentiabe, but it if uniformly continuous?

Another one: Give an example of a sequence of continuous functions $f_n: \mathbb{R}\rightarrow \mathbb{R}$ whose pointwise limit $f:\mathbb{R} \rightarrow \mathbb{R}$ exists, but is discontinuous.

• For the second one consider $f_n=x^n$ on $[0,1]$. At $x=1$ the limit jumps to 1, from being zero everywhere else in the interval. – mathemagician Dec 15 '13 at 2:45

The Weierstrass function is the standard example. It is continuous and periodic, hence uniformly continuous.

$f(x) = |x|$ is uniformly continuous on $\mathbb R$ (for example because it is Lipschitz), but it is also differentiable everywhere but at 0, so it's not an example of a function that is (not differentiable) on all of $\mathbb R$.

It is, however, an example of a function that is not (differentiable on all of $\mathbb R$).

• Ah, sorry did not see your answer before posting. I think the OP may have meant that there are points in $\mathbb R$ where $f$ is not differentiable. – DBFdalwayse Dec 15 '13 at 3:00
• @DBFdalwayse: Hm, yes, it is ambiguously phrased in the question. – Henning Makholm Dec 15 '13 at 3:10

I am going to assume that you meant that the function is clearly not differentiable at $0$ but were not sure if it is uniformly continuous on the interval.

A special case of the Heine-Cantor theorem states that if a function $f: {R} \rightarrow{R}$ is continuous on $[a, b]$ then $f$ is uniformly continuous on $[a, b]$. Since it is sufficiently clear that $f(x) = |x|$ is continuous on $[-1, 1]$ (if not, it is not too difficult to prove), we know that it must also be uniformly continuous on $[-1, 1]$. Since $f$ is uniformly continuous on $[-1, 1]$, then $f$ is also uniformly continuous on $(-1,1)$, meaning that your example is indeed good.

I wish I could be of more help for your second question, but if I come up with an answer I will edit it in.

Actually, by some measure, most functions are continuous but nowhere-differentiable. Take any continuous , nowhere-differentiable function on $[0,1]$ and extend it periodically to all of $\mathbb R$.