Everywhere Continuous Non-differentiable Function

Weierstrass introduced a shocking idea in 1872. There exist functions that are continuous everywhere but differentiable nowhere. Not just at a few points. At no points whatsoever.

This was a direct attack on mathematical intuition. Before Weierstrass, most mathematicians assumed that continuous functions were “smooth” except at isolated trouble spots. Weierstrass proved them wrong with a concrete counterexample.

The Weierstrass Function

The function is defined as an infinite series:

$$f(x) = \sum_{n=0}^{\infty} b^n \cos(a^n \pi x) \tag{1}$$

Written out explicitly:

$$f(x) = \cos(\pi x) + b\cos(a\pi x) + b^2\cos(a^2\pi x) + b^3\cos(a^3\pi x) + \ldots$$

The parameters must satisfy three conditions:

  • \( a \) is an odd positive integer
  • \( 0 < b < 1 \)
  • \( ab > 1 + \frac{3}{2}\pi \)

Under these conditions, \( f(x) \) is continuous for all \( x \) but has no finite derivative at any point.

A common example uses \( a = 21 \) and \( b = 0.5 \). The resulting function looks like a jagged, self-similar fractal curve.

Why the Function Is Continuous

The continuity proof is straightforward. Each term in the series is bounded:

$$|b^n \cos(a^n \pi x)| \leq b^n$$

Since \( 0 < b < 1 \), the series \( \sum b^n \) is a convergent geometric series.

By the Weierstrass M-Test for uniform convergence, the series in equation (1) converges uniformly on every interval. A uniformly convergent series of continuous functions is itself continuous.

So \( f(x) \) is continuous everywhere. No surprises here.

Why the Function Is Nowhere Differentiable

This is the hard part. We need to show that the difference quotient

$$\frac{f(x+h) – f(x)}{h}$$

has no finite limit as \( h \to 0 \) for any value of \( x \).

The difference quotient expands to:

$$\frac{f(x+h) – f(x)}{h} = \sum_{n=0}^{\infty} b^n \frac{\cos[a^n\pi(x+h)] – \cos(a^n\pi x)}{h} \tag{2}$$

We split this into two parts. Let \( S_m \) be the sum of the first \( m \) terms. Let \( R_m \) be the remainder after \( m \) terms.

Bounding the First m Terms

Using the Mean Value Theorem on each cosine term:

$$\frac{|\cos[a^n\pi(x+h)] – \cos(a^n\pi x)|}{|h|} \leq a^n\pi$$

So the partial sum satisfies:

$$|S_m| \leq \sum_{n=0}^{m-1} b^n a^n \pi = \pi \frac{(ab)^m – 1}{ab – 1} < \frac{\pi(ab)^m}{ab – 1}$$

This gives us an upper bound on \( |S_m| \).

The Remainder Term Blows Up

Here’s the clever part. We choose \( h \) strategically to make \( R_m \) large.

Write \( a^m x = \alpha_m + \xi_m \), where \( \alpha_m \) is the nearest integer to \( a^m x \) and \( -\frac{1}{2} \leq \xi_m < \frac{1}{2} \).

Choose \( h \) so that:

$$h = \frac{1 – \xi_m}{a^m} \tag{3}$$

As \( m \to \infty \), this \( h \to 0 \). But with this specific choice, the remainder term satisfies:

$$|R_m| > \frac{2(ab)^m}{3} \tag{4}$$

The Punchline

Combining our bounds on \( S_m \) and \( R_m \):

$$\left|\frac{f(x+h) – f(x)}{h}\right| = |R_m + S_m| \geq |R_m| – |S_m| > \left(\frac{2}{3} – \frac{\pi}{ab-1}\right)(ab)^m$$

Since \( ab > 1 + \frac{3}{2}\pi \), the coefficient \( \left(\frac{2}{3} – \frac{\pi}{ab-1}\right) \) is positive.

