Student[MultivariateCalculus] Examples - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Applications and Example Worksheets : Calculus : Student[MultivariateCalculus] Examples

Student MultivariateCalculus Examples

The Student:-MultivariateCalculus package is designed to aid in the teaching and understanding of multivariate calculus concepts.  For a general overview, see MultivariateCalculus.  For introductory examples, see MultivariateCalculus Example Worksheet.

Lines and Planes

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with(Student:-MultivariateCalculus):

Example 1: Equation of a Plane

Obtain the equation of the plane containing the three points 1,2,3, 1,3,1, 2,1,1.

• 

Write a sequence of the three points.

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Plane
In the "Choose Variables for Plane" dialog, accept default names or provide new ones.

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Representation

1&comma;2&comma;3&comma;1&comma;3&comma;1&comma;2&comma;1&comma;1make plane<< Plane 1 >>representation6x10y+z=−23

Example 2: Skew Lines

Show that x&equals;1&plus;2 t&comma;y&equals;23 t&comma;z&equals;3&plus;5 t and x&equals;3s&comma;y&equals;5&plus;3&comma;z&equals;7&plus;6 s define skew lines, and find the distance between them.

Create Line Objects for each line

• 

Form a list of the parametric equations defining a line.

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Line≻t or s, as appropriate

• 

Context Panel: Assign to a Name≻L1 (or L2, as appropriate)

x&equals;1&plus;2 t&comma;y&equals;23 t&comma;z&equals;3&plus;5 tmake line<< Line 1 >>assign to a nameL1

x&equals;3s&comma;y&equals;5&plus;3&comma;z&equals;7&plus;6 smake line<< Line 2 >>assign to a nameL2

Verify the lines are skew

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Skew (or Parallel or Intersects)

L1&comma;L2skew lines?true

L1&comma;L2parallel?false

L1&comma;L2intersect?false

Obtain the distance between the lines

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Distance

• 

Context Panel: Approximate≻10 (digits)

L1&comma;L2distance75622311at 10 digits6.014452050

The standard approach to finding the distance between skew lines is vectorial: Obtain N, the vector orthogonal to both lines, and project V, any vector from one line to the other, onto N. The length of this projection is the distance between the lines.

Obtain N, the common normal

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Direction

• 

Context Panel: Assign to a Name≻V1 (or V2, as applicable)

L1direction2−35assign to a nameV1

L2direction−106assign to a nameV2

• 

Common-Symbols palette: Cross-product operator

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Assign to a Name≻N

V1×V2 = −18−17−3assign to a nameN

Obtain V, a vector from one line to the other

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Point

• 

Context Panel: Conversions≻Column Vector

• 

Context Panel: Assign to a Name≻P1 (or P2, as appropriate)

L1point1&comma;2&comma;3to Vector123assign to a nameP1

L2point3&comma;8&comma;7to Vector387assign to a nameP2

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Assign to a Name≻V

P2P1 = 264assign to a nameV

Project V onto N and obtain the length of this projection

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Projection

• 

Context Panel: Student Multivariate Calculus≻Norm

• 

Context Panel: Approximate≻10 (digits)

V&comma;N = 264,−18−17−3projection13503111275311225311norm75622311at 10 digits6.014452050

Example 3: Distance from a Point to a Plane

Determine the distance between the point 1&comma;2&comma;3 and the plane defined by the equation .

Define the plane as a Plane Object

• 

Control-drag the equation of the plane.

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Plane

• 

Context Panel: Assign to a Name≻sigma

3 x7 y&plus;5 z&equals;12make plane<< Plane 2 >>assign to a nameσ

Obtain the distance from the point to the plane

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Distance

• 

Context Panel: Approximate≻10 (digits)

1&comma;2&comma;3&comma;&sigma;distance88383at 10 digits0.8781140799

The standard approach to finding the distance from a point to a plane is vectorial: Project V, a vector from the point to the plane, onto N, the normal to the plane. The length of this projection is the distance from the point to the plane.

 

Obtain P, a point on the plane, and represent it as a position vector P

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Point

• 

Context Panel: Conversions≻Column Vector

• 

Context Panel: Assign to a Name≻P

&sigma;point3683&comma;8483&comma;6083to Vector368384836083assign to a nameP

Obtain V, a vector from the given point to P

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Assign to a Name≻V

