Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the directional derivative of a function
ResourceFunction["DirectionalD"][f,r,vars] computes the derivative of a function f in the direction r with variables vars. |
Directional derivative of a function of two variables:
In[1]:= | ![]() |
Out[1]= | ![]() |
Directional derivative of a function of three variables:
In[2]:= | ![]() |
Out[2]= | ![]() |
Directional derivative with a zero component in one direction:
In[3]:= | ![]() |
Out[3]= | ![]() |
A unit vector along direction (3/2,1):
In[4]:= | ![]() |
Out[4]= | ![]() |
Without normalization:
In[5]:= | ![]() |
Out[5]= | ![]() |
Evaluated at the point p=(3/2,1):
In[6]:= | ![]() |
Out[6]= | ![]() |
Define a function:
In[7]:= | ![]() |
Compute the directional derivative:
In[8]:= | ![]() |
Out[8]= | ![]() |
Directional derivative in the direction (-1,-1/2) evaluated at the point (-1,3/2):
In[9]:= | ![]() |
Out[9]= | ![]() |
A plot of the directional derivative:
In[10]:= | ![]() |
Out[10]= | ![]() |
Visualize directional derivatives over a surface:
In[11]:= | ![]() |
Out[12]= | ![]() |
The directional derivative (red) and the gradient (blue):
In[13]:= | ![]() |
Out[13]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License