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
with⁡Student:-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⁡
TaylorApproximationTutor⁡sin⁡x+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.
TaylorApproximation⁡sin⁡x+y,x,y=1,0,5
cos⁡1⁢y5120+sin⁡1⁢y424+cos⁡1⁢x−1⁢y424−cos⁡1⁢y36+sin⁡1⁢x−1⁢y36+cos⁡1⁢x−12⁢y312−sin⁡1⁢y22−cos⁡1⁢x−1⁢y22+sin⁡1⁢x−12⁢y24+cos⁡1⁢x−13⁢y212+cos⁡1⁢y−sin⁡1⁢x−1⁢y−cos⁡1⁢x−12⁢y2+sin⁡1⁢x−13⁢y6+cos⁡1⁢x−14⁢y24+sin⁡1+cos⁡1⁢x−1−sin⁡1⁢x−122−cos⁡1⁢x−136+sin⁡1⁢x−1424+cos⁡1⁢x−15120
The following creates an animation. To run any of the animations in this worksheet:
Click the plot. The plot toolbar is displayed.
In the toolbar, click the Play button.
Alternatively, right-click (Control-click, on Mac) the plot to display the context menu. Select Animation > Play.
TaylorApproximation⁡sin⁡x+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⁡
CrossSectionTutor⁡x2+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.
CrossSection⁡x2+y2+z2=4,x+y=1.1,0.1,x=−2..2,y=−2..2,z=−2..2,showfunction=false,title=Sphere
CrossSection⁡x2+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⁡
DirectionalDerivativeTutor⁡x2+3⁢y12,x,y=1,2,2,3
GradientTutor⁡
GradientTutor⁡y⁢x2+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.
DirectionalDerivative⁡x2+y2,x,y=1,2,3,4
225
DirectionalDerivative⁡x2+3⁢y12,x,y=1,1,1,−1,output=animation,frames=15
Gradientx2+y2, x,y=0,1;
02
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.
SecondDerivativeTest⁡x2+y2,x,y=0,0,output=hessian
2002
SecondDerivativeTest⁡x2−y2,x,y=0,0
LocalMin=,LocalMax=,Saddle=0,0
SecondDerivativeTest⁡x2+y2+z2,x,y,z=1,2,1,2,3,1,0,0,0,output=hessian
200020002,200020002,200020002
SecondDerivativeTest⁡x2+y2+z2,x,y,z=1,2,1,2,3,1,0,0,0
LocalMin=0,0,0,LocalMax=,Saddle=
Integrals in Multivariate Calculus
The MultiInt routine of the MultivariateCalculus provides an interface for the construction or evaluation of multiple integrals.
MultiInt⁡x2⁢y,y=x−1..x+1,x=0..4,output=integral
Int⁡x2⁢y,y=x−1..x+1,x=0..4
MultiInt⁡x2⁢y,y=x−1..x+1,x=0..4
128
MultiInt⁡x2+y2+z,z=−2..4+y2,y=x−1..x+6,x=2..4,output=integral
Int⁡x2+y2+z,z=−2..y2+4,y=x−1..x+6,x=2..4
MultiInt⁡x2+y2+z,z=−2..4+y2,y=x−1..x+6,x=2..4
213375445
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⁡
ApproximateIntTutor⁡x3−y2+x⁢y,y=−4..4
ApproximateIntTutor⁡r,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.
ApproximateInt⁡r,r=0..5,t=0..π2,coordinates=polar,output=plot,showfunction=false,prismoptions=color=green,method=upper
ApproximateInt⁡x2+y2,x=−4..4,y=−6..6,output=animation,partition=6,6,frames=2..7
ApproximateInt⁡x2+y2,x=−4..4,y=−6..6,output=value,partition=6,6
1617.777776
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.
Jacobian⁡z⁢x−4⁢y⁢z,x+y−2⁢z,z3,x,y,z=2,1,C
C−4⁢C−211−2003⁢C2
Jacobian⁡z⁢x−4⁢y⁢z,x+y−2⁢z,z3,x,y,z=2,1,C,output=determinant
15⁢C3
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∫04x2⁢yⅆxⅆy
Int⁡x2⁢y,x=0..4,y=0..2
b:=ChangeOfVariables⁡a,cartesianx,y,polarr,θ
Student:-MultivariateCalculus:-ChangeOfVariablesObject⁡Int⁡Int⁡r4