Overview of the Student Multivariate Calculus Package - 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 : Overview of the Student Multivariate Calculus Package

MultivariateCalculus

 

The Student:-MultivariateCalculus package is designed to aid in the teaching and understanding of multivariate calculus concepts.  This worksheet demonstrates the basics of this functionality.  For more information about the commands in the MultivariateCalculus package, see the command help page.  For a general overview, see MultivariateCalculus.

Getting Started

Commands in the MultivariateCalculus package can be referred to using the long form, for example, Student:-MultivariateCalculus:-ApproximateInt.

 However, it is recommended that you load the package first and use the shorter command names.

restart

withStudent:-MultivariateCalculus:

The MultivariateCalculus package contains tutor routines that act as interfaces to the other MultivariateCalculus routines.  Each tutor can be called with no parameters, in which case defaults are used.  These parameters can be changed easily in the Maplet application.

 

The following examples show you how to use the MultivariateCalculus routines.  For additional examples, see the moreStudentMultivariateCalculus example worksheet.

Taylor Approximations

The MultivariateCalculus package routine TaylorApproximation calculates, plots, or animates Taylor approximations to multivariate functions.  The TaylorApproximationTutor routine provides an interface to the TaylorApproximation routine.

TaylorApproximationTutor

TaylorApproximationTutorsinx+y,x,y=1,2,8

The TaylorApproximation routine allows you to calculate, plot, or animate the Taylor approximation, without using the Maplet application interface.

TaylorApproximationsinx+y,x,y=1,0,5

cos1y5120+sin1y424+cos1x1y424cos1y36+sin1x1y36+cos1x12y312sin1y22cos1x1y22+sin1x12y24+cos1x13y212+cos1ysin1x1ycos1x12y2+sin1x13y6+cos1x14y24+sin1+cos1x1sin1x122cos1x136+sin1x1424+cos1x15120

(1.1)

The following creates an animation.  To run any of the animations in this worksheet:

1. 

Click the plot. The plot toolbar is displayed.

2. 

In the toolbar, click the Play button.

  

Alternatively, right-click (Control-click, on Mac) the plot to display the context menu.  Select Animation > Play.

TaylorApproximationsinx+y,x,y=1,0,5,output=animation

Cross-Sections

The  MultivariateCalculus package has routines to illustrate the concepts of cross-sections.  The cross-section routines demonstrate the intersection of any given plane with the curve.

The CrossSectionTutor routine provides and interfaces for the CrossSection.

CrossSectionTutor

CrossSectionTutorx2+y2+z2=4,x+z=2,1,0,x=2..2,y=2..2,z=2..2

The CrossSection routine allows you to plot or animate the cross-sections without using the Maplet application interface.

CrossSectionx2+y2+z2=4,x+y=1.1,0.1,x=2..2,y=2..2,z=2..2,showfunction=false,title=Sphere

CrossSectionx2+y2,z=0..24,x=4..4,y=4..4,z=0..25,planes=10,output=animation

Directional Derivatives and the Gradient

The DirectionalDerivative, DirectionalDerivativeTutor, Gradient, and GradientTutor routines of the MultivariateCalculus package are designed to demonstrate and determine directional derivatives and gradients.  The tutor routines provide an interface to the DirectionalDerivative and Gradient routines.

DirectionalDerivativeTutor

DirectionalDerivativeTutorx2+3y12,x,y=1,2,2,3

GradientTutor

GradientTutoryx2+y2,x,y=1,2,3,5

The DirectionalDerivative routine allows you to plot, animate, or obtain the value of the directional derivative, without using the Maplet application interface.  The Gradient routine allows you to obtain the gradient, or plot the gradient at a point.  Using the output=gradplot option, the Gradient routine can simultaneously plot the gradients at multiple points within a region.

DirectionalDerivativex2+y2,x,y=1,2,3,4

225

(3.1)

DirectionalDerivativex2+3y12,x,y=1,1,1,1,output=animation,frames=15

Gradientx2+y2,  x,y=0,1;

02

(3.2)

Gradientx2+y2,  x,y=0,1,2,1,  output=plot;

Gradientx2+y2,  x,y = 0,1,2,1, output = gradplot;

The Hessian and the Second Derivative Test

The SecondDerivativeTest routine of the MultivariateCalculus package can be used to calculate the Hessian for use in the second derivative test, or to apply the second derivative test to determine the local minima, local maxima, and saddle points.

SecondDerivativeTestx2+y2,x,y=0,0,output=hessian

2002

(4.1)

SecondDerivativeTestx2y2,x,y=0,0

LocalMin=,LocalMax=,Saddle=0,0

(4.2)

SecondDerivativeTestx2+y2+z2,x,y,z=1,2,1,2,3,1,0,0,0,output=hessian

200020002,200020002,200020002