P1&comma;2&comma;3 = 47832508318983assign to a nameV

Obtain N, a normal to the plane &sigma; 

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Normal

• 

Context Panel: Assign to a Name≻N

&sigma;normal3−75assign to a nameN

Project V onto N and obtain the length of the projection

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Projection

• 

Context Panel: Student Multivariate Calculus≻Norm

• 

Context Panel: Approximate≻10 (digits)

V&comma;N = 47832508318983,3−75projection248356834083norm88383at 10 digits0.8781140799

Example 4: Vector Projection onto a Plane

Obtain the vector projection of C&equals;2 i3 j&plus;5 k onto the plane spanned by the vectors A&equals;3 i&plus;5 j7 k and B&equals;4 ij&plus;9 k.

Define the vectors A, B, C

• 

Context Panel: Assign Name

A&equals;3&comma;5&comma;7assign

B&equals;4&comma;1&comma;9assign

C&equals;2&comma;3&comma;5assign

Obtain N, the normal to the plane spanned by A and B

• 

Common-symbols palette: Cross-product operator

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Assign to a Name≻N

A×B = 38−55−23assign to a nameN

Obtain the component of C that is along N

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Projection

• 

Context Panel: Assign to a Name≻CN

C&comma;N = 2−35,38−55−23projection11411916511969119assign to a nameCN

Obtain the component of C that is orthogonal to N

• 

Context Panel: Evaluate and Display Inline

CCN = 124119192119664119

Contours and Plane Sections

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with&lpar;Student:-MultivariateCalculus&rpar;&colon;

Example 1: Contour Map

Obtain a contour map of the function fx&comma;y&equals;x2&plus;2 y2.

• 

Control-drag the rule for the function.

• 

Context Panel: Plot Builder

• 

Select 2-D contour plot

x2&plus;2 y2

 

 

 

Example 2: Plane Sections

For fx&comma;y&equals;32 x2y2, obtain graphs of the plane sections x&equals;constant and y&equals;constant.

• 

Invoke the  tutor, or...

• 

Invoke the  tutor, or...

• 

Control-drag the rule for the function f.
Context Panel: Student Multivariate Calculus≻Tutors≻Cross Sections
Adjust, as per the figures below.

Differentiation

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with&lpar;Student:-MultivariateCalculus&rpar;&colon;

Example 1: Differentiate a Vector

To the vector R&equals;x i&plus;x2 j, apply componentwise differentiation with respect to x.

Method 1: Differentiation from Context Panel

• 

Context Panel: Differentiate≻With Respect To≻x

x&comma;x2differentiate w.r.t. x12x

Method 2: Differentiation operator from Calculus palette

• 

Calculus palette: Differentiation operator

• 

Context Panel: Evaluate and Display Inline

&DifferentialD;&DifferentialD; x <x&comma;x2&gt; = 12x

Method 3: Use functional notation

• 

Context Panel: Assign Function

Rx&equals;x&comma;x2assign as functionR

• 

