On this page
Draw a curve without lifting your pen and you expect a tangent almost everywhere, with corners like |x| at 0 as rare exceptions. Karl Weierstrass showed the exception can be the whole curve. According to his MacTutor biography, "In 1872 his emphasis on rigour led him to discover a function that, although continuous, had no derivative at any point."
What is a continuous but nowhere differentiable function?
A function is continuous at a point when its limit there equals its value, so the graph has no jump or hole. It is differentiable at a point when the slope (f(x + h) − f(x))/h settles to one number as h shrinks to 0. A continuous, nowhere differentiable function passes the first test everywhere and fails the second everywhere. For the strict ε–δ side of continuity, see our explainer on uniform continuity and one δ for every point.
Riemann suggested such a function in 1861, but his example was differentiable at some points (MacTutor). Bernard Bolzano built one around 1831 that stayed unpublished until 1922 (history).
How does the Weierstrass function work?
Weierstrass's original paper defined W(x) = Σ aⁿcos(bⁿπx), summed from n = 0 to infinity, with 0 < a < 1, b a positive odd integer and ab > 1 + 3π/2 (definition and history). G. H. Hardy proved in 1916 that the weaker condition 0 < a < 1 and ab ≥ 1 is enough (Hardy, Transactions of the American Mathematical Society).
It is a cosine series, like the sum in our post on how a Fourier series builds a square wave. Each term is continuous and the heights 1, a, a², ... shrink geometrically, so the sum converges uniformly and stays continuous.
Now plot the partial sums with a = 1/2 and b = 3 (ab = 1.5, which meets Hardy's condition):
One term: cos(πx), a single smooth wave.
Two terms: add (1/2)cos(3πx), half as tall with three times the wiggles.
Nine terms: the newest wave is 1/256 as tall but oscillates 6561 times as fast as the first.
The Hausdorff dimension of the graph, long believed to be 2 + log_b(a), was proved rigorously only in 2018 (same article); for a = 1/2 and b = 3 it is about 1.37.
Why do the slopes blow up at every point?
Differentiate term n: the slope of aⁿcos(bⁿπx) is −π(ab)ⁿsin(bⁿπx), so its steepest slope is π(ab)ⁿ. With ab = 1.5:
n = 0: steepest slope π, about 3.1
n = 5: π × 1.5⁵, about 23.9
n = 20: π × 1.5²⁰, about 10,450
The heights shrink like (1/2)ⁿ while the steepness grows like 1.5ⁿ. As you shrink h in the difference quotient, a new layer of waves takes over at each scale and tips the slope up or down, so it never settles on a number. Hardy's 1916 paper turns this picture into a proof.
What is the Takagi blancmange curve?
Teiji Takagi gave a simpler example in 1903 (Lagarias, The Takagi function and its properties). Swap the cosines for tents: let s(x) be the distance from x to the nearest integer, and set T(x) = Σ s(2ⁿx)/2ⁿ (blancmange curve). Its nowhere differentiability is one of the properties surveyed by Allaart and Kawamura.
Worked example, the slope at 0. At x = 1/2ᵏ, each of the first k terms equals exactly 1/2ᵏ and every later term is 0. So T(1/2ᵏ) = k/2ᵏ, and the chord from the origin has slope k:
h = 1/2: T = 1/2, slope 1
h = 1/8: T = 3/8, slope 3
h = 1/64: T = 6/64, slope 6
As h shrinks the slope grows without limit, so there is no derivative at 0.
You can build the curve by hand with a midpoint rule: on a piece of length 1/2ᵏ with dyadic ends, the midpoint value is the average of the end values plus 1/2ᵏ⁺¹. From T(0) = T(1) = 0 you get T(1/2) = 1/2, T(1/4) = 1/2, T(1/8) = 3/8 and T(3/8) = 5/8. Five rounds on graph paper give 33 points.
What did it teach about intuition and rigour?
A sketch cannot tell you a derivative exists; only the limit definition can. The Cantor set, with length zero yet uncountably many points, teaches the same lesson about length.
A checklist for your own work:
Before using the mean value theorem, check both hypotheses: continuous on [a, b] and differentiable on (a, b). W passes the first and fails the second everywhere.
Test a claim on extreme examples: |x|, x·sin(1/x), then W.
Zoom test: a differentiable graph looks straight under enough zoom; W never does.
If limits, continuity or derivatives still feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson and its place in the map, so you can trace differentiability back to the limit it depends on.



