A first look at Tangent PlanesWorksheet by Mike May, S.J.- maymk@slu.eduEdited by Russell Blyth - blythrd@slu.edurestart: with(plots):A first naive way to look at a tangent plane at a point is to take the tangent lines to the two cross section curves in the vertical planes perpendicular to the x and y axes at that point and use those lines to generate the plane containing them. (The naive approach works if the function is differentiable, but that is a detail we will consider later.) This worksheet is intended as a demonstration of that technique.Constructing a plane defined by tangent lines to cross sectionsWe start by defining a function. Let LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnLUYjNictRiw2JkYuRi8vJTBmb250X3N0eWxlX25hbWVHUSlfY3N0eWxlNEYnRjItRiM2JS1GLDYlUSJmRidGL0YyLUkjbW9HRiQ2MFEwJkFwcGx5RnVuY3Rpb247RicvRjNRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0ZJLyUpc3RyZXRjaHlHRkkvJSpzeW1tZXRyaWNHRkkvJShsYXJnZW9wR0ZJLyUubW92YWJsZWxpbWl0c0dGSS8lJ2FjY2VudEdGSS8lJWZvcm1HUSZpbmZpeEYnLyUnbHNwYWNlR1EkMGVtRicvJSdyc3BhY2VHRmVuLyUobWluc2l6ZUdRIjFGJy8lKG1heHNpemVHUSlpbmZpbml0eUYnLUkobWZlbmNlZEdGJDYkLUYjNiUtRiw2JVEieEYnRi9GMi1GQjYwUSIsRidGRUZHL0ZLRjFGTEZORlBGUkZURlZGWS9GZ25RM3Zlcnl0aGlja21hdGhzcGFjZUYnRmhuRltvLUYsNiVRInlGJ0YvRjJGRS1GQjYwUSI9RidGRUZHRkpGTEZORlBGUkZURlYvRlpRL3RoaWNrbWF0aHNwYWNlRicvRmduRmNwRmhuRltvLUYjNilGNy1GIzYjLUklbXN1cEdGJDYlRmNvLUkjbW5HRiQ2JFEiMkYnRkUvJTFzdXBlcnNjcmlwdHNoaWZ0R1EiMEYnLUZCNjBRKCZtaW51cztGJ0ZFRkdGSkZMRk5GUEZSRlRGVi9GWlEwbWVkaXVtbWF0aHNwYWNlRicvRmduRmdxRmhuRltvLUYjNictRl1xNiRRIjNGJ0ZFLUZCNjBRMSZJbnZpc2libGVUaW1lcztGJ0ZFRkdGSkZMRk5GUEZSRlRGVkZZRmZuRmhuRltvRmNvRl5yRlxwLUZCNjBRIitGJ0ZFRkdGSkZMRk5GUEZSRlRGVkZmcUZocUZobkZbby1GIzYjLUZqcDYlRlxwRlxxRmBxRjdGN0Yr.It is first of all useful to look at the graph of f.f := (x, y) -> 2*x^2-y*x+3*y^2;plot3d(f(x,y), x=-10..10, y=-10..10, view=-100..100, axes=normal, color=blue);Notice that the graph is a paraboloid. To find the tangent plane we consider cross sections.We will start with the point (-1,2). We start by finding the z-value at the point on the graph.x0 := -1;y0 := 2;
z0 := f(x0, y0);Next compute the functions in one variable that we obtain by holding either x or y constant.fx := f(x, y0);
fy := f(x0, y);Now compute the derivatives of these functions in one variable and substitute in the point (x0,y0) to find the x-slope and the y-slope at that point. Equivalently, we can take the partials of f and evaluate.Dfx := diff(fx, x); mx := eval(Dfx, x = x0);
mx := eval(diff(f(x,y),x),{x=x0,y=y0});
Dfy := diff(fy, y); my := eval(Dfy, y = y0);
my := eval(diff(f(x,y),y),{x=x0,y=y0});LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnWe see that the x slope is -6, the y-slope is 13, and the z value is 16. The plane therefore has the equation z-16 = -6(x-(-1))+13(y-2) = -6x-6+13y-26, that is, z=-16-6x+13y.Let's plot the surface and the plane we have obtained. plot3d({-16-6*x+13*y, f(x,y)}, x=-3..1, y=0..4, view=0..35);The two surfaces look like good approximations to each other. Let us clean up the picture with some more magical Maple code.Since we want to plot the cross-sections of the graph, we use the command spacecurve from the plots package.help("plots,spacecurve");with(plots):
surfaces := plot3d([f(x,y),-16-6*x+13*y],x=-3..1,y=0..5,view=0..40,color=[blue, red]):
xCurve := spacecurve([x0+t,y0,f(x0+t,y0)],t=-2..2,
color = green, thickness = 3):
yCurve := spacecurve([x0,y0+t,f(x0,y0+t)],t=-2..2,
color = yellow, thickness = 3):
xTanLine := spacecurve([x0+t,y0,f(x0,y0)-6*t],t=-2..2,
color = green, thickness = 2):
yTanLine := spacecurve([x0,y0+t,f(x0,y0)+13*t],t=-2..2,
color = yellow, thickness = 2):
display3d({yCurve, surfaces, xCurve, xTanLine, yTanLine}, axes = boxed);Thus we see that we have constructed a point that contains the appropriate point on the surface and contains the two tangent lines.An automated approachWe can set up a block of code that does the work of the example all in one step.f := (x, y) -> 2*x^2-x*y+3*y^2;
x0 := -1: y0 := 2: z0 := f(x0, y0):
width := 5;
"(x0, y0, z0)" = (x0, y0, z0);
fx := f(x, y0): xslope := eval(diff(f(x,y),x), {x=x0,y=y0}):
fy := f(x0, y): yslope := eval(diff(f(x,y),y), {x=x0,y=y0}):
"(xcurve, xslope, ycurve, yslope)" = (fx, xslope, fy, yslope);
tanPlane := z0+xslope*(x-x0)+yslope*(y-y0):
"Tangent plane, z " = tanPlane;
surfaces := plot3d([f(x,y), tanPlane],
x=x0-width..x0+width, y=y0-width..y0+width, color =[red,blue]):
xcurve := spacecurve({[x, y0, f(x, y0)],[x,y0,z0+xslope*(x-x0)]},
x = x0-width..x0+width, color = green, thickness = 3):
ycurve := spacecurve({[x0, y, f(x0, y)],[x0,y,z0+yslope*(y-y0)]},
y = y0-width..y0+width, color = yellow, thickness = 3):
display3d({ycurve, xcurve, surfaces}, axes = boxed);The advantage of this set-up is that we can consider a different example by modifying the first 2 lines of the block of code above and re-executing the block of code.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0YnExercises1) Modify the code above to examine the function NiMsKCokKSUieEciIiMiIiJGKCooRidGKEYmRiglInlHRihGKComIiInRigqJClGKkYnRihGKEYo at two points of your choosing. Verify that the plane obtained is tangent to the surface. (You may want to reduce the width variable to zoom in on the point of tangency.)LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn2) Modify the code above to examine the function NiMsKiomIiIkIiIiJSJ4R0YmRiYqJClGJ0YlRiYhIiIqJCklInlHRiVGJkYmKiZGJUYmRi1GJkYq at the points {(-1, -1), (-1, 1), (1, -1), (1,1)}. Explain what you find.LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn