Local Linearity
Worksheet by Mike May, S.J. - maymk@slu.edu
This worksheet deals with material in section 13.3, which looks at the tangent plane and local linearity
> restart: with(plots):
Warning, the name changecoords has been redefined
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 the sections on continuity and differentiability are efforts to look at the 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 places where the function does not behave well are isolated. They get special attention, since most of our theorem fail at those points.
Example 1:
Show that the function
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.
>
Since this is multivariable calculus, we want to look at 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
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.
>
Exercise 1:
Let c and d be two distinct nonzero digits from the social security numbers of the people working on this worksheet. Find del small enough that the graph of
looks linear for a ±del region around (c-4.5, d-5.5).
>
Linear approximation and the tangent plane:
If for small regions, all nice functions look like planes, then when an approximation is good enough, we can use the plane rather than the original function. 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):
tanline(x);
del := .15:
plot({f(x), tanline(x)}, x = xval-del..xval+del, axes=boxed);
It looks like a good approximation for a ±.04 region.
>
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):
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 ±.05 region.
>
Exercise 2:
Let c, d, and h(x,y) be as above. Graph h(x,y) and its tangent plane in a small enough region around (c,d) that it is obvious that the tangent plane gives a good approximation for h(x,y).
>
Applications:
Time for the regular question, "And why do I care?" or its less abrasive version "What can this be applied to?"
The problems we look at for this material see a number of uses:
1) I want to quickly approximate a function near a nice point. This abviously works with polynomials. It also works with trig functions near points we can evaluate.
2) I am working with imprecise input values. (This would happen anytime I am outside of math class and my values were measured in a lab.) I am often concerned then with how much a small change in input values will change the outputs. (I am trying to create error bars for my lab write-up.)
Exercise 3:
Let c, d, and h(x,y) be as above. Use the tangent plane equation to approximat h(c+.01,d-.03).
>
Exercise 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?)
>
>
>