Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the divided difference of a polynomial
ResourceFunction["PolynomialDividedDifference"][poly,{x,a,b}] evaluates the divided difference of the polynomial poly with respect to the variable x at a and b. |
Symbolically evaluate the divided difference of a polynomial:
In[1]:= |
![]() |
Out[1]= |
![]() |
Numerically evaluate the divided difference of a polynomial:
In[2]:= |
![]() |
Out[2]= |
![]() |
Divided difference of a polynomial with symbolic coefficients:
In[3]:= |
![]() |
Out[3]= |
![]() |
Divided difference of a polynomial with numerical coefficients:
In[4]:= |
![]() |
Out[4]= |
![]() |
A high-degree polynomial:
In[5]:= |
![]() |
Directly evaluating the divided difference through its definition gives a result that is not very accurate:
In[6]:= |
![]() |
Out[6]= |
![]() |
PolynomialDividedDifference gives a more accurate result:
In[7]:= |
![]() |
Out[7]= |
![]() |
Use PolynomialDividedDifference to evaluate a definite integral:
In[8]:= |
![]() |
In[9]:= |
![]() |
Out[9]= |
![]() |
Compare with the result using Integrate:
In[10]:= |
![]() |
Out[10]= |
![]() |
Evaluate the q-derivative of a polynomial using PolynomialDividedDifference:
In[11]:= |
![]() |
In[12]:= |
![]() |
Out[12]= |
![]() |
In the limit q→1, the q-derivative reduces to the derivative:
In[13]:= |
![]() |
Out[13]= |
![]() |
In[14]:= |
![]() |
Out[14]= |
![]() |
When b=a, the divided difference of a polynomial p(x) at a and b is equal to the derivative of p(x), evaluated at x=a:
In[15]:= |
![]() |
In[16]:= |
![]() |
Out[16]= |
![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License