As \( m \to \infty \), the term \( (ab)^m \to \infty \).

So the difference quotient grows without bound. The limit doesn’t exist. The derivative \( f'(x) \) doesn’t exist at any point \( x \). ∎

Key Takeaways

  • The Weierstrass function is continuous everywhere but differentiable nowhere. It’s the canonical example of a “pathological” function.
  • Uniform convergence guarantees continuity. But the high-frequency oscillations (controlled by \( a^n \)) prevent any tangent line from existing.
  • G.H. Hardy later proved that non-differentiability holds for the weaker condition \( ab \geq 1 \), not just \( ab > 1 + \frac{3}{2}\pi \).
  • The function is fractal-like. It has the same jagged structure at every scale, which is why no tangent line can ever “catch” it.

Frequently Asked Questions

What is the Weierstrass function?

The Weierstrass function is an infinite series f(x) = Σ bⁿcos(aⁿπx) where a is an odd integer, 0 < b 1 + 3π/2. It’s the first published example of a function that is continuous everywhere but differentiable nowhere. Karl Weierstrass presented it in 1872.

How can a function be continuous but not differentiable?

Continuity only requires that small changes in x produce small changes in f(x). Differentiability requires a well-defined tangent line, meaning the function must be “smooth” at that point. The Weierstrass function oscillates infinitely fast at every scale, so while nearby points stay close (continuous), no tangent line can ever approximate the curve.

Why was the Weierstrass function controversial?

Before 1872, mathematicians assumed continuous functions were differentiable except at isolated “corner” points. The Weierstrass function shattered this intuition. Some mathematicians, including Charles Hermite, called it a “monster.” It forced a complete rethinking of what functions could look like and led to more rigorous foundations for analysis.

What is the Weierstrass M-test?

The M-test provides a sufficient condition for uniform convergence. If |fₙ(x)| ≤ Mₙ for all x, and ΣMₙ converges, then Σfₙ(x) converges uniformly. In the Weierstrass function, each term is bounded by bⁿ, and Σbⁿ converges since b < 1. This proves uniform convergence and hence continuity.

What values of a and b actually work?

The original conditions require a to be an odd integer, 0 < b 1 + 3π/2 ≈ 5.71. So a = 7 and b = 0.9 works (ab = 6.3). Hardy later showed that ab ≥ 1 is sufficient for non-differentiability, expanding the valid parameter range significantly.

Is the Weierstrass function a fractal?

Yes, in a sense. The Weierstrass function exhibits self-similarity: zooming in on any portion reveals the same jagged structure at smaller scales. The graph has a fractal dimension between 1 and 2. This self-similarity at all scales is precisely what prevents any tangent line from existing.

Who was Karl Weierstrass?

Karl Weierstrass (1815-1897) was a German mathematician often called the “father of modern analysis.” He brought unprecedented rigor to calculus, formalizing limits, continuity, and convergence. Beyond the nowhere-differentiable function, he’s known for the Weierstrass approximation theorem and foundational work on elliptic functions.

Are there other nowhere-differentiable continuous functions?

Yes, infinitely many. The Blancmange curve, the Takagi function, and sample paths of Brownian motion are all continuous but nowhere differentiable. In fact, “most” continuous functions are nowhere differentiable in a precise mathematical sense (the differentiable ones form a meager set in the space of continuous functions).

Why does the parameter a need to be odd?

The oddness of a is used in the proof when analyzing how cosine terms behave at carefully chosen points. When a is odd, certain cosine expressions simplify to ±1 in predictable ways. Later generalizations relaxed this requirement, but Weierstrass’s original proof specifically exploited this property.

Does the Weierstrass function have any practical applications?

The function itself is mainly a theoretical tool. But the mathematics behind it applies to real phenomena: Brownian motion (stock prices, particle diffusion), coastline measurements, and rough surfaces all exhibit similar “nowhere smooth” behavior. Understanding pathological functions helps mathematicians handle irregular real-world processes.