Open any calculus book and you will find a discussion about how differentiability implies continuity, but continuity does not imply differentiability. The absolute value function is the standard example of a continuous function that is not differentiable (at ).

The inquisitive student may ask: how bad can continuous, nondifferentiable functions get? Can we make a function nondifferentiable at an infinitely many points? At a dense collection of points? At every point?

This is the topic in the Real Analysis class I’m teaching right now. Surprisingly, there are functions that are continuous everywhere, but differentiable nowhere! More surprisingly, it is possible to give an explicit formula for such a function.

Weierstrass was the first to publish an example of such a function (1872). It appears that Bolzano had an example as early as 1830, but it wasn’t published until much later.

The example I gave in class is called the Blancmange function (and the graph is called the Takagi fractal curve).

Let be the sawtooth function equal to on and repeated periodically elsewhere.

Let .

Then , the graph of which is shown below, is a continuous and nowhere differentiable. I created a Geogebra applet to help the students visualize the construction of this function.

Although this seems like a crazy example, it turns out that most continuous functions are nowhere differentiable (there is a technical meaning for “most”). The nice functions that we see every day in our calculus classes are rare.

### Like this:

Like Loading...

*Related*

The applet is great!

Another interesting example arises when the series is made alternating:

f(x)=h_0(x)-h_1(x)+h_2(x)-h_3(x)+\cdots

I did not try to prove that f is nowhere differentiable, but since its graph is nowhere rectifiable, chances are that it is. However, the graph of f does not contain any cusps that are prominent in the graph of g. Formally, the oscillation of f on any interval [a,b] does not exceed C*|f(a)-f(b)|, where C is a universal constant. Geometrically, this means that the graph of f is a quasi-arc.

Inspired by your applet, I created a similar one for the alternating series (linked).

By:

Leonid Kovalevon December 2, 2009at 3:49 pm

Beautiful! Thank you for sharing your modified version of the function. I like it very much.

By:

Dave Richesonon December 2, 2009at 6:02 pm

Glad you liked it!. A correction to what I wrote: the oscillation of f on any interval [a,b] does not exceed C*(|a-b|+|f(a)-f(b)|).

By:

Leonid Kovalevon December 2, 2009at 6:08 pm

nice.

Your graph has a suspiciously straight section at around x =0.7

By:

drj11on December 2, 2009at 4:49 pm

I noticed that there are a few weird spots on it. I don’t think it is my fault… I’ll blame Geogebra :-)

By:

Dave Richesonon December 2, 2009at 6:03 pm

There’s a Facebook app called “what mathematical function are you?” And if you answer with all the most sociopathic, disturbed responses, it tells you you are a Weierstrass function. That thing is UGly.

I was a tangent function. I don’t remember why and excuse me, I just saw something shiny.

By:

Kate Nowakon December 2, 2009at 5:57 pm

Excellent! I’d try it out, but I’m terrified of Facebook apps. I have this irrational fear that when I do one quiz, some unknown app-writer will suddenly start browsing photos of my kids… (What kind of function does that make ME?)

By:

Dave Richesonon December 2, 2009at 6:06 pm

[...] The existence of a continuous nowhere differentiable function [...]

By:

Mathematical surprises « Division by Zeroon August 18, 2010at 1:10 pm

How about “R(x) = 1 if x is rational and 0 otherwise”?

By:

Kumaron September 17, 2010at 6:53 am

That function would be nowhere continuous (and hence nowhere differentiable).

By:

Dave Richesonon September 17, 2010at 8:38 am