Application Center - Maplesoft

App Preview:

Classroom Tips and Techniques: Drawing a Normal and Tangent Plane on a Surface

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




 

Classroom Tips and Techniques: Drawing a Normal and Tangent Plane on a Surface

``

Robert J. Lopez

Emeritus Professor of Mathematics and Maple Fellow

Maplesoft

 

Introduction

NULL

A question posted to MaplePrimes on May 25, 2013, asked for help in drawing a normal and tangent plane on a given surface. Posted on the Sunday prior to the American Memorial Day holiday, it was probably a request for help on a homework assignment. As such, it went unanswered, but it's such a standard problem in multivariate calculus, that it begs for a solution. In fact, there are at least four different ways to solve the problem in Maple, and this article discusses them all.

NULL

The Problem

NULL

The actual post to MaplePrimes can be found here. In essence, it asks for the normal and tangent plane at 2, 1, 3 on the surface defined by z = `≡`(f(x, y), 10)-x^2-3*y^2.

NULL

Solution 1

NULL

Table 1 contains a solution based on the new "lines and planes" commands recently added to the Student MultivariateCalculus package in Maple 17. The solution is implemented via explicit calls to commands, but the calculation could equally well be done in a syntax-free way through the Context Menu.

 

Initializations

• 

Click the restart icon in the toolbar, or execute the restart command at the right.

restart

• 

Tools_Load Package: Student Multivariate Calculus

Loading Student:-MultivariateCalculus

• 

Assign to the name f, the expression for z(x, y).

f := 10-x^2-3*y^2

• 

Define P, the point of contact.

P := [2, 1, 3]

Obtain a normal vector at the point P 

• 

Apply the Gradient command to the expression z-f. The Gradient command in the MultivariateCalculus package has simple syntax for evaluating the gradient vector at a point.

N := (Gradient(z-f, [x, y, z] = P))[]

Vector(3, {(1) = 4, (2) = 6, (3) = 1})

Obtain the tangent plane

• 

Invoke the Plane command with the point P and normal vector N as arguments.

• 

Display the equation of the plane with the GetRepresentation command.

T := Plane(N, P); GetRepresentation(T)

4*x+6*y+z = 17

Table 1   Tangent plane and normal obtained in the Student MultivariateCalculus package

NULL

Figure 1 shows the surface, the tangent plane, and the normal vector. The surface is drawn with the plot3d command; the tangent plane, normal, and point of contact, with the GetPlot command in the MultivariateCalculus package. The two separate images are joined with the display command in the plots package.

 

p[1] := plot3d(f, x = -3 .. 3, y = -3 .. 3, color = red); p[2] := GetPlot(T, planeoptions = [transparency = .4], normaloptions = [color = black]); plots:-display(p[1], p[2], view = 0 .. 10, axes = frame, labels = [x, y, z])

Figure 1   Surface drawn by plot3d; tangent plane and normal, by GetPlot

NULL

Solution 2

NULL

Table 2 contains a solution based on commands in the Student VectorCalculus package. As in Table 1, explicit commands are employed; the calculations also can be implemented in a syntax-free way through the Context Menu.

 

Initializations

• 

Click the restart icon in the toolbar, or execute the restart command at the right.

restart

• 

Tools_Load Package: Student Vector Calculus

Loading Student:-VectorCalculus

• 

Assign to the name f, the expression for z(x, y).

f := 10-x^2-3*y^2

• 

Define P, the point of contact.

P := [2, 1, 3]

Obtain a normal vector at the point P 

• 

The Gradient command in the VectorCalculus packages returns a VectorField object. Evaluation at a point via the evalVF command returns a RootedVector that "knows" the location of its root point, or "tail".

N := evalVF(Gradient(z-f), `<,>`(P))

Vector(3, {(1) = 4, (2) = 6, (3) = 1})

Obtain the equation of the tangent plane

• 

In the VectorCalculus packages, the TangentPlane command returns the parametric form of a tangent plane, placing the component expressions in a vector.

Z := TangentPlane(f, x = 2, y = 1)[3]; z = Z

z = -4*x+17-6*y

Table 2   Tangent plane and normal obtained in the Student VectorCalculus package

NULL

Figure 2 shows the surface, the tangent plane, and the normal vector. The surface is drawn with the plot3d command; the tangent plane, with the implicitplot3d command; and the normal vector, with the PlotVector command in the Student VectorCalculus package.

NULL

p[1] := plot3d(f, x = -3 .. 3, y = -3 .. 3, color = red); p[2] := PlotVector(N, color = black); p[3] := plots:-implicitplot3d(z = Z, x = 1 .. 3, y = -3 .. 3, z = 1 .. 5, color = cyan, style = surface); plots:-display(p[1], p[2], p[3], axes = frame, scaling = constrained, view = 0 .. 10, labels = [x, y, z], orientation = [25, 80, 0])

Figure 2   Surface, tangent plane, and normal vector

NULL

Each component in Figure 2 is drawn with a different command. The surface is drawn with the plot3d command that resides at top level. The tangent plane is drawn with the implicitplot3d command in the plots package. The advantage here is the greater control over the size of the tangent plane. Finally, the normal vector is drawn with the PlotVector command in the Student VectorCalculus package. This command respects the root point when graphing a RootedVector.

NULL

Solution 3

NULL

A third solution obtains the tangent plane as the degree-one Taylor polynomial approximation to f. This approximation can be obtained via the TaylorApproximation command, or via the Taylor Approximation tutor. Table 3 first initializes the calculation; the interaction with the tutor is captured by the static image in Figure 3.

 

