Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether a single-variable, real-valued function is differentiable
ResourceFunction["PossiblyDifferentiableQ"][f,x] returns True if f is differentiable with respect to x for all real numbers. | |
ResourceFunction["PossiblyDifferentiableQ"][f,{x,n}] returns True if f is n-times differentiable with respect to x for all real numbers. | |
ResourceFunction["PossiblyDifferentiableQ"][{f,cons},x] returns True if f is differentiable with respect to x for the real numbers that satisfy the constraint cons. | |
ResourceFunction["PossiblyDifferentiableQ"][{f,cons},{x,n}] returns True if f is n-times differentiable with respect to x for the real numbers that satisfy the constraint cons. |
lhs==rhs | equations |
lhs>rhs,lhs≥rhs,lhs<rhs,lhs≤rhs | inequalities (LessEqual,…) |
Determine if a function is differentiable over all real numbers:
In[1]:= |
Out[1]= |
In[2]:= |
Out[2]= |
Determine if a function is differentiable for a particular set of x-values:
In[3]:= |
Out[3]= |
The constraint can also be a logical combination of inequalities:
In[4]:= |
Out[4]= |
Determine if a function is 5-times differentiable:
In[5]:= |
Out[5]= |
PossiblyDifferentiableQ has the attribute HoldFirst, enabling calculations such as the following:
In[6]:= |
Out[6]= |
For some edge cases, PossiblyDifferentiableQ will return True even if the given function is not differentiable everywhere:
In[7]:= |
In[8]:= |
Out[8]= |
Since PossiblyDifferentiableQ takes only real-valued functions, it will treat Abs as RealAbs:
In[9]:= |
Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License