Apply prime as apostrophe (') or as (#) from the Punctuation palette.

• 

Context Panel: Evaluate and Display Inline

Rx = 12x

The advantage of functional notation is that it is then very easy to evaluate the derivative at a specific value of the independent variable, as in: R2.

If the vector is a function of t, then use the overdot notation:

 

• 

Context Panel: Assign Function

Qt&equals;t&comma;t2assign as functionQ

• 

Apply the overdot.
Context Panel: Evaluate and Display Inline

Q&period;t = 12t

The overdot can be implemented via the template Ab from the Layout palette, or from the keyboard by simultaneously pressing the three keys: Control, Shift, Double/Single Quote ( Ctrl + Shift + '). This places the cursor on top of the letter to the left of the cursor. Then, simply use the period for the overdot. Descend from the top of the character with the right-arrow key.

Example 2: Gradient Vector

At the point 2&comma;1, obtain the gradient of fx&comma;y&equals; x2&plus;2 y2.

• 

Control-drag the rule for the function f.

• 

Context Panel: Student Multivariate Calculus≻Differentiation≻Gradient
Fill out the "Variables and Point" dialog as per Figure 1.

• 

Context Panel: Select Element≻1

 

Figure 1

x2&plus;2 y2gradient44select entry 144

Example 3: Directional Derivative

At the point 2&comma;3, and in the direction of v&equals;i4 j, obtain the directional derivative of fx&comma;y&equals;x y.

• 

Context Panel: Student Multivariate Calculus≻Differentiate≻Directional Derivative
Fill in the "Variables, Point, and Vector" dialog as per the figure to the lower-left.

x ydirectional derivative51717

The Context Panel also supports the solution given by fP·u.

 

Obtain f P, the gradient of f evaluated at P:2&comma;3 

• 

Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient
Fill in the "Variables and Point" dialog along the lines suggested by Figure 1 in Example 2.

• 

Context Panel: Select element≻1

• 

Context Panel: Assign to a Name≻Gf

x ygradient32select entry 132assign to a nameGf

Obtain u, a unit vector in the direction of v

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Normalize

• 

Context Panel: Assign to a Name≻u

1&comma;4 = 1−4normalize171741717assign to a nameu

Implement the calculation fP·u

• 

Common-Symbols palette: Dot-product operator

• 

Context Panel: Evaluate and Display Inline

Gf·u

Gf·u = 51717

A solution from first principles: evaluate f along a line through P and direction u, parametrized with t so that P corresponds to t&equals;0. Differentiate with respect to the parameter on the line, and take the limit as this parameter goes to zero.

Obtain the equation of the line through P with direction u

Context Panel: Student Multivariate Calculus≻Lines & Planes≻Line

Context Panel: Student Multivariate Calculus≻Lines & Planes≻
Representation≻parametric (See figure to the right)

Context Panel: Assign to a Name≻S

2&comma;3&comma;umake line<< Line 6 >>representationx=2+t1717&comma;y=34t1717assign to a nameS

Evaluate f along line S, differentiate, and take the limit as t0

• 

Expression palette: Evaluation template

• 

Context Panel: Differentiate≻With Respect To≻t

• 

Context Panel: Simplify≻Simplify

• 

Context Panel: Limit (See dialog to the right.)

x yx&equals;a|f(x)S

2+t171734t1717

differentiate w.r.t. t

1734t17171742+t17171717

&equals; simplify

517178t17

limit

51717

Example 4: Taylor Approximation

At the point 1&comma;1&comma;f1&comma;1, obtain the second-degree Taylor polynomial approximation to fx&comma;y&equals;x&plus;y2&plus;x2&plus;y2.

Solution via the Series option in the Context Panel

• 

Control-drag the rule for the function f.

• 

Context Panel: Series≻Multivariate Taylor Polynomial
Complete the "Taylor Polynomial" dialog as per the figure to the right.
Click OK.

 

x&plus;y2&plus;x2&plus;y2Taylor polynomial12x128y128

The Taylor Approximation tutor will provide the same solution, but in addition, it will draw a graph of the surface defined by f, and show the surface defined by the approximation.

 

• 

Control-drag the rule for the function f.

• 

Context Panel: Student Multivariate Calculus≻Tutors≻Taylor Approximation
Configure the tutor as per Figure 2.

Figure 2   The surface f is in red; the second-degree approximation is in blue

 

Optimization

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with&lpar;Student:-MultivariateCalculus&rpar;&colon;

Example 1: Unconstrained Optimization

Find the critical points for fx&comma;y&equals;x23 x y&plus;5 y24 x&plus;7 y.

Initialize

• 

Context Panel: Assign to a Name≻f

x23 x y&plus;5 y24 x&plus;7 yassign to a namef

Obtain critical points

• 

Type f and press the Enter key.

 

• 

Context Panel: Student Multivariate Calculus≻
Differentiation≻Gradient

 

 

 

• 

Context Panel: Conversions≻To List

 

• 

Context Panel: Solve≻Solve

 

 

 

• 

Context Panel: Assign to a Name≻S 

f

x23xy+5y24x+7y

gradient

2x3y43x+10y+7

to list

2x3y4&comma;3x+10y+7

solve

x=1911&comma;y=211

assign to a name

S

Evaluate f at the critical point

x23xy+5y24x+7y

• 

Expression palette: Evaluation template

• 

Context Panel: Evaluate and Display Inline

fx&equals;a|f(x)S = 4511

Second-Derivative Test

• 

Calculus palette: Partial-differentiation operators

• 

Context Panel: Evaluate and Display Inline

2x2 f = 2

2y2 f = 10

2 y x f = −3

• 

Context Panel: Evaluate and Display Inline

21032 = 11

The test number fxx2 fyy2fxy2&equals;11 is positive, as is fxx2&equals;2, so f19&sol;11&comma;2&sol;11&equals; 45&sol;11 is a minimum.

Example 2: Lagrange Multiplier Method

Obtain the extrema for the function fx&comma;y&equals;x y constrained by gx&comma;yx2&plus;y22&equals;0.

Access the LagrangeMultipliers command through the Context Panel

• 

Write a sequence of the objective function f, and a list of constraint function(s) g.
Context Panel: Student Multivariate Calculus≻Lagrange Multipliers
Complete the dialog as per the figure, below.

g

(4.2.1)

 

• 

The independent variables are entered as a list.

• 

There are three options for the Output: value, detailed, plot.
The "detailed" output includes the Lagrange multiplier and the value of the objective function at the critical point.

x y&comma;x2&plus;y22Lagrange multipliers1&comma;1,1&comma;−1,−1&comma;1,−1&comma;−1

• 

Select "detailed" for the Output.

x y&comma;x2&plus;y22Lagrange multipliersx=1&comma;y=1&comma;λ1=12&comma;xy=1,x=1&comma;y=−1&comma;λ1=12&comma;xy=−1,x=−1&comma;y=1&comma;λ1=12&comma;xy=−1,x=−1&comma;y=−1&comma;λ1=12&comma;xy=1

• 

Select "plot" for the Output.

x y&comma;x2&plus;y22Lagrange multipliers

The Lagrange multiplier method for solving a constrained optimization problem can be solved from first principles as shown below.

 

Initialize

• 

Context Panel: Assign to a Name≻F 

x y&plus;&lambda; x2&plus;y22assign to a nameF

Form and solve the three equations Fx&equals;0&comma;Fy&equals;0&comma;F&lambda;g&equals;0 

• 

Write F and press the Enter key.

• 

Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient

• 

Context Panel: Conversions≻To List

• 

Context  Panel: Solve≻Solve

• 

Context Panel: Assign to a Name≻S 

F

xy+λx2+y22

gradient

x2+y222λx+y2λy+x

to list

x2+y22&comma;2λx+y&comma;2λy+x

solve

λ=12&comma;x=1&comma;y=1,λ=12&comma;x=1&comma;y=−1,λ=12&comma;x=−1&comma;y=1,λ=12&comma;x=−1&comma;y=−1

assign to a name

S

Evaluate fx&comma;y&equals;x y at each of the four critical points found.

• 

Expression palette: Evaluation template

• 

Context Panel: Evaluate and Display Inline

x yx&equals;a|f(x)S1 = 1

x yx&equals;a|f(x)S2 = −1

xyx&equals;a|f(x)S3 = xy

xyx&equals;a|f(x)S4 = xy

The constrained optimization problem can be solved numerically by the Optimization Assistant, accessed from the Context Panel.

 

• 

Write the sequence of objective function and constraint equation.

• 

Context  Panel: Optimization≻Optimization Assistant
Press the Edit button to the right of "Initial Values" and change the defaults to x&equals;3&comma;y&equals;3
Select Maximize and press the Solve button to get the solution shown in the left-hand figure.
Press the Plot button; adjust the defaults as shown in the right-hand figure.
Press the Quit button to obtain the solution calculated by the Assistant.

x y&comma;x2&plus;y2&equals;2optimization assistant

• 

Find the additional solutions by modifying the start values in the Initial Values pane.

Integration

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with&lpar;Student:-MultivariateCalculus&rpar;&colon;

Example 1: Riemann-Sum Approximation

Obtain a Riemann-sum approximation to the integral of fx&comma;y&equals;8x2y2 if it is taken over the square 1x&comma;y2.

• 

A Riemann-sum approximation to an iterated double integral taken over a rectangular domain can be obtained with the  tutor.

 

• 

The figure at the right shows the state of the tutor after the "Lower-sum" method has been selected and the Display button pressed.

 

• 

The Animate button will produce an animation in which the partition starts at 3×3 and increases to the partition selected in the tutor.

• 

With the Student MultivariateCalculus package loaded, the tutor can be launched from the Context Panel applied to the rule for f. Select "Approximate Integration" in the Tutors section under the option Student Multivariate Calculus.

Example 2: Volume

Find the volume between the surfaces z&equals;0 and z&equals;5x2y2 inside the right cylinder whose cross section is bounded by y&equals;x&comma;y&equals;2x2, and x&equals;0.

The simplest way to formulate and evaluate the iterated double integral that gives the requisite volume is to use the integration template in the Calculus palette, then select Evaluate and Display Inline in the Context Panel.

 

• 

Calculus palette: Iterated double-integral template

• 

Context Panel: Evaluate and Display Inline

01x2x25x2y2 &DifferentialD;y &DifferentialD;x = 28170

The Context Panel also provides access to the MultiInt command, which has three possible returns: The unevaluated integral, the value of the integral, and a stepwise evaluation of the solution. In the solution below, the "steps" option is selected, the results of which are displayed under the screen-shots of the intermediate dialogs that collect the data needed for the integration.

 

• 

Context Panel: Student Multivariate Calculus≻Integrate≻Iterated
Fill in the "Specify coordinate system" dialog as per the figure on the left, below.
Fill in the "Specify parameter ranges and form" dialog as per the figure on the right, below.

General Algebraic Manipulations

Initialization

• 

Tools≻Load Package: Student Multivariate Calculus

with&lpar;Student:-MultivariateCalculus&rpar;&colon;

Example 1: Dot Product

Obtain the dot product of A&equals;a i&plus;b j and B&equals;&alpha; i&plus;&beta; j.

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel:
Student Multivariate Calculus≻Dot Product

a&comma;b&comma;&alpha;&comma;&beta; = ab,αβdot productaα+bβ

Alternate solution

• 

Common-Symbols palette: Dot product operator

• 

Context Panel: Evaluate and Display Inline

a&comma;b·&alpha;&comma;&beta; = aα+bβ

Example 2: Cross Product

Obtain the cross product of A&equals;2 i&plus;3 j&plus;4 k and B&equals;5 ij7 k.

Initialize

• 

Context Panel: Assign Name

A&equals;2&comma;3&comma;4assign

• 

Context Panel: Assign Name

B&equals;5&comma;1&comma;7assign

Calculate

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel:
Student Multivariate Calculus≻Cross Product

A&comma;B = 35−7,4−19cross product38−55−23

Alternate solution

• 

Common-Symbols palette: Cross product operator

• 

Context Panel: Evaluate and Display Inline

A×B = 38−55−23

Example 3: Norm

Obtain the Euclidean norm of the vector V&equals;a i&plus;b j&plus;c k.

Initialize

• 

Context Panel: Assign Name

V&equals;a&comma;b&comma;cassign

Euclidean norm

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Norm

V = 47832508318983norm1183083

Alternate solution

• 

Context Panel: Evaluate and Display Inline

V = 1183083

The notation for a vector norm can be typeset from the keyboard by typing two vertical strokes on either side of the vector. Alternatively, use the double-bar template from, for example, the Common-Symbols palette.

Example 4: Normalize

Normalize (under the Euclidean norm) the vector V&equals;a i&plus;b j&plus;c k.

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel:
Student Multivariate Calculus≻Normalize

a&comma;b&comma;c = abcnormalizeaa2+b2+c2ba2+b2+c2ca2+b2+c2

Example 5: Triple Scalar Product

Compute ABC, the Triple Scalar (or Box) product of the vectors A&equals;2 i&plus;3 j&plus;4 k, B&equals;5 ij7 k, and C&equals;3 i2 j&plus;4 k.

• 

Context Panel: Evaluate and Display Inline

• 

Context Panel: Student Multivariate Calculus≻Triple Scalar Product

2&comma;3&comma;4&comma;5&comma;1&comma;7&comma;3&comma;2&comma;4 = 234,5−1−7,3−24scalar triple product−187

An alternate solution consists in forming the matrix whose row entries are the components of the three vectors, then computing the determinant. However, since the determinant of the transpose is the same as the determinant of the matrix, it suffices to construct a matrix whose column entries are the components of the vectors.

 

• 

Write a list of the three vectors.
Context Panel: Evaluate and Display Inline

• 

Context Panel: Select Elements≻Combine into Matrix

• 

Context Panel: Standard Operations≻Determinant

2&comma;3&comma;4&comma;5&comma;1&comma;7&comma;3&comma;2&comma;4 = 234&comma;5−1−7&comma;3−24combine into Matrix2533−1−24−74determinant−187

Return to Index of Example Worksheets