Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Construct an interpolating polynomial approximation of a function using the Padua points
ResourceFunction["PaduaInterpolation"][expr,{x,xmin,xmax},{y,ymin,ymax}] evaluates expr with x running from xmin to xmax and y running from ymin to ymax, and constructs a ResourceFunction["PaduaInterpolation"] object which represents an approximate bivariate function corresponding to the result. | |
ResourceFunction["PaduaInterpolation"][…][x,y] evaluates the interpolating function with particular arguments x and y. |
InterpolationOrder | 15 | order of the interpolating polynomial generated |
"PaduaType" | 1 | type of Padua points to use |
WorkingPrecision | MachinePrecision | the precision used in internal computations |
Construct the Padua interpolant corresponding to the function Sin[π x+Sin[π y]]:
In[1]:= |
See the value at zero:
In[2]:= |
Out[2]= |
Plot the Padua interpolant along with the original function:
In[3]:= |
Out[3]= |
See an interpolation function:
In[4]:= |
Out[4]= |
Get values for a few points:
In[5]:= |
Out[5]= |
A test function due to Franke:
In[6]:= |
Interpolate and plot over a rectangular domain:
In[7]:= |
Out[8]= |
Construct a Padua interpolant of the Dixon–Szegö function of degree 25:
In[9]:= |
Out[9]= |
Use type 3 Padua points in interpolating the Dixon–Szegö function:
In[10]:= |
Out[10]= |
Use 25-digit precision in the interpolation:
In[11]:= |
Out[11]= |
If the input function is a polynomial of degree k, PaduaInterpolation reproduces the original polynomial as long as k is less than the setting for InterpolationOrder:
In[12]:= |
Out[13]= |
A test function due to Franke:
In[14]:= |
Use the resource function PaduaPoints with InterpolatingPolynomial to construct a Padua interpolant:
In[15]:= |
Out[15]= |
Use PaduaInterpolation to construct a Padua interpolant:
In[16]:= |
The interpolant constructed using InterpolatingPolynomial evaluates faster, but the interpolant generated by PaduaInterpolation gives a more accurate answer:
In[17]:= |
Out[17]= |
In[18]:= |
Out[18]= |
This work is licensed under a Creative Commons Attribution 4.0 International License