Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Grad enhanced to evaluate using limits and at several points
ResourceFunction["EnhancedGrad"][f,{x1,…,xn},{a1,…,an}] returns the gradient evaluated at the point {a1,…,an}. | |
ResourceFunction["EnhancedGrad"][f,{x1,…,xn}] returns Grad[f,{x1,…,xn}]. | |
ResourceFunction["EnhancedGrad"][f,{x1,…,xn},chart] returns the gradient with respect to chart. |
Find the gradient of a function evaluated at several points:
In[1]:= |
Out[1]= |
Grad is unable to find the correct value of the gradient of the following function at the point (0,0):
In[2]:= |
Out[2]= |
EnhancedGrad is able to find the correct value of the gradient by setting the option "UseLimit" to True:
In[3]:= |
Out[3]= |
A piecewise function requiring "UseLimit":
In[4]:= |
Out[6]= |
This work is licensed under a Creative Commons Attribution 4.0 International License