A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION, FOR MATH 320 This note is a demonstration of some of the details in Abbott s construction of a nowhere differentiable continuous function. The discovery of this theorem is often attributed to Weierstrass, who stunned the mathematical community in 872 with his construction of an infinite family of such examples google weierstrass nowhere differentiable function for a rabbit hole!, though it seems to have been known to Bolzano fifty years prior [Kle93, p. 20]. In the construction below, we follow Abbot [Abb0, 5.4, p. 44] closely, filling in answers to the exercises. Theorem. There exists a function g : R R that is nowhere differentiable and continuous. The construction of the function is not hard, but analysis of the function will require some care, so here we go. For each x R, choose an l Z so that x [2l, 2l + ], and let hx x 2l. Note that our definition of h is a bit unclear at odd integers, since, at x 5 for instance, we could choose either l 2 or l 3 since 22+ 23. On the other hand, the function hx is easily checked to be well-defined e.g. 5 22 5 23 in the example above. The graph of h is below in Figure. For each k N, let h k x 2 k h2k x. Graphs of h k x, for several small values of k, are pictured in Figure 2. Since hx for all x R, we have h k x /2 k for each k and Figure. The graph of hx.
2 A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION Figure 2. The graph of h k x, for k, 2, 3, 4. x. Thus the sum defined by gx h k x converges absolutely by the comparison test, and g is a function defined on R. The problem remains to explore finer properties of g, like continuity and differentiability. As we described in class, it is not hard to describe h k x in terms of the binary expansion of x, and this perspective will make our analysis easier. We make the following definition: Definition. Given k N {0}, and x R with binary expansion x... a 0. a a 2... a k a k a k+..., so that x i a i2 i, let [x] k denote the real number with binary expansion [x] k :. 0 0... 0 a k a k+..., so that x ik a i2 i. Lemma 2. If x has binary expansion as above, then we have [x] k if a k 0 h k x [x] 2 k k if a k. Further, if x, y R have the same kth digit in their binary expansions, then we have [x] k [y] k if a k 0 h k x h k y [y] k [x] k if a k. Proof. If the binary expansion of x is as above, then the binary expansion of 2 k x is given by 2 k x... a 0 a a 2... a k a k. a k+....
A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION 3 In that case, h2 k x is given by: a k. a k+ a k+2... if a k 0 h2 k x 2 a k. a k+ a k+2... if a k. Dividing by 2 k shifts the decimal place back, and h k x is as claimed. The second claim follows from the evident fact that 2 k [x] k 2 k [y] k [y] k [x] k. Note that it is immediate that any real number with a finite binary expansion has h k x 0 when k is bigger than the largest non-zero index in the expansion of x. For instance, let x m /2 m. It is straightforward to check that [x m ] k x m for k m, while [x m ] k 0 for k > m, so that the above lemma implies that x m if k m h k x m 0 if k > m, and we have gx m h k x m Plugging in to the difference quotient, x m m + 2 m. gx m g0 2 m gx m m +. x m 0 We may conclude that g is not differentiable at 0. In fact, the case of any dyadic rational is similar: Lemma 3. Let c p/2 n be a dyadic rational. Then g is not differentiable at c. Proof. Let c have binary expansion c... a 0. a a 2... a k a n, noting that the dyadic nature of c ensures that the binary expansion is finite. Let x m c + 2 m for each m. When m > n, the binary expansions of x m and c are identical up to the mth place, in which x m has a where c has a 0. Thus, for k m Lemma 2 implies that [x m ] k k if a k 0 h k x m h k c [c] k [x m ] k if a k. Even more, choose a value of k n. Since c and x m have the same binary expansions up to the mth index, we have [x m ] k k 2 m,
4 A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION so that h k x m h k c 2 m and h k x m h k c 2 m. When n + k < m, we have h k x m [x m ] k 2 m, and h m x m 2 m [x m ] m 2 m. As c and x m have binary expansions with 0 s after the nth and mth places, respectively, we have gc n h kc and gx m m h kc. Thus we have gx m gc x m c m h 2 m k x m n h k c 2 m n h k x m h k c + 2 m n 2 m + kn+ kn+ h k x m h k x m 2 m n + m 2 + h m k x m kn+ 2 m n + m n + + m 2n +. 2m 2 m As m goes to, the latter goes to. This implies that gx m gc m x m c is not a finite number, so we conclude gx gc x c x c isn t finite either. Thus g is not differentiable at c. Finally, we deal with the general case. Given c R with binary expansion c... a 0. a a 2... a k a k a k+..., let x m and y m be given by x m... a 0. a a 2... a m a m, and y m x m + 2 m, so that x m < c < y m for all m, and both {x m } and {y m } converge to c. In fact, for technical reasons below, we will only consider the values m where a m 0, i.e. the binary expansion of c has a 0. Since c is non-dyadic so that it doesn t have a finite binary Technically, the it may either not exist or exist but be infinite. In either case, it s not finite.
A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION 5 expansion, there must be infinitely may indices m for c with a m 0, so despite this restriction we still obtain infinite sequences converging to c. For c non-dyadic, for each k N, 2 k c is not an integer, so that h is differentiable at 2 k c, and thus h k is differentiable at c. By the chain rule, we have h k x h 2 k c. Since g m is the sum of functions differentiable at c, g m is differentiable at c, and we have g mc h kc h 2 k c. Relatedly, we have: Lemma 4. For k m we have h k c h k x m h 2 k c [c] m+, and h k y m h k c h 2 k c 2 m m+. Proof. The numbers x m and c have the same kth binary digits up to the mth digit, so by Lemma 2 we have [x m ] k k if a k 0 h k c h k x m [c] k [x m ] k if a k, for each k m. Moreover, since the digits of x m and c agree up to the mth digit we have [c] k [x m ] k [c] m+. When a k 0, the number 2 k c is between a pair of consecutive integers, the lesser of which is even. On this domain h has slope, so that h 2 k c. Similarly, if a k then 2 k c is in a region where h has slope, so that h 2 k c. Putting this together for h k c h k x m yields the stated result. The case for y m is similar, but we have to worry that adding 2 m to x m may have changed many digits in its binary expansion, so that it is not guaranteed that y m and c share the first m terms of their binary expansion. This is where we use the technical remark above, that we are only considering indices m where a m 0. For such y m, adding 2 m to x m only changes the mth binary digit. We conclude that [c] k [y m ] k [c] m+ 2 m, and the same argument applies. These imply: Lemma 5. For c non-dyadic, and x m and y m as above, we have gx m gc x m c g mc gy m gc. y m c
6 A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION Proof. We apply Lemma 4 to the difference quotients: gx m gc x m c gc gx m [c] m+ m h k c h k x m + h k c [c] m+ km+ h k c h k x m h 2 k c [c] m+ [c] m+ [c] m+ h 2 k c. Similarly, we have: gy m gc y m c Since g mc gy m gc 2 m m+ m h k y m h k c 2 m m+ h k y m h k c 2 m m+ 2 m m+ h 2 k c. h 2 k c, we are done. km+ h 2 k c 2 m m+ h k c Lemma 6. Let c be a non-dyadic real number. Then g is not differentiable at c. Proof. If g were differentiable at x c, we would have gx gc gx m gc gy m gc. x c x c m x m c m y m c Lemma 5 and the squeeze theorem now imply that m g mc g c. On the other hand we have g m+c g mc h 2 m c,
A CONTINUOUS AND NOWHERE DIFFERENTIABLE FUNCTION 7 so that g m+ c g mc for each m N, which violates the fact that {g mc} is Cauchy. Finally, we have: Lemma 7. g is continuous on R. Proof. Suppose that x and y share the same first m terms of their binary expansions. In that case, h k x h k y 2 m for k m, and we have gx gy h k x y h k x h k y + h k x h k y + 2 + m km+ km+ km+ 2 + k mk+ h k x h k x + 2 k km+ mk+ h k y h k y m + 2 + 2 m 2 m + 3 m 2. m The latter goes to 0 as m goes to think about why!. Thus, given ɛ > 0, we may choose m large enough so that m + 3/2 m < ɛ, and let δ /2 m. If x y < δ, then x and y share the first m terms of their binary expansion, so that the above estimate applies and we have gx gy m + 3 2 < ɛ. m Proof of Theorem. By Lemmas 3 and 6, g is not differentiable at any real number, and by Lemma 7 we know that g is continuous on R. References [Abb0] Stephen Abbott. Understanding analysis. Undergraduate Texts in Mathematics. Springer-Verlag, New York, 200. [Kle93] Israel Kleiner. Functions: historical and pedagogical aspects. Sci. Ed., 22:83 209, 993.