Interactive Educational Modules in
Scientific Computing

Convergence of Polynomial Interpolants

This module demonstrates the convergence (or nonconvergence) of the polynomial interpolants to a given continuous function as the number of interpolation points, and hence the degree of the interpolating polynomial, grows.

The user chooses the function to be interpolated, the number of interpolation points, and whether the locations of the points are to be either equally spaced or at the Chebyshev points. The chosen function and polynomial interpolant are plotted along with two error bounds. The polynomial interpolant must always lie within the shaded area defined by either error bound. For a description of the error bounds, see the error bound module. For the first example, Runge's function f(x) = 1 ⁄ (1+25x2), the polynomial interpolants using equally spaced points fail to converge even though the function is smooth. The polynomial interpolants using equally spaced points do converge for the next two examples, the Gaussian distribution and the cosine function. For the last function, f(x) = 1 − | x |, which is not differentiable at 0, the interpolants using equally spaced points fail to converge. (Note that the error bounds are inapplicable for this function because of its lack of differentiability.) By contrast, interpolating at the Chebyshev points yields convergent interpolants for all four functions.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 7.3.5, especially Figures 7.7 and 7.8.

Developers: Evan VanderZee and Michael Heath