Initializations

• 

Click the restart icon in the toolbar, or execute the restart command at the right.

restart

• 

Tools_Load Package: Student Multivariate Calculus

Loading Student:-MultivariateCalculus

• 

Assign to the name f, the expression for z(x, y).

f := 10-x^2-3*y^2

• 

Define P, the point of contact.

P := [2, 1, 3]

• 

As per Table 1, apply the Gradient command to the expression z-f, again making use of the simple syntax for evaluating the gradient vector at a point.

N := (Gradient(z-f, [x, y, z] = P))[]

Vector(3, {(1) = 4, (2) = 6, (3) = 1})

• 

Type f
Context Menu: Evaluate and Display Inline

• 

Context Menu:
Tutors_Calculus-Multivariate_Taylor Approximation

• 

Adjust the tutor as per Figures 3 and 4, below.

f = -x^2-3*y^2+10(->)NULL

Table 3   Solution via Taylor Approximation tutor

NULL

As per Figure 4, set the coordinates for the point of contact, and change the default degree (which is 5) to 1. Click the Plot Options button to obtain the dialogs shown Figure 3. Change the size of the bounding box for the graph, apply constrained scaling, and change the axes to "frame." Click the Color button to select color change for the Taylor series, and for the tangent plane, select a color lighter than the default color.

 

NULL

 

NULL

Figure 3   Auxiliary dialogs associated with the Taylor Approximation tutor

 

The graph in the tutor is returned to the worksheet by clicking the Close button. Note the TaylorApproximation command at the bottom of the tutor. It can be copied and pasted, thereby obtaining the graph directly, without going through the intermediary of the tutor.

 

NULL

Figure 4   Tangent plane obtained as the degree-one Taylor polynomial approximation

NULL

Figure 6 is obtained from the graph returned by the tutor by adding the normal vector via a drag-and-drop (or copy/paste) of the image of the vector in Figure 5.

NULL

plots:-arrow(P, N, color = black)

Figure 5   Normal vector drawn with the arrow command in the plots package

NULL

After interactively adjusting the axes via the Context Menu for the graph of the surface and tangent plane, and adding the graph of the vector, the result is Figure 6, comparable to Figures 1 and 2.

 

NULL

Figure 6   Graph of surface, tangent plane and normal vector

NULL

Of course, the graph returned by the tutor can be generated directly, as per Figure 7, where it is assigned to a name so that it can be used in the display command that generates Figure 8.

 

p[1] := TaylorApproximation(f, [x, y] = [2, 1], 1, output = plot, axes = frame, view = [-3 .. 6, -3 .. 10, 0 .. 10], caption = "", tayloroptions = [color = cyan]); p[1]

Figure 7   Graph of surface and tangent plane generated by the TaylorApproximation command

NULL

Figure 8 combines the graph in Figure 7 with a graph of the normal vector.

 

plots:-display(p[1], plots:-arrow(P, N, color = black), scaling = constrained)

Figure 8   Alternate method for obtaining the graph in Figures 1, 2, and 6

NULL

Solution 4

NULL

Table 4 contains top-level calculations for the normal vector and the equation of the tangent plane. No special packages are therefore used. In place of the partial derivative templates taken from the Expression palette, the diff command could have been used. Also, in place of the Evaluation template, the eval command could have been used.

 

The dot product operator from the Common Symbols palette could have been replaced with the period. The vector form of the equation of a plane is compact. The algebraic alternative of writing 4*x+6*y+z = d, and determining d by the substitutions (x, y, z) = P, would require additional steps.

 

Initialize

• 

Click the restart icon in the toolbar, or execute the restart command at the right.

restart

``

• 

Assign to the name f, the expression for z(x, y).

f := 10-x^2-3*y^2

• 

Define the point of contact as the vector P.

P := `<,>`(2, 1, 3)

Obtain a normal vector at P 

• 

Obtain the vector v = (Vector(3, {(1) = -f[x], (2) = -f[y], (3) = 1})), a normal to z = f(x, y).

• 

Expression palette: Evaluation template
Evaluate v at the point of contact.

N := eval(`<,>`(-(diff(f, x)), -(diff(f, y)), 1), [x = 2, y = 1]) = Vector(3, {(1) = 4, (2) = 6, (3) = 1})``

Obtain the equation of the tangent plane

• 

Using the vector form of the equation of a plane containing the point P, and having normal N, obtain Q, the required tangent plane.

Q := `assuming`([(`<,>`(x, y, z)-P).N = 0], [real])

4*x-17+6*y+z = 0

Table 4   Top-level calculation of a normal and the equation of the tangent plane

NULL

Figure 9, comparable to Figures 1, 2, 6, and 8, is obtained from separate graphs of the surface, tangent plane, and normal vector.

``

p[1] := plot3d(f, x = -3 .. 3, y = -3 .. 3); p[2] := plots:-implicitplot3d(Q, x = 1 .. 3, y = 0 .. 2, z = 2 .. 4, style = surface, color = cyan); p[3] := plots:-arrow(P, N, color = black); plots:-display(p[1], p[2], p[3], scaling = constrained, axes = frame, view = 0 .. 10)

Figure 9   Graph of surface, tangent plane, and normal vector

``

 

Legal Notice: © Maplesoft, a division of Waterloo Maple Inc. 2013. Maplesoft and Maple are trademarks of Waterloo Maple Inc. This application may contain errors and Maplesoft is not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact Maplesoft for permission if you wish to use this application in for-profit activities.``