compute the directional derivative
DirectionalDerivative(f, vars, dir, r1, r2, r3, opts)
DirectionalDerivative(f, vars=pt, dir, r1, r2, r3, opts)
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
list(name); a list of the form [x1, x2, ..., xn] specifying the n independent variables of f
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
list(realcons) or list(name); a list of values representing the direction vector with which the directional derivative is evaluated
(optional) equation of the form x1=x1_min..x1_max, where x1 is a variable given in vars
(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
(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)
(optional) equation(s) of the form option=value; these equations specify the output options; please see the Options section for details
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.
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.
The command to create the plot from the Plotting Guide is
Download Help Document
What kind of issue would you like to report? (Optional)