A function is continuous if small changes in input produce small changes in output. A function is differentiable if, at every point, there is a well-defined tangent line — a linear approximation that agrees with the function to first order. Throughout the 19th century, mathematicians took it for granted that every continuous function is differentiable at most points. André-Marie Ampère claimed to have proved this in 1806 (his “proof” was wrong, but went uncontested for decades). Continuous functions were imagined as smooth curves; differentiability was understood as the rule rather than the exception.
In 1872, Karl Weierstrass shattered this assumption. He constructed an explicit continuous function that is differentiable at no point at all — not at a few exceptional points, not on a small set, but nowhere. The function looks like a smooth curve at low resolution but reveals more and more wiggles at every scale of magnification. There is no smoothing of the curve, anywhere, at any zoom level. The construction is short, the proof is elementary, and the consequences were profound: an entire branch of analysis had to be rebuilt to accommodate the existence of such functions.
This article is about the Weierstrass function, why it works, and what it ultimately taught mathematics about the boundary between continuity and smoothness.
The construction
Weierstrass’s recipe is a series:
where and is a positive odd integer with in Weierstrass’s original conditions. (Modern arguments work for any and with .)
Each term is a cosine wave: the -th term has amplitude and frequency , so it oscillates faster and faster as grows, but with smaller and smaller amplitude. The series converges uniformly because converges (a geometric series with ratio ), so the function is the uniform limit of partial sums and is therefore continuous.
What makes the function bizarre is what happens to its slope. The derivative of the -th term is . The amplitude is , and because , this amplitude grows with . The high-frequency terms have small absolute size but enormous slope. As you zoom into the function at finer scales, the dominant contribution to the local slope comes from terms with large — terms whose slopes are arbitrarily large.
This is the heart of the pathology: the function is bounded (because the amplitudes decay), but its slopes are unbounded at every scale. At no point can the function be approximated to first order by a single linear function, because the slope at fine scales is dominated by oscillations rather than by a stable tangent.
A picture of growing complexity
The figure below shows three partial sums of the Weierstrass function with , :
- Left: the single first term, — a smooth cosine curve.
- Middle: three terms — a wavy curve with visible higher-frequency wiggles.
- Right: eight terms — a curve that already looks jagged at every visible scale.
The infinite sum continues this process indefinitely: every additional term adds higher-frequency oscillations of smaller amplitude, and the limit curve is never smooth at any point.
The picture conveys what no description in words can quite capture. At , the function is the smooth cosine , differentiable everywhere. At , it already has visible higher-frequency structure. At , the curve looks jagged at every visible scale — and the infinite limit takes this to the extreme, with no smooth tangent at any point.
Why the function is not differentiable
The full proof of non-differentiability is technical, but the intuition is clean. To say is differentiable at a point means
exists. Weierstrass showed that this limit does not exist at any . The reason: at any scale , the difference quotient is dominated by the cosine term whose frequency corresponds roughly to — the term whose period matches the resolution . The amplitude of that term’s slope is roughly , which grows without bound as (since ). Different choices of make different dominant, and the difference quotients oscillate wildly as , never settling on a single value.
The precise version of this argument uses careful cancellation between terms, which is where Weierstrass’s condition comes in. The condition has been weakened by subsequent mathematicians (notably Hardy in 1916, who showed is enough), but the spirit of the argument remains the same.
What it taught analysis
The Weierstrass function forced a reconsideration of what continuous and differentiable really meant. Before 1872, the two concepts were treated as essentially the same thing for practical purposes. After 1872, mathematicians had to distinguish carefully between them, and the distinction turned out to drive much of modern analysis.
Smoothness classes. Analysts now distinguish carefully among classes of functions: (merely continuous), (continuously differentiable), (continuously -times differentiable), and (smooth). The Weierstrass function is in but not in . Sobolev spaces, Hölder spaces, and many other refined classes were developed in part to handle objects of intermediate smoothness.
Fractal geometry. Mandelbrot’s 1970s development of fractal geometry was, in part, an attempt to unify the geometric properties of objects like the Weierstrass function with the patterns observed in nature (coastlines, mountains, blood vessels). The Hausdorff dimension of the graph of the Weierstrass function is strictly between and , and the explicit calculation depends on and .
Brownian motion. The mathematical model of Brownian motion (the random walks of particles in a fluid) has paths that are continuous everywhere and differentiable nowhere — with probability one. The Weierstrass function is, in many respects, a deterministic precursor of the random functions of probability theory. Modern stochastic analysis and the Itô calculus are designed precisely to do analysis on functions of this kind.
Rigorous analysis. The Weierstrass function is one of the canonical motivations for the rigorous treatment of analysis that took hold in the late 19th century. Cauchy’s earlier proofs of continuity and differentiability had relied on intuition that the Weierstrass function violated; the move to fully rigorous epsilon-delta arguments was, in part, a response to such counterexamples. The Bolzano–Weierstrass theorem, the Heine–Borel theorem, and the careful axiomatic foundations of real analysis were all developed in this era.
A pathology that became normal
The Weierstrass function was, in 1872, a shocking pathology. A century and a half later, it is barely a curiosity — its existence is taken for granted, and the rough functions it heralded (Brownian motion, fractals, Hölder-continuous functions of low regularity) are central objects of modern mathematics and physics.
This is one of the most common patterns in the history of mathematics. A counterexample appears that violates the prevailing intuition. The community is shocked. The foundations are rebuilt. A generation later, the counterexample is normal, and the new foundations are taken for granted. The work it did — forcing more careful definitions, sharper distinctions, and a broader conception of what “function” can mean — is the lasting legacy.
What Weierstrass really gave us was not just one strange function, but a new awareness: that the geometric intuition of curves, however useful, is not the whole story of what continuity means. The mathematical world is bigger than the intuitive one, and continuous functions are wilder than the everyday smooth curves suggest. A single short paper from a Berlin lecture hall, published in 1872 by an algebraist who never wanted to be famous, changed the way mathematicians thought about smoothness forever.
Frequently asked
Why was the Weierstrass function so shocking?
Because the standard intuition of the time — held by mathematicians as eminent as André-Marie Ampère — was that a continuous function must be differentiable at 'most' points. Ampère had even published a 'proof' of this in 1806; the proof was wrong but went uncontested for decades. Continuous functions were imagined as curves you could draw — and at any point, you could in principle draw a tangent line. Weierstrass showed in 1872 that this is false: there exist continuous functions for which no tangent exists at any point at all.
What is the construction?
Weierstrass's function is f(x) = Σ a^n cos(b^n π x) for n = 0, 1, 2, ..., where 0 < a < 1 and ab is large enough (greater than 1 + 3π/2 in his original paper; the modern weakening is ab ≥ 1). The series converges uniformly (because Σ a^n converges absolutely), so f is continuous. But each term oscillates faster than the previous by a factor of b, and the oscillations are large enough to prevent any tangent from forming at any point.
What is the connection to fractals?
The Weierstrass function is the prototypical self-similar curve and a foundational example for fractal geometry. Its graph has Hausdorff dimension strictly between 1 and 2 — it is too jagged to be a simple curve but too thin to fill an area. Modern fractal geometry was developed in the 1970s by Benoit Mandelbrot, partly to give a unified language for objects like the Weierstrass function. The curve has now become a standard test case in the theory of dimension and self-similarity.
Where do such functions show up in nature?
Brownian motion paths — the trajectories of pollen grains in water, or more generally of any particle subject to random molecular bombardment — are continuous everywhere and differentiable nowhere, with probability one. Stock price charts approximated by random walks have the same property. Lightning bolt outlines, river meanders, coastline curves, and many other natural shapes are 'rough' in essentially the Weierstrass sense, with no well-defined tangent direction at any scale. The mathematical pathology of 1872 turned out to be a common feature of the physical world.