Local LinearityWorksheet by Mike May, S.J. - maymk@slu.eduRevised by Russell Blyth - blythrd@slu.eduThis worksheet considers tangent planes and local linearityrestart: with(plots):Zooming and the main idea:The main idea of local linearity starts with an observation that most students make within a few days of working with a graphing calculator. "If you zoom in far enough on any function, it becomes a straight line." That observation is not quite correct, and when we study continuity and differentiability we will see exceptions. The result we want is a slight modification:Theorem : For any function of one variable nice enough for us to use it in a calculus class, if we zoom in far enough at any place other than an isolated set of problem points, the graph eventually looks like a straight line.Note the wiggle words. There are functions that behave very badly, but we don't look at them in this class. Such badly behaved functions get covered in the course called analysis. For our functions, the points at which any function does not behave well are isolated. These points get special attention, since most of our theorems fail at precisely these points.Example 1:Show that the function LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYuLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYjLUYsNiVRInhGJ0YvRjIvRjNRJ25vcm1hbEYnLUkjbW9HRiQ2MFEiPUYnRj0vJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRkUvJSlzdHJldGNoeUdGRS8lKnN5bW1ldHJpY0dGRS8lKGxhcmdlb3BHRkUvJS5tb3ZhYmxlbGltaXRzR0ZFLyUnYWNjZW50R0ZFLyUlZm9ybUdRJmluZml4RicvJSdsc3BhY2VHUS90aGlja21hdGhzcGFjZUYnLyUncnNwYWNlR0ZXLyUobWluc2l6ZUdRIjFGJy8lKG1heHNpemVHUSlpbmZpbml0eUYnLUklbXN1cEdGJDYlLUYsNiVRImVGJ0YvRjJGOi8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRictRkA2MFEiK0YnRj1GQ0ZGRkhGSkZMRk5GUEZSL0ZWUTBtZWRpdW1tYXRoc3BhY2VGJy9GWUZnb0ZaRmduLUYsNiVRJHNpbkYnL0YwRkVGPUY1RmNvLUZbbzYlRjotSSNtbkdGJDYkUSIzRidGPUZgby1GQDYwUTEmSW52aXNpYmxlVGltZXM7RidGPUZDRkZGSEZKRkxGTkZQRlIvRlZRJDBlbUYnL0ZZRmdwRlpGZ24tRiM2JS1GLDYlUSR0YW5GJ0ZccEY9LUZANjBRMCZBcHBseUZ1bmN0aW9uO0YnRj1GQ0ZGRkhGSkZMRk5GUEZSRmZwRmhwRlpGZ24tRjY2JC1GIzYlLUYsNipRIUYnLyUnZmFtaWx5R1ErTW9ub3NwYWNlZEYnRi8vJStmb3JlZ3JvdW5kR1EqWzI1NSwwLDBdRicvJStiYWNrZ3JvdW5kR1EuWzI1NSwyNTUsMjU1XUYnLyUrZXhlY3V0YWJsZUdGMS8lMGZvbnRfc3R5bGVfbmFtZUdRLE1hcGxlfklucHV0RidGMi1GIzYjLUZbbzYlRjotRmBwNiRRIjJGJ0Y9RmBvRmVxRj0tRiw2JUZncUYvRjI= is locally linear at x=3.f := x -> exp(x) + sin(x) + x^3*tan(x^2):
a := 3:
del := 1:
plot(f(x), x = a-del..a+del, axes=boxed);The graph is very non-linear when del = 1. When we change the value of del and re-execute, we see the function is almost linear when del = .1, and very linear when del = .01. Make these changes and regraph! (Copy and paste the relevant code above so you have a record of all three graphs.)Since this is multivariable calculus, we want to study the obvious generalization to functions of two variables:Theorem : For any function of two variables nice enough for us to use it in a calculus class, if we zoom in far enough at any place other than an isolated set of problem points, the graph eventually looks like a plane.Note that we keep all the wiggle words. The main change is that the graph of a linear function in two variables is a plane.Example 2:Show that the function NiMvLSUiZ0c2JCUieEclInlHLCopJSJlR0YnIiIiKiQpRigiIiRGLCEiIi0lJHNpbkc2IyUjeHlHRiwqJilGJ0YvRiwtJSR0YW5HNiMqJClGKCIiI0YsRixGLA== is locally linear at x=3, y=2.g := (x, y) -> exp(x) -y^3 + sin(x*y) + x^3*tan(y^2):
a := 3: b:=2:
del := 1:
plot3d(g(x,y), x = a-del..a+del, y = b-del..b+del, axes=boxed);Once again, the graph is very non-linear when del = 1, almost linear when del = .1, and very linear when del = .01. (Make the changes are regraph.)Exercise1. (Pay careful attention to the instructions in this exercise for finding the point around which the graph is to be investigated.)Let c and d be two distinct nonzero digits from the social security numbers of the people working on this worksheet. Compute the point (c-4.5, d-5.5).Find del small enough so that the graph of NiMvLSUiaEc2JCUieEclInlHLCgqJClGJyIiIyIiIkYtKiYpRigiIiRGLSIjNSEiIkYyLSUkc2luRzYjLCYqJkYwRi1GJ0YtRi0qJkYsRi1GKEYtRi1GLQ== looks linear for a \302\261del region around the point (c-4.5, d-5.5). Linear approximation and the tangent plane:If, for small regions, all nice functions look like planes, then for such small regions we can use such planes to approximate the original function. Near a particular point, the plane in question is clearly the tangent plane. If we are to use such an approximation, it is instructive to see the graph of the function and the tangent plane graphed together. Once again we start with a function in one variable and generalize.Example 3:Graph the function f(x) = e^x + sin(x) + x^3*tan(x^2) and its tangent line in a small region near x=3.f := x -> exp(x) + sin(x) + x^3*tan(x^2);
fx := diff(f(x),x):
xval := 3.0:
xslope := subs(x=xval, fx):
tanline := x -> f(xval) + xslope*(x-xval):
"Equation of the tangent line is y" = tanline(x);
del := .15:
plot({f(x), tanline(x)}, x = xval-del..xval+del, axes=boxed);The tangent line looks like a good approximation to the function for a \302\261.04 region about x = 3.Example 4:Graph the function g(x, y) = e^x -y^3+ sin(xy) + x^3*tan(y^2) and its tangent plane in a small region near x=3, y=2 to show it is locally linear.g := (x, y) -> exp(x) -y^3 + sin(x*y) + x^3*tan(y^2);
xval := 3.0: yval:=2.0:
gx := diff(g(x,y),x): gy := diff(g(x,y),y):
xslope := subs({x=xval,y=yval}, gx):
yslope := subs({x=xval,y=yval}, gy):
tanplane := (x, y) ->
g(xval,yval) + xslope*(x-xval) + yslope*(y-yval):
"Equation of the tangent plane is z" = tanplane(x,y);
del := .15:
surfplot := plot3d(g(x,y), x = xval-del..xval+del,
y = yval-del..yval+del, color=red):
tanplot := plot3d(tanplane(x,y), x = xval-del..xval+del,
y = yval-del..yval+del, color=green):
display3d({surfplot, tanplot}, axes=boxed);
The tangent plane seems to be a good approximation in a \302\261.05 region about the point (3,2).Exercise2. Let c, d, and h(x,y) be as above in Exercise 1. Graph h(x,y) and its tangent plane in a small enough region around (c,d) so that it is obvious that the tangent plane gives a good approximation to h(x,y).Applications:Time for the regular question, "And why do I care?" and/or its less abrasive variant "What can this be applied to?"Two immediate applications:1) You want to quickly approximate a function near a nice point. This obviously works with polynomials. It also works with trig functions near points we can evaluate.2) You am working with imprecise input values. (This would happen anytime I am outside of math class, for example, if my values were measured in a lab.) You may often be concerned then with how much a small change in input values will change the outputs. (You are trying to create error bars for my lab write-up.)Exercises3. Let c, d, and h(x,y) be as above. Use the tangent plane equation to approximate h(c+.01,d-.03).4. Let c, d, and h(x,y) be as above. Estimate the possible error if c and d are both measured within .01. (What is the maximum distance between h(x,y) and the tangent plane in that region?)