The control "interpolating polynomial" displays the Lagrange interpolating polynomial of the knots
(corresponding to the locators), obtained via the Mathematica
built-in function InterpolatingPolynomial
. If "derivative degree" is greater than "spline degree", the highest nonzero derivative is shown. The locators' ranges are restricted to keep most of the spline within the range of the plot.
The naive spline algorithm used to generate the spline is locally recursive in the abscissas, that is, the equation of the spline in the interval
depends on that in the interval
(precisely, on the derivatives
). It follows that the spline is particularly well-behaved in
for low values of
, while dispersion phenomena increase for high values. As a consequence, oscillation phenomena are expected on the right of a given interval rather than on the left and, more generally,
is (significantly) increasing with respect to both
Snapshots 1, 2: Quadratic and linear splines shown with their first derivatives.
Snapshot 3: Shows general Gibbs phenomenon for splines. In the presence of a "step" in the knots' list, that is, whenever
, the spline displays significant local oscillation.
Snapshot 4: Shows general Runge's phenomenon for the Lagrange polynomial. The Lagrange polynomial (yellow) often displays a general Runge's phenomenon, that is, significant oscillation in the extremal (left/right) regions of the plot, while the spline (blue) is not affected by the issue in the leftmost interval.
Snapshot 5: Spline interpolation allows the spline to be locally nonhomogeneous in its degree, that is, including (isolated) pieces (here in
) with lower degree, in order to obtain continuity of the
Snapshot 6: Spline interpolation may be locally (although not globally) arbitrarily close to Lagrange interpolation, even if the spline degree is strictly lower than that of Lagrange polynomial.