(4.3)

SecondDerivativeTestx2+y2+z2,x,y,z=1,2,1,2,3,1,0,0,0

LocalMin=0,0,0,LocalMax=,Saddle=

(4.4)

Integrals in Multivariate Calculus

The MultiInt routine of the MultivariateCalculus provides an interface for the construction or evaluation of multiple integrals.

MultiIntx2y,y=x1..x+1,x=0..4,output=integral

04x1x+1x2yⅆyⅆx

(5.1)

MultiIntx2y,y=x1..x+1,x=0..4

128

(5.2)

MultiIntx2+y2+z,z=2..4+y2,y=x1..x+6,x=2..4,output=integral

24x1x+6−2y2+4x2+y2+zⅆzⅆyⅆx

(5.3)

MultiIntx2+y2+z,z=2..4+y2,y=x1..x+6,x=2..4

213375445

(5.4)

Integral Approximations

Multivariate integral approximations using Riemann sums can be observed using the ApproximateInt and ApproximateIntTutor routines.  The ApproximateIntTutor routine provides a Maplet application interface to the ApproximateInt routine.

ApproximateIntTutor

ApproximateIntTutorx3y2+xy,y=4..4

ApproximateIntTutorr,r=0..2,θ=0..π2,coordinates=polar

The ApproximateInt routine allows you to plot, animate, or obtain the value of an integral approximation, without using the Maplet application interface.

ApproximateIntr,r=0..5,t=0..π2,coordinates=polar,output=plot,showfunction=false,prismoptions=color=green,method=upper

ApproximateIntx2+y2,x=4..4,y=6..6,output=animation,partition=6,6,frames=2..7

ApproximateIntx2+y2,x=4..4,y=6..6,output=value,partition=6,6

1617.777776

(6.1)

The Jacobian

The Jacobian of a list of multivariate functions can be calculated using the Jacobian routine of the MultivariateCalculus package.  The Jacobian routine can also be used to calculate the determinant of the Jacobian.  The Jacobian is used in the application of a change of variables to a multiple integral.  Change of variables is explained in the following section.

Jacobianzx4yz,x+y2z,z3,x,y,z=2,1,C

C4C−211−2003C2

(7.1)

Jacobianzx4yz,x+y2z,z3,x,y,z=2,1,C,output=determinant

15C3

(7.2)

Change of Variables

The ChangeOfVariables and Revert commands can be used to rewrite integrals in a more convenient form, and to revert to the original form if the change was not successful, for example, if the endpoints of integration cannot be determined in terms of the new variables.

a:=∫02∫04x2yⅆxⅆy

a0204x2yⅆxⅆy

(8.1)

b:=ChangeOfVariablesa,cartesianx,y,polarr,θ

by=0y=2x=0x=4r4cosθ2sinθⅆrⅆθ

(8.2)

c:=Revertb

c0204x2yⅆxⅆy

(8.3)

The ChangeOfVariables routine can also be applied to triple integrals.

a:=∫∫∫xyzⅆxⅆyⅆz

axyzⅆxⅆyⅆz

(8.4)

ChangeOfVariablesa,cartesianx,y,z,cylindricalr,θ,u

r3cosθsinθuⅆrⅆθⅆu

(8.5)

Lagrange Multipliers

The LagrangeMultipliers command calculates or plots the local minima, local maxima, and saddle points of a function subject to constraints, using the method of Lagrange multipliers.

LagrangeMultipliersxy,x28+y221,x,y

2,1,2,−1,−2,1,−2,−1

(9.1)

LagrangeMultipliersxy,x28+y221,x,y,output=plot

LagrangeMultipliersxy,x28+y221,x,y,output=plot,showlevelcurves=false

Lines and Planes

The MultivariateCalculus package supports computations with lines and planes in two and three dimensions, using commands and using the context menu. This functionality will be demonstrated using some problems with answers.

Skew lines

Problem

 

a) Show that the lines R=A+t P and R=B+s Q, where A, B, P, and Q are defined by

x=32 t,y=2+5 t,z=6+t and x=5+4 s,y=7+2 s,z=3+2 s

 

    do not intersect and are not parallel (so they are skew lines);

b) Find the common normal between them.

c) Find the distance between them.

Solution using the context menu

Part a)

Form a list of parametric equations for each line, then select Context Menu: Calculus-Multivariate≻Line≻t (then s for the second line).

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

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

 

Form a sequence of the line names, select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Skew (or Parallel or Intersect).

L1&comma;L2 = << Line 1 >>,<< Line 2 >> = skew lines?true

L1&comma;L2 = << Line 1 >>,<< Line 2 >>parallel?false

L1&comma;L2 = << Line 1 >>,<< Line 2 >>intersect?false

 

Part b)

Form a plane parallel to both lines (it will contain the first line). Do this by forming a sequence of the line names, then selecting Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Plane.

