Skip to content

Weierstrass Function

Definition

The Weierstrass function is defined as

f(x)=∑n=1∞ancos⁡(bnx)f(x) = \sum_{n=1}^\infty a^n \cos(b^n x)

where 0<a<10<a<1 and ab>1.ab>1\text{.}

Each summand uses a Trigonometric Functions cosine with increasing frequency. The Infinite Series of Functions converges uniformly (by the Weierstrass MM-test) because ∣ancos⁡(bnx)∣≤an|a^n\cos(b^nx)|\le a^n and the geometric series converges for 0<a<10<a<1.


Interpretation

The Weierstrass function is one of the best-known examples of a function that is continuous everywhere but differentiable nowhere. It shows that continuity, however it is pictured, does not force a graph to have a tangent at even a single point.

A partial sum of the Weierstrass function, a jagged curve, with a small window marked; the zoomed view of the window shows the same roughness.

The figure plots the finite partial sum ∑n=18ancos⁡(bnx)\displaystyle \sum_{n=1}^{8}a^n\cos(b^nx) with a=1/2a=1/2 and b=3b=3. The right panel magnifies the red window and illustrates the repeated roughness; the claim about the infinite limit function is stated above.

With 0<a<10<a<1 and ab>1ab>1, add terms and zoom in: the graph keeps its wiggles at every scale, so it has no tangent anywhere.

The two conditions on aa and bb play opposite roles. The condition 0<a<10<a<1 makes the amplitudes ana^n summable, so the Weierstrass MM-test gives uniform convergence, and the uniform limit of the continuous partial sums is continuous. The condition ab>1ab>1 concerns slopes: the nn-th term has derivative −(ab)nsin⁡(bnx)-(ab)^n\sin(b^nx), so each new term is smaller in height but steeper, and the steepness keeps increasing at ever smaller scales. The terms of the differentiated series reach size (ab)n→∞(ab)^n\to\infty, so that series does not converge uniformly and term-by-term differentiation is not available; this explains why differentiability can fail, although the proof that it fails at every point takes more work. If instead 0<ab<10<ab<1, the derivative series converges uniformly by the MM-test and ff is differentiable.

In Weierstrass's original paper the function is ∑n=1∞ancos⁡(bnπx)\displaystyle \sum_{n=1}^\infty a^n\cos(b^n\pi x) with 0<a<10<a<1, bb a positive odd integer and ab>1+3π2ab>1+\tfrac{3\pi}{2}. Riemann's series ∑n=1∞sin⁡(n2x)/n2\displaystyle \sum_{n=1}^\infty\sin(n^2x)/n^2 is sometimes mentioned in the same context; it is continuous by the same MM-test argument, but it is differentiable at some points, so it is not a nowhere differentiable function.

A common slip is to read the plotted curve as the function itself. Any plot shows a finite partial sum, which is differentiable everywhere; the roughness at every scale belongs only to the infinite sum.


Key Results

  • The Weierstrass function is continuous everywhere as long as 0<a<1.0<a<1\text{.}
  • The Weierstrass function is nowhere differentiable if ab>1.ab>1\text{.}

Examples

  • f(x)=∑n=1∞12ncos⁡(3nx)\displaystyle f(x) = \sum_{n=1}^\infty \frac{1}{2^n} \cos(3^n x) is a particular Weierstrass function.

Prerequisites

Sources

Symbols: infinity, pi, sum

Last updated: 20 October 2026 03:02