Continuous functions nowhere differentiable.

Continuous functions nowhere differentiable.
In 1872 Weierstrass showed that there exist continuous functions that are
nowhere differentiable. Such a function can be constructed out of infinitely
many translates of |x| , a function which is not differentiable at the origin.
Note that this example is not due to Weierstrass, for that, go to the end.
On [0, 1] let
g0 (x) =
This can be written as
x
if 0 ≤ x ≤ 0.5,
1 − x if 0.5 ≤ x ≤ 1.
1 g0 (x) = − x −
2
1 .
2
Graph of g0 :
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
0.8
1.0
Next define g1 on R by demanding that g1 (x + m) = g0 (x) for all x ∈
[0, 1] and m ∈ Z, so g1 now has period 1. This can be written as
1 1 g1 (x) = − x − [x] − 2
2
where [x] is the largest integer n ≤ x.
1
Graph of g1 :
0.5
0.4
0.3
0.2
0.1
-3
-2
-1
1
2
3
4
Then for any n ≥ 1 let
gn (x) =
g1 (4n−1 x)
.
4n−1
Note that the period of gn is 1/4n−1 . Finally define
g (x) =
∞
X
gn (x) =
∞
X
g1 (4n−1 x)
n=1
n=1
4n−1
for x ∈ R.
Graph of g1 + g2 on [0, 1] :
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
2
0.8
1.0
Graph of g1 + g2 + g3 on [0, 1] :
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
0.8
1.0
0.8
1.0
0.8
1.0
Graph of g1 + g2 + g3 + g4 on [0, 1] :
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
Graph of g1 + g2 + g3 + g4 + g5 on [0, 1] :
0.5
0.4
0.3
0.2
0.1
0.2
0.4
0.6
3
There is no point in drawing the sum with more terms, for the additional
terms would give a contribution smaller than the width of the line used to
draw these graphs. Thus the graph would look identical to the last one above.
Because |gn (x)| ≤ 2/4n for all x, a comparison test will give that g (x) is
defined for all x. But we have to do more if we hope to say that “the infinite
sum of continuous functions is continuous”. For this you have to use the
Weierstrass M-test and I leave it to the interested student to look this up.
One interesting property of g (x) is that it is nowhere monotonic. That
is, there is no point a ∈ R which is contained in some interval (a − δ, a + δ)
on which g is monotonic. In other words, for all a ∈ R and all δ > 0 there
exist x, y ∈ (a − δ, a + δ) with x > y and g (x) > g (y) and there exist
x0 , y 0 ∈ (a − δ, a + δ) with x0 > y 0 and g (x0 ) < g (y 0 ). We do not prove this
here. We do, instead, prove
Theorem
The function g is nowhere differentiable on R.
Proof Let a ∈ R be given. Let n ≥ 1.
Claim There exists hn (depending on a as well as n) such that
|hn | =
1
4n
and |gn (a + hn ) − gn (a)| = |hn | .
Proof of Claim Since we require |hn | = 1/4n , we must have hn = ±1/4n
with the sign to be chosen. Write 4n−1 a = q + r. Then
4n−1 (a + hn ) = 4n−1 a ± 41n = q + r ± 41
where the sign in ± is to be chosen.
If 0 ≤ r <
1
4
choose hn =
and, since 0 < r +
if 14 ≤ r <
1
2
3
4
1
4
so 4n−1 (a + hn ) = q + r +
1
4
< 21 , we have g1 4n−1 (a + hn ) = r + 41 ,
choose hn = − 41n , so 4n−1 (a + hn ) = q + r −
and, since 0 < r −
if 12 ≤ r <
1
,
4n
choose hn =
and, since
1
2
<r+
1
4
< 12 , we have g1 4n−1 (a + hn ) = r − 41 ,
1
,
4n
1
4
so 4n−1 (a + hn ) = q + r +
1
4
< 1, we have g1 4n−1 (a + hn ) = 1 − r + 41 ,
if 34 ≤ r < 1 choose hn = − 41n , so 4n−1 (a + hn ) = q + r −
and, since
1
2
<r−
1
4
1
4
1
4
< 1, we have g1 4n−1 (a + hn ) = 1 − r − 41 ,
4
Thus, with these choices of hn , we have
If 0 ≤ r < 14 then g1 4n−1 a = r so g1 4n−1 (a + hn ) − g1 4n−1 a = 41 ,
if 14 ≤ r < 21 then g1 4n−1 a = r so g1 4n−1 (a + hn ) − g1 4n−1 a = − 41 ,
if 12 ≤ r < 43 then g1 4n−1 a = 1 − r so g1 4n−1 (a + hn ) − g1 4n−1 a = − 14 ,
if 34 ≤ r < 1 then g1 4n−1 a = 1 − r so g1 4n−1 (a + hn ) − g1 4n−1 a = 41 .
Thus in all cases we have
g1 4n−1 (a + hn ) − g1 4n−1 a = 1 .
4
Hence
1 n−1
n−1
g
4
(a
+
h
)
−
g
4
a
1
n
1
4n−1
1
1
1
= n−1 × = n = |hn |
4
4
4
|gn (a + hn ) − gn (a)| =
as required.
Note that if above we choose any h0n with |h0n | ≤ |hn | but with the same sign
then the proof above shows that
g1 4n−1 (a + h0n ) − g1 4n−1 a = 4n−1 |h0n |
and thus
|gn (a + h0n ) − gn (a)| = |h0n | .
Claim With the choice of hn above we have
|hn | if m ≤ n
|gm (a + hn ) − gm (a)| =
0 if m > n.
Proof of Claim Assume m > n. Then
g1 4m−1 (a + hn )
1
= 4m−1
g1 4m−1 a ± 41n
gm (a + hn ) =
1
4m−1
since hn = ±1/4n for some choice of the sign,
1
= 4m−1
g1 4m−1 a ± 4m−n−1
1
= 4m−1
g1 4m−1 a
since 4m−n−1 ∈ Z and g1 is of period 1
= gm (a) .
5
(1)
Hence
gm (a + hn ) − gm (a) = 0.
Assume m < n. Then
gm (a) =
a 4n−m n−1 a n−m
m−1
=
4
g
.
g
4
a
=
g
4
n
1
1
4m−1
4n−1
4n−m
4n−m
1
Thus
n−m
gm (a + hn ) − gm (a) = 4
a a
hn
gn
− gn n−m
.
+
4n−m 4n−m
4
Use the note above, as in (1) with h0n = hn /4n−m to say
a a
hn
n−m |gm (a + hn ) − gm (a)| = 4
gn 4n−m + 4n−m − gn 4n−m hn n−m
= 4
× n−m = |hn |
4
as required.
We use this claim to say that
g (a + hn ) − g (a) =
∞
X
(gm (a + hn ) − gm (a)) =
n
X
(gm (a + hn ) − gm (a)) ,
m=1
m=1
because the terms are zero when m > n. Then
n
g (a + hn ) − g (a) X gm (a + hn ) − gm (a)
=
.
hn
hn
m=1
(2)
Since |gm (a + hn ) − gm (a)| = |hn | we have that, for each term in the sum,
gm (a + hn ) − gm (a)
= +1 or − 1.
hn
Thus (g (a + hn ) − g (a)) /hn is a finite sum of +1’s and −1’s.
First, this means that for every n ≥ 1, the sum (g (a + hn ) − g (a)) /hn
in (??) is an integer.
But further, (g (a + hn ) − g (a)) /hn is a sum of n terms, each either +1
or −1. Let r be the number of terms that are +1, and s the number that are
−1. Then the number of terms in the sum n = r + s while the value of the
sum is r − s. Note that if n is odd then r and s have different parity (i.e.
6
one is odd, the other even) and so r − s, the value of the sum, is odd. If n
is even then r and s have the same parity, in which case r − s, the value of
the sum, is even.
Hence the sequence
g (a + hn ) − g (a)
hn
n≥1
is of integers which are odd when n is odd and even when n is even. Hence
g (a + hn ) − g (a)
n→∞
hn
lim
(3)
cannot exist with finite limit. If g were differentiable at a then
g (a + h) − g (a)
h→∞
h
lim
(4)
would exist. Since the sequence {hn }n≥1 chosen above satisfies limn→∞ hn =
0, the existence of (3) would imply the existence of (2) with the same value.
Since the limit in (2) does not exist the function cannot be differentiable at
a.
Note you may think that this example works because the function g1 is
non-differentiable at a point. This is not the case. It works because we take
a sequence of periodic functions gn with ever decreasing periods (i,e, ever
higher frequencies of oscillation). We have to dampen the magnitude of the
oscillations (by the factor 1/4n−1 in the sum) so we can add them together.
We can get these oscillations from trigonometric functions. And this was
the example of Weierstrass’s.
Theorem Let 0 < a < 1, and choose a positive odd integer b large enough
that
π
ab−1
< 23 . Define the function W : R → R,
W (x) =
∞
X
an cos (bn πx) .
n=0
Then W is continuous on R but differentiable nowhere.
Note, that this shows that an infinite sum of differentiable functions need
not be differentiable anywhere!
Reference:
B.R. Gelbaum, J.M.H. Olmsted, Counterexamples in Analysis, HoldenDay Inc. 1964
7