DirectionalDerivative - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Student[MultivariateCalculus]

  

DirectionalDerivative

  

compute the directional derivative

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

DirectionalDerivative(f, vars, dir, r1, r2, r3, opts)

DirectionalDerivative(f, vars=pt, dir, r1, r2, r3, opts)

Parameters

f

-

algebraic, list(algebraic), or Vector(algebraic); a function in n-variables; this function can be vector-valued, in which case it must be a list or a Vector of its component functions

vars

-

list(name); a list of the form [x1, x2, ..., xn] specifying the n independent variables of f

pt

-

list(name) or list(realcons); a list of values representing the point at which the directional derivative is evaluated; the dimension of this point must be the same as the number of variables specified in var

dir

-

list(realcons) or list(name); a list of values representing the direction vector with which the directional derivative is evaluated

r1

-

(optional) equation of the form x1=x1_min..x1_max, where x1 is a variable given in vars

r2

-

(optional) equation of the form x2=x2_min..x2_max, where x2 is a variable given in vars; together with r1, r2 specifies the plot or animation ranges for the independent variables specified in vars; note that plotting and animating are only available if f is a real-valued (scalar) function of two variables

r3

-

(optional) equation of the form z=z_min..z_max, where z is any name not in vars; this range specifies the plotting or animation range for the dependent variable (the z-axis)

opts

-

(optional) equation(s) of the form option=value; these equations specify the output options; please see the Options section for details

Options

• 

The opts argument can contain any of the following equations that set output options.

• 

directionoptions = list

Specifies the plot options for plotting the direction vector. For more information on plotting options, see plot3d/options.

• 

frames = posint

Specifies the number of frames in the animation. This option is only valid when output = animation. The default is 5.

• 

functionoptions = list

Specifies the plot options for plotting the function f. For more information on plotting options, see plot3d/options.

• 

output = value, plot, or animation

This option controls the return value of the function. The default is output = value.

– 

output = value specifies that the computed value of the derivative is returned. Plot options and the range arguments r1, r2, and r3 are ignored if output = value.

– 

output = plot specifies that a plot of the directional derivative is displayed, showing the function, the tangent plane at the specified point, the direction vector, and the direction vector projected onto the tangent plane at the specified point. Note that the length of the vector in the tangent plane corresponding to the specified direction is chosen to illustrate the concept and is not the magnitude of the directional derivative. Also, the plotting functionality is only available if f is a real-valued (scalar) function of two variables.

– 

output = animation specifies that an animation is displayed, showing the function, the tangent plane, the direction vector (whose direction varies as the animation plays), and the direction vector projected onto the tangent plane at the specified point. Note that the animation functionality is only available if f is a real-valued (scalar) function of two variables.

• 

showdirection = true or false

Determines whether the direction vector is plotted. The default is true.

• 

showfunction = true or false

Determines whether the function f is plotted. The default is true.

• 

showtangentplane = true or false

Determines whether the tangent plane is plotted. The default is true.

• 

tangentoptions = list

Specifies the plot options for plotting the tangent to f. For more information on plotting options, see plot3d/options.

• 

For information on how to change the default colors, see the Student[SetColors] help page.

• 

caption = anything

A caption for the plot. The default caption is constructed from the parameters and the command options. caption = "" disables the default caption.  For more information about specifying a caption , see plot/typesetting.

Description

• 

The DirectionalDerivative command returns the directional derivative of f, evaluated at pt if it is specified, in the direction given by dir; that is, the product of the Jacobian matrix of the function f, evaluated at pt if it is specified, and the normalized direction vector dir.

• 

In particular, if f is a real-valued (scalar) function, then this command returns the dot product of the gradient of f and the normalized direction vector dir, which is a scalar.

• 

If the output option in opts is specified to be plot or animation, the command returns a plot of the directional derivative or an animation of the directional derivative in various directions, respectively. Otherwise, by default, the output is the computed value of the directional derivative.

• 

The DirectionalDerivativeTutor routine offers equivalent capabilities to DirectionalDerivative in a tutor interface. See the Student[MultivariateCalculus][DirectionalDerivativeTutor] help page.

• 

For the DirectionalDerivative command, it is assumed the user is doing real variable calculus, however, complex numbers can be generated by some calculations.

Examples

withStudentMultivariateCalculus:

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

225

(1)

DirectionalDerivativex2+y2,x,y=4,4,4,4,output=animation,frames=7

The command to create the plot from the Plotting Guide is

DirectionalDerivativex2+y2,x,y=4,4,6,6,x=8..2,y=0..6,z=0..40,output=plot

See Also

Physics[Vectors][DirectionalDiff]

plot3d/options

Student

Student[MultivariateCalculus]

Student[MultivariateCalculus][DirectionalDerivativeTutor]

tensor[directional_diff]

VectorCalculus[DirectionalDiff]

 


Download Help Document