Evaluate

Basic Examples

A rational interpolation of degree (2,4) to
e
x
at seven equally spaced points between 0 and 2:

○
RationalInterpolation
[E^x,{x,2,4},Range[0,2,1/3]]
In[]:=
1.+0.379962x+0.0469528x
2
1-0.620029x+0.166914x
2
-0.0234058x
3
+0.00145279x
4
Out[]=

The error between the function and the approximation tends to get larger near the endpoints:

Plot[%-E^x,{x,0,2},PlotRangeAll]
In[]:=
Out[]=

Automatically chosen the interpolation points: result in a smaller maximum error:

○
RationalInterpolation
[E^x,{x,2,4},{x,0,2}]
In[]:=
1.+0.379827x+0.0468693x
2
/1-0.620166x+0.166978x
2
-0.0234119x
3
+0.00145192x
4
Out[]=
Plot[%-E^x,{x,0,2}]
In[]:=
Out[]=

Options

“Bias”

Bias the distribution of the points to the right to get smaller errors there and larger errors to the left:

○
RationalInterpolation
[E^x,{x,2,4},{x,0,2},"Bias".25]
In[]:=
1.+0.386186x+0.0491526x
2
1-0.613792x+0.16282x
2
-0.0223404x
3
+0.0013436x
4
Out[]=
Plot[%-E^x,{x,0,2}]
In[]:=
Out[]=