The Symbolic Microscope
for
Functions of 1 Variable

by
K. D.  Stroyan
University of Iowa

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

Special Mathematica Functions used in this NoteBook

Needs["Graphics`Colors`"];

Notebook Overview

This NoteBook is a Mathematica animation of the microscope interpretation the linear approximation given by the first derivative in one variable.  The effect is similar to the NoteBooks Zoom and SecantGapZ of Chapter 3.    This calculation is completely "hands on" to emphasize the prediction YOU can make with symbolic calculus.

Algebraically the "microscopic" error or "gap" is  ϵ  in the formula:

f[x + δx] - f[x]=f'[x] δx+ϵ·δx

Geometrically,the error  ϵ  is what you see as the difference between the graph and its tangent approximation when you look at the graph under a microscope of magnification  1/δx.The function is smooth if  ϵ  is small,ϵ≈0,when  δx  is small,δx≈0.  Under an ideal "infinitesimal microscope" of infinite power  1/δx  the error term  ϵ  would be infinitesimal.This means that you would not see the error  ϵ,so that the graph would appear to be linear-in the change (or difference) δx.

A linear function in local variables  (dx,dy)  centered at a fixed  (x,y)  with y = f[x] has the form

dy=f'[x]·dx

with slope  m=f'[x],the derivative at the fixed  x,in the basic formula dy=m dx.

The linear function is the first term of the formula above for the change in  f[x].  At a small value of  dx = δx ≈ 0, the second term is small even compared with the linear term, so the change is nearly linear.  In other words, the graph of a smooth function is "locally linear."  This is the main approximation of differential calculus.

The rules of calculus let us "see" in the microscope without first seeing the graph.  In other words, if the rules of differentiation apply, yielding a valid formula, then we know that sufficiently powerful magnification will result in a straight line of slope given by the formula obtained from the rules.  This NoteBook and Problem 6.9 combine the ideas of Chapters 4, 5 and 6.

A 3-D Microscope is in the Chapter 18 folder.

References to the Text

This NoteBook goes with Chapters 5, 6 & 7 of the text.

Step-by-step Computations

The graph of f[x] near a fixed  x:

Clear[f,x,dx];
f[x_] :=  x Cos[x^2-x]/2;
Print["f[x] = ",f[x]];
x = 1.5;
Print[" near x = ",x];
SetOptions[Plot, AxesOrigin -> {0,0},AxesLabel -> {"dx","dy"},
	AspectRatio -> Automatic ];
Plot[f[x+dx]-f[x], {dx,-5,5}, PlotRange -> {-5,5},PlotStyle->{Blue}];

Animation

Inside this cell there is a sequence of magnifications of the graph of the function  y=f[x]  defined above, centered over the point  x  on its graph.  (The value of  x  is also given above.)  Notice that this does not use the derivative function  f'[x].

You can see an animation  by highlighting the closed cell next to the graphs and then pressing the <Command>-key together with the <Y>-key.  (Or select "animate selected graphics" from the "Graph" menu.)

SetOptions[Plot,Ticks -> None];
Print["Magnifying near x = ",x];
Do[delta = 5/(1.5^n);
  	Plot[f[x+dx]-f[x],{dx,-delta,delta},
  		PlotRange -> {-delta,delta},PlotStyle->{Thickness[0.01],Blue}];
	,{n,0,16}]

Differential

When we can compute the differential of  y = f[x]  by rules and both  f[x] and f'[x] are defined near  x, the magnified graph of  y = f[x]  near this value looks the same as the local linear graph  dy = f'[x] dx.

Compare the following "prediction" with the last frame of the previous animation.

Clear[df,dx];
df[dx_] := f'[x] dx;
Print["dy = ",df[dx]];
Plot[ df[dx], {dx, -5, 5},PlotRange -> {-5,5},PlotStyle->{Red}] ;

The Symbolic Differential

Clear[x];
df[dx]

Summary

If the formulas for  f[x]  and  f'[x]  are valid in an interval around the x-value of interest, we know the magnified graph looks linear.  In this case, evaluate the specific number  m = f'[x] and graph your predicted line in local coordinates:

dy = m  dx

Combined Computation

Theorem 5.4

If f[x] is a smooth real function on the real line, then under an sufficiently powerful microscope focused over a fixed x, the graph y=f[x] appears to be the same as the linear graph given in the microscope (dx,dy)-coordinates by  dy=m dx , where m=f'[x] and the center of the microscope is focused at the (x,y)-point (x,f[x]).

Procedure

To predict the view in an ideal microscope we:

1)  Compute  f'[x]  from  y = f[x]  by the symbolic rules of Chapter 6.

2)  Verify that  f[x]  and  f'[x]  are valid formulas in an interval about the focus value of  x.

3)  Fix  x  in the differential  dy = f'[x] dx (that is, compute the specific number m = f'[x]) and plot the line  dy = m · dx in (dx,dy)-coordinates.

This line is what the graph looks like at "sufficiently large" magnification.  This can be done with Mathematica as follows:

Clear[f, x, dx, df]; f[x_] := (1/2) x Cos[(x^2) - x]; df[dx_]:=f'[x] dx;Print["y = f[x] = ", f[x]]; x = 1.0; Print["VERY near x = ", x]; Print["Looks like dy = ", df[dx]]; Plot[df[dx], {dx, -1, 1}, Ticks -> None, 
      AxesLabel -> {"dx", "dy"}, AspectRatio -> Automatic, 
      PlotRange -> {-1, 1}, PlotStyle -> {Red}];

You could compare as follows to be sure:

\(scale\  = \ 0.25; 

    Plot[{\((f[x + dx] - f[x])\), df[dx]}, {dx, \(-scale\), scale}, 
      PlotRange -> {\(-scale\), scale}, 
      PlotStyle -> {{Thickness[0.01], Blue}, {Red}}]; \)

\(scale\  = \ 0.01; 

    Plot[{\((f[x + dx] - f[x])\), df[dx]}, {dx, \(-scale\), scale}, 
      PlotRange -> {\(-scale\), scale}, 
      PlotStyle -> {{Thickness[0.01], Blue}, {Red}}]; \)

Exercises

Problem 5.1

Predict the view in a powerful microscope focused over  x = 2 on the graphs below.  Explain how your computations use your computations from Problem 5.1 (or rules of calculus) to "see" in the microscope without actually magnifying.

y = f[x] = (x^n)
	y = f[x] = (1/(x^2))
	y = f[x] = (x^(1/3))

Problem 5.2

1)  Calculus cannot predict the view in a powerful microscope focused over  x = -1 on the graph  y  = (Sqrt[(x^2) + 2 x + 1]).  Explain why not using rules computed by hand.  Check your work with the commands (put in an input cell) 
Clear[x,f];
f[x_] := (Sqrt[(x^2) + 2 x + 1]); 
f[x]
f'[x]
f'[-1]
(HINT:  What is the line dy = m dx when  x = -1?)

2)  Repeate the step-by-step computations above for the function  f[x_] := (Sqrt[(x^2) + 2 x + 1])  , magnifying in at the point  x = -1, verifying that  f[x]  is not approximately linear near  x = -1.

Problem 6.12

1)  Repeate the step-by-step computations above for the function  f[x_] := (x^2) Cos[(π/x)] , zooming in at the point  x = 1.

2)  Compare the machine computation to your hand calculations from the text Problem.