L1&comma;L2 = << Line 1 >>,<< Line 2 >>make plane<< Plane 1 >>assign to a nameP1 

 

Now take the normal of this plane: select Context Menu: Calculus-Multivariate≻Normal.

P1 = << Plane 1 >>normal88−24

 

Part c)

Form a sequence of the line names, then select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Distance.

L1&comma; L2 = << Line 1 >>,<< Line 2 >>distance161111

Solution using commands

Part a)

Define the line objects.

L1  Linex&equals;32 t&comma;y&equals;2&plus;5 t&comma;z&equals;6&plus;t&semi;

L1<< Line 3 >>

(10.1.3.1)

L2  Linex&equals;5&plus;4 s&comma;y&equals;7&plus;2 s&comma;z&equals;3&plus;2 s&semi;

L2<< Line 4 >>

(10.1.3.2)

 

Test skewness with the command AreSkew (or AreParallel or Intersects).

AreSkewL1&comma; L2&semi;

true

(10.1.3.3)

AreParallelL1&comma; L2&semi;

false

(10.1.3.4)

IntersectsL1&comma; L2&semi;

false

(10.1.3.5)

 

Part b)

Form a plane parallel to both lines (it will contain the first line).

P1  PlaneL1&comma; L2&semi;

P1<< Plane 2 >>

(10.1.3.6)

 

Take the normal of this plane with the command GetNormal.

GetNormalP1&semi;

88−24

(10.1.3.7)

 

We can create a plot of these three objects as follows:

plotsdisplayGetPlotP1&comma; GetPlotL1&comma; vectoroptions&equals;width&equals;0.5&comma; GetPlotL2&comma; vectoroptions&equals;width&equals;0.5&comma; caption &equals; typesetThe plane &comma; &apos;P1&apos;&comma;  and the lines &comma; &apos;L1&apos;&comma;  and &comma; &apos;L2&apos;&comma; .&comma; axes&equals;none&semi;

 

Part c)

Use the Distance command.

DistanceL1&comma; L2&semi;

161111

(10.1.3.8)

 

Intersection of planes

Problem

 

a) Find a formula for the line &ell; that is the intersection of the planes

 

&pi;1&colon; 3 x7 y9 z&equals;8 and &pi;2&colon;5 x&plus;4 y2 z&equals;6 

 

b) Find an equation for the plane that contains &ell; and the point P:2&comma;3&comma;1.

Solution using the context menu

Part a)

Take the equation of each plane (with copy and paste, control-drag, or by retyping it) and create the planes by selecting Context Menu: Calculus-Multivariate≻Plane, then selecting Context Menu: Assign to a Name≻Q[1] or Q[2].

3 x7 y9 z&equals;8make plane<< Plane 3 >>assign to a nameQ1 

5 x&plus;4 y2 z&equals;6make plane<< Plane 4 >>assign to a nameQ2 

 

Create the sequence of the two names of planes, select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Intersection, and finally select Context Menu: Assign to a Name≻L.

Q1&comma; Q2 = << Plane 3 >>,<< Plane 4 >>intersection<< Line 5 >>assign to a nameL

 

To verify that L is indeed contained in the two planes, form a sequence of a plane name and the line name, select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Contains.

Q1&comma;L = << Plane 3 >>,<< Line 5 >>contains?true

Q2&comma;L = << Plane 4 >>,<< Line 5 >>contains?true

 

To get an equation, use the name for the line, select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Representation... . By choosing one of the forms from the drop down menu, one can select from five different representations:

L = << Line 5 >>representation47x50+z=3725&comma;39x50+y=1925   (here we selected 'equations')

L = << Line 5 >>representationx=496623+50t&comma;y=433311539t&comma;z=22793115+47t   (here we selected 'parametric')

L = << Line 5 >>representationt·50−3947+496623433311522793115   (here we selected 'vectors')

L = << Line 5 >>representation496623+50t433311539t22793115+47t   (here we selected 'combined_vector')

L = << Line 5 >>representationx5024815575 = y39+433121485 = z47+2279146405   (here we selected 'symmetric')

 

Part b)

Create the sequence of the line name and the list of coordinates of the point, select Context Menu: Evaluate and Display Inline, then select Context Menu: Calculus-Multivariate≻Plane..., and finally select Context Menu: Assign to a Name≻Q[3].

L&comma; 2&comma; 3&comma; 1 = << Line 5 >>,2&comma;−3&comma;1make plane<< Plane 5 >>assign to a nameQ3

 

Solution using commands

Part a)

Create the plane objects.

Q1  Plane3 x7 y9 z&equals;8&semi;

Q1<< Plane 6 >>

(10.2.3.1)

Q2  Plane5 x&plus;4 y2 z&equals;6&semi;

Q2<< Plane 7 >>

(10.2.3.2)

 

Use the GetIntersection command to compute the intersection.

L  GetIntersectionQ1&comma; Q2&semi;

L<< Line 6 >>

(10.2.3.3)

 

Use the GetRepresentation commands to get a formula for L. Several forms are available:

GetRepresentationL&semi;

t·50−3947+496623433311522793115

(10.2.3.4)

GetRepresentationL&comma; &apos;form &equals; equations&apos;&semi;

47x50+z=3725&comma;39x50+y=1925

(10.2.3.5)

GetRepresentationL&comma; &apos;form &equals; parametric&apos;&semi;

x=496623+50t&comma;y=433311539t&comma;z=22793115+47t

(10.2.3.6)

GetRepresentationL&comma; &apos;form &equals; combined_vector&apos;&semi;

496623+50t433311539t22793115+47t

(10.2.3.7)

GetRepresentationL&comma; &apos;form &equals; symmetric&apos;&semi;

x5024815575 = y39+433121485 = z47+2279146405

(10.2.3.8)

 

Part b)

Create the plane object.

Q3  PlaneL&comma; 2&comma; 3&comma; 1&semi;

Q3<< Plane 8 >>

(10.2.3.9)

 

To verify that Q3 indeed contains both L and the point 2&comma; 3&comma; 1, use the Contains command.

ContainsQ3&comma; L and ContainsQ3&comma; 2&comma; 3&comma; 1&semi;

true

(10.2.3.10)

 

Applications

The MultivariateCalculus package provides routines to calculate quantities such as function average, surface area, and center of mass, using multivariate calculus.

Function Average

The FunctionAverage command returns the integral used to determine the average of a function over a region or calculates the average of the function over the region.

FunctionAveragex2&plus;y2&comma;x&equals;0..1&comma;y&equals;0..1x2&comma;output&equals;integral

0x2+101x2+y2&DifferentialD;x&DifferentialD;y0x2+1011&DifferentialD;x&DifferentialD;y

(11.1.1)

FunctionAveragex2&plus;y2&comma;x&equals;0..1&comma;y&equals;0..1x2

x2+13+x2+1323x2+1

(11.1.2)

FunctionAverager2&comma;r&equals;0..1&comma;t&equals;0..&pi;2&comma;coordinates&equals;polarr&comma;t&comma;output&equals;integral

0π201r3&DifferentialD;r&DifferentialD;t0π201r&DifferentialD;r&DifferentialD;t

(11.1.3)

FunctionAverager2&comma;r&equals;0..1&comma;t&equals;0..&pi;2&comma;coordinates&equals;polarr&comma;t

12

(11.1.4)

FunctionAveragex2&plus;y2&plus;z&comma;x&equals;2..4&comma;y&equals;x1..x&plus;6&comma;z&equals;2..4&plus;y2&comma;output&equals;integral

−2y2+4x1x+624x2+y2+z&DifferentialD;x&DifferentialD;y&DifferentialD;z−2y2+4x1x+6241&DifferentialD;x&DifferentialD;y&DifferentialD;z

(11.1.5)

FunctionAveragex2&plus;y2&plus;z&comma;x&equals;2..4&comma;y&equals;x1..x&plus;6&comma;z&equals;2..4&plus;y2

392y23+756+2x+63y2+632x13y2+63+7y2+4214y2+84

(11.1.6)

Surface Area

The SurfaceArea command plots, constructs the integral for, or calculates the surface area of a curve within a region.

SurfaceAreax2&plus;y&comma;x&equals;2..2&comma;y&equals;1..1&comma;output&equals;plot

SurfaceAreax2&plus;y2&comma;x&equals;2..2&comma;y&equals;1..1&comma;output&equals;integral

−22−114x2+4y2+1&DifferentialD;y&DifferentialD;x

(11.2.1)

SurfaceAreax2&plus;y&comma;x&equals;2..2&comma;y&equals;1..1

122+2arcsinh22

(11.2.2)

Center of Mass

The CenterOfMass command plots, constructs the integral for, or calculates the center of mass of a curve within a region.

CenterOfMassx2&plus;y2&comma;x&equals;1..4&comma;y&equals;1..6&comma;output&equals;plot

CenterOfMassx2&plus;y2&comma;x&equals;1..4&comma;y&equals;1..6&comma;output&equals;integral

−1614xx2+y2&DifferentialD;x&DifferentialD;y−1614x2+y2&DifferentialD;x&DifferentialD;y,−1614yx2+y2&DifferentialD;x&DifferentialD;y−1614x2+y2&DifferentialD;x&DifferentialD;y

(11.3.1)

CenterOfMassx2&plus;y2&comma;x&equals;1..4&comma;y&equals;1..6

565208,765208

(11.3.2)

Return to Index of Example Worksheets