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:

f(x)  =  n=0ancos(bnπx),f(x) \;=\; \sum_{n=0}^{\infty} a^n \cos(b^n \pi x),

where 0<a<10 < a < 1 and bb is a positive odd integer with ab>1+3π2ab > 1 + \tfrac{3\pi}{2} in Weierstrass’s original conditions. (Modern arguments work for any aa and bb with ab1ab \geq 1.)

Each term is a cosine wave: the nn-th term has amplitude ana^n and frequency bnb^n, so it oscillates faster and faster as nn grows, but with smaller and smaller amplitude. The series converges uniformly because an\sum a^n converges (a geometric series with ratio a<1a < 1), so the function ff 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 nn-th term is anbnπsin(bnπx)-a^n b^n \pi \sin(b^n \pi x). The amplitude is anbnπ=(ab)nπa^n b^n \pi = (ab)^n \pi, and because ab>1ab > 1, this amplitude grows with nn. 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 nn — terms whose slopes are arbitrarily large.

This is the heart of the pathology: the function is bounded (because the amplitudes ana^n 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 a=1/2a = 1/2, b=5b = 5:

  • Left: the single first term, cos(πx)\cos(\pi x) — 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.

Partial sums of the Weierstrass function with a = 1/2, b = 5 N = 1 term N = 3 terms N = 8 terms each new term adds higher-frequency, lower-amplitude oscillations; the limit has wiggles at every scale

The picture conveys what no description in words can quite capture. At N=1N = 1, the function is the smooth cosine cos(πx)\cos(\pi x), differentiable everywhere. At N=3N = 3, it already has visible higher-frequency structure. At N=8N = 8, 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 ff is differentiable at a point x0x_0 means

limh0f(x0+h)f(x0)h\lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}

exists. Weierstrass showed that this limit does not exist at any x0x_0. The reason: at any scale hh, the difference quotient is dominated by the cosine term whose frequency bnb^n corresponds roughly to h1h^{-1} — the term whose period matches the resolution hh. The amplitude of that term’s slope is roughly (ab)n(ab)^n, which grows without bound as nn \to \infty (since ab>1ab > 1). Different choices of hh make different nn dominant, and the difference quotients oscillate wildly as h0h \to 0, never settling on a single value.

The precise version of this argument uses careful cancellation between terms, which is where Weierstrass’s condition ab>1+3π2ab > 1 + \tfrac{3\pi}{2} comes in. The condition has been weakened by subsequent mathematicians (notably Hardy in 1916, who showed ab1ab \geq 1 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: C0C^0 (merely continuous), C1C^1 (continuously differentiable), CkC^k (continuously kk-times differentiable), and CC^\infty (smooth). The Weierstrass function is in C0C^0 but not in C1C^1. 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 11 and 22, and the explicit calculation depends on aa and bb.

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.