Simple Non-Differentiable Functions
and
Weierstrass' NOWHERE Differentiable Function

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

Special Mathematica Function: The GapZoom Package

Needs["Graphics`Colors`"];

Notebook Overview

This notebook introduces some functions that are NOT smooth at every point.  These functions are studied in Exercises 3.2.3 and 3.2.4 and Problems 3.1 and 3.2.

Sample Computations

There are certain reasons why these functions are non-differentiable.  Take a close look at each and see if you can figure out why this  is so.

A Jump Function  j[x]:

The next function has a "jump disconuity" at the point  x = 1.  Enter the next computation to see what happens near  x = 1:

Clear[j, x]; j[x_] := ((Sqrt[(x^2) + 2 x + 1])/(x + 1)); j[x]Plot[j[x], {x, -2, 1}, PlotStyle -> {Thickness[0.01], Blue}];

A Kink Function  k[x]:

This function is:

Clear[k, x]; k[x_] := (Sqrt[(x^2) + 2 x + 1]); k[x]Plot[k[x], {x, -2, 1}, PlotStyle -> {Thickness[0.01], Red}];

Weierstrass' Wild Wiggles  w[x]: A Kink at Every Point

This is Weierstrass' function at a unit scale.  Plot it and notice how jagged it looks.

SetOptions[Plot, AspectRatio -> Automatic]; Clear[w, x, n]; w[x_] := (∑_(m = 1)^n) Cos[(3^m) x]/(2^m)n = 10; Print["Ten terms of  W[x] =", w[x]]; Plot[w[x], {x, -1, 1}, AxesLabel -> {"x", "y"}, 
      PlotStyle -> {Brown}];

A Closer Look

The question is:

Do the jagged parts of the graph go away when we magnify?  
The next computation allows YOU to pick an  x  value and a scale.  The graph of w[x]  will then be drawn magnifying at the point  (x,w[x]) to the scale you select.  <Enter> the sample and then experiment with different points and scales.

SetOptions[Plot, AspectRatio -> Automatic, 
      AxesOrigin -> {0, 0}, AxesLabel -> {"dx", "dy"}, 
      Ticks -> None]; Clear[w, x, y, n]; w[x_] := (∑_(m = 1)^n) Cos[(3^m) x]/(2^m); x = 0.3; scale = (1/10.) ; n = 1 + Floor[N[Log[(100/scale)]/Log[2]]]; y = N[w[x]]; \(Plot[w[x + dx] - y, {dx, \(-scale\), scale}, 
      PlotRange -> {y - scale, y + scale}, PlotStyle -> {Brown}]; 

    Print[n, " terms of w[x] at scale = ", scale]; 

    Print["near (x,y) = (", x ","\ , y, ")"]; \)

Exercises

Exercise 3.2.3 & 4

See the Zoom program.

Problem 3.1

Exercise: Observations about the graph y = j[x]

Notice that  j[x] = -1 for values of  x < 1, no matter how close to x = 1 they are, but that  j[x] = +1 for values of x > 1, no matter how close to x = 1 they are.  This means that we can take  x1 < 1, but very very close to  x = 1 and  x2 > 1, also very close.

Then we have

x1 ≈ x2  but  j[x1] is not close to j[x2]

QUESTIONS:

1)  Why does the computer give error messages when it is plotting this graph?

2)  Can you simplify the expression  Sqrt[ (x^2) + 2 x + 1 ] /(x+1)  by factoring (x^2) + 2 x + 1?

3)  Why do we say  j[x]  is not continuous?

Exercise: Observations about the graph y = k[x]

Notice that  k[x]  is a line of slope  -1  for values of  x < 1, no matter how close to x = 1 they are, but that  j[x]  is  line of slope  +1 for values of x > 1, no matter how close to x = 1 they are.  Since line segments remain linear on magnification, this means that we can magnify near  x = -1 as much as we please and the graph will not change (only the scales change.)  No matter how much we magnify, the graph near x = -1 never gets close to a single straight line, it is NOT locally linear near x =-1.

QUESTIONS:

1)  Can you simplify the expression  Sqrt[(x^2) + 2 x + 1 ] by factoring (x^2) + 2 x + 1?

2)  Why do we call  k[x]  continuous, but NOT smooth (or locally linear) at  x = -1?

Problem 3.2

Plot magnifications of the graph of  Weierstrass' function  w[x]  at x = 0.3, for scales of 1/2, 1/5, 1/10.

Plot magnified graphs at several x-locations.