Function Repository Resource:

# DirectionalDerivativePlot3D

Visualize the directional derivative in a 3D plot

Contributed by: Dennis M Schneider
 ResourceFunction["DirectionalDerivativePlot3D"][f,{x,xmin,xmax},{y,ymin,ymax},pt,v]]] returns a plot of f along with a plot of the directional derivative vector at the point pt in the direction of the vector v. Several points and/or vectors can be given in a list.

## Details and Options

Setting "SectionStyle"Tube[0] will suppress drawing the section.
Setting "DrawGraph"False will suppress the plot and return the directional derivative.
ResourceFunction["DirectionalDerivativePlot3D"] has the following options in addition to those for the resource function SectionPlot3D and Plot3D:
 "ArrowSize" Medium size of the arrowhead "BaseVectorPosition" Automatic determines the position of the base vector if drawn "DrawBaseVector" False whether to draw the base vector "DrawGraph" True whether to include the plot of the surface "DrawPlane" False whether to include the plane determining the section "PointStyle" PointSize[Large] graphics directive to specify the style for the point(s) "PrintDisplay" False whether to print the value of the directional derivative "SectionStyle" {{Tube[0.01],Black}} style for the section determined by the direction vector "UseLimit" False whether to use the limit definition to calculate the directional derivative "VectorStyle" {{Thickness[Medium],Red}} graphics directive to specify the style for the vector(s)

## Examples

### Basic Examples (1)

Visualize a directional derivative:

 In[1]:=
 Out[1]=

### Scope (13)

Suppress drawing the section curve:

 In[2]:=
 Out[2]=

Plot using two direction vectors:

 In[3]:=
 Out[3]=

Include a print of the values of the directional derivatives:

 In[4]:=
 Out[4]=

Return just a print of the points and the directional derivatives:

 In[5]:=
 Out[5]=

Plot using two direction vectors and two points:

 In[6]:=
 Out[6]=

If "DrawBaseVector" is set to True, then the vector determining the direction is plotted at the bottom of the plot:

 In[7]:=
 Out[7]=

Include the plane determining the section along with the base vector in the plot:

 In[8]:=
 Out[8]=

The option "BaseVectorPosition" allows the vector to be plotted in any horizontal plane:

 In[9]:=
 Out[9]=

Set a style for the vectors:

 In[10]:=
 Out[10]=

Add the base vectors and lower their position:

 In[11]:=
 Out[11]=

A function requiring both "UseLimit” and ResourceFunction["UseRealRoots"]:

 In[12]:=
 Out[12]=

Without using ResourceFunction["UseRealRoots"]:

 In[13]:=
 Out[13]=

Without using the option "UseLimit":

 In[14]:=
 Out[14]=

Another function requiring the option "UseLimit” and ResourceFunction["UseRealRoots"]:

 In[15]:=
 Out[16]=

## Publisher

Dennis M Schneider

## Version History

• 1.1.0 – 11 July 2022
• 1.0.1 – 15 January 2021
• 1.0.0 – 16 September 2020