# A Continuous, Nowhere Differentiable Function: Part 2

Common Topics: function, fourier, series, continuous, differentiable

This is Part 2 of a series of articles in which the goal is to exhibit a continuous function that is nowhere differentiable and to explore some interesting properties of a special type of Fourier series.

In Part 1, we defined the Weierstrass function,

$$w(x) = \sum_{k=0}^{\infty}\alpha^k \cos(\beta^k)$$

We showed that the series is absolutely and uniformly convergent, so ##w## is a continuous function. We also showed that the radius of convergence is ##1##, which is a necessary (but not sufficient) condition for the function to be non-smooth. In this post, we will continue working toward proving that in fact, ##w## is nowhere differentiable, provided that the condition ##\alpha \beta > 1## is satisfied.

To do this, we will identify a condition that must be satisfied by the Fourier series of a continuous function that is differentiable at a point ##x_0##, and we will show that the Weierstrass function does not satisfy this condition, hence it is nowhere differentiable.

The general form for the Fourier series of a ##2\pi##-periodic function ##f## is

$$f(x) = \sum_{n = -\infty}^{\infty}c_n e^{inx}$$

where convergence is understood to mean that the sequence of symmetric partial sums

$$f_N(x) = \sum_{n = -N}^{N} c_n e^{inx}$$

satisfies

$$\lim_{N \to \infty}f_n(x) = f(x)$$

for every ##x##. In the special case where ##f## is real and even, the partial sums can be rewritten as

$$f_N(x) = c_0 + \sum_{n=1}^{N} c_n(e^{inx} + e^{-inx}) = c_0 + \sum_{n=1}^{N} (2c_n) \cos(nx) = \sum_{n = 0}^{N} a_n \cos(nx)$$

where

$$a_n = \begin{cases} c_n & \text{if }n = 0 \\ 2c_n & \text{otherwise} \\ \end{cases}$$

In general, it’s hard to find useful conditions which must be satisfied by the sequence ##f_N## when ##f## is an arbitrary continuous function; indeed, one can construct a continuous functions whose Fourier series diverges at some or even infinitely many points. (That’s a subject for another blog post!)

However, by a technique called Cesàro summation, we can obtain a more well-behaved sequence of functions which always converges to ##f## in a controlled way which can be quantified.  To do this, let’s define

$$\overline{f}_N(x) = \frac{1}{N}\sum_{k=0}^{N-1}f_k(x) = \frac{1}{N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k}c_n e^{inx}$$

In other words, we form a sequence ##(\overline{f}_n)## where the ##N##’th term is the average of the first ##N## partial sums of the Fourier series of ##f##. Examining the rightmost expression, we see that ##\overline{f}_N## sums a total of ##N## copies of ##c_0 e^{i0x} = c_0##, and ##N-1## copies of ##c_1 e^{i1x}## and ##c_{-1}e^{-i1x}##, and in general, ##N – |n|## copies of ##c_n e^{inx}##. Therefore, an equivalent way to express ##\overline{f}_N(x)## is

$$\overline{f}_N(x) = \frac{1}{N}\sum_{n=-N}^{N}(N-|n|)c_n e^{inx} = \sum_{n=-N}^{N}\left(1 – \frac{|n|}{N}\right)c_n e^{inx}$$

This shows that ##\overline{f}_N## is formed from the terms of the Fourier series by first weighting the Fourier coefficients ##(c_n)## by the triangular sequence

$$t_n = \begin{cases}1 – \frac{|n|}{N} & \text{if }|n| < N \\ 0 & \text{otherwise} \\ \end{cases}$$

This reduction of the influence of the higher-frequency terms is what allows the better convergence properties. In particular, we will prove the following.

### Theorem 1.

If ##f## is a continuous function which is differentiable at ##x_0##, then the sequence of Cesàro sums ##\overline{f}_N(x)## of its Fourier series satisfies

$$\limsup_{N \to \infty} \frac{|\overline{f}’_N(x)|}{\log N} < \infty$$

where ##\overline{f}’_N## is the derivative of ##\overline{f}_N##.

We will then show that the Weierstrass function ##w## does not satisfy this condition at any point ##x_0##, and therefore is nowhere differentiable.

The key to proving Theorem 1 is the following characterization of the Cesàro sum:

### Lemma 2.

If ##f## is a continuous, ##2\pi##-periodic function, then

$$\overline{f}_N(x) = \int_{-\pi}^{\pi} K_N(u)f(x-u) du = \int_{-\pi}^{\pi} K_N(x-u)f(u) du$$

where

$$K_N(x) = \frac{1}{N}\left(\frac{\sin\frac{Nx}{2}}{\sin\frac{x}{2}}\right)^2$$

is called the ##N##’th Fejér kernel. The equivalent expressions ##\int_{-\pi}^{\pi} K_N(u)f(x-u) du = \int_{-\pi}^{\pi} K_N(x-u)f(u) du## are called the convolution of ##K_N## and ##f##, which is often written as ##K_N \ast f = f \ast K_N##.

#### Proof of Lemma 2:

The Fourier coefficient ##c_n## is

$$c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x) e^{-inx} dx$$

Therefore,

\begin{aligned} \overline{f}_N(x) &= \frac{1}{N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k}c_n e^{inx} \\ &= \frac{1}{2\pi N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k}\left(\int_{-\pi}^{\pi}f(u)e^{-inu}du\right) e^{inx}\\ &= \frac{1}{2\pi N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k} \left( \int_{-\pi}^{\pi} f(u) e^{in(x-u)}du\right) \\ &= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(u) \left(\frac{1}{N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k} e^{in(x-u)}\right) du \\ \end{aligned}

So it suffices to show that

$$K_N(x) = \frac{1}{N}\sum_{k=0}^{N-1} \sum_{n=-k}^{k} e^{inx}$$

Now, ##\sum_{n=-k}^{k} e^{inx} =1 + 2\sum_{n=1}^{k} \cos(nx)##. Multiply both sides by ##\sin(x/2)## and apply the trig identity ##\sin(a)\cos(b) = \frac{1}{2}[\sin(a+b) + \sin(a-b)]## on the right hand side. The sum telescopes, and the right hand side reduces to ##\sin((k+1/2)x)##. This yields the identity

$$\sin(x/2)\sum_{n=-k}^{k} e^{inx} = \sin((k+1/2)x)$$

Summing both sides from ##k=0## to ##N-1##, we have

$$\sin(x/2)\sum_{k=0}^{N-1} \sum_{n=-k}^{k} e^{inx} = \sum_{k=0}^{N-1}\sin((k+1/2)x)$$

Again multiply both sides by ##\sin(x/2)##, and apply the trig identity ##\sin(a)\sin(b) = \frac{1}{2}[\cos(a-b) – \cos(a+b)]## on the right hand side. The sum telescopes again, leaving us with

$$\sin^2(x/2) \sum_{k=0}^{N-1} \sum_{n=-k}^{k} e^{inx} = \frac{1}{2}(1 – \cos(Nx)) = \sin^2(Nx/2)$$

Dividing both sides by ##\sin^2(x/2)## gives us the desired result. ##\square##

We will apply Lemma 2 to complete the proof of Theorem 1 in the next post.

2 replies
1. zwierz says:

note also that the set of differentiable at least at one point functions has the first Baire category in ##C[a,b]##. This fact is much simpler to prove than to find nowhere differentiable function explicitly. So that in some sense the set of differentiable functions is very small in ##C[a,b]##

2. Greg Bernhardt says:

Nice jbunniii! Looking forward to part 3!