Scientific Computing

This module depicts two bounds for the difference between a continuous function and a polynomial interpolating the function at a discrete set of points.

The selected function is plotted over a predefined interval. The polynomial interpolating the function at the selected set of points is also plotted. Based on the chosen set of points and on a bound for the appropriate derivative of the function, two bounds on the maximum distance between the function and the interpolant are computed, and each is shown in the plot by colored shading. The polynomial interpolant must always lie within the shaded area defined by either error bound.

The tighter error bound applies only at a specific point where it is calculated, so it varies throughout the interval. The looser error bound, on the other hand, is a fixed value that applies over the entire interval of interpolation. The looser error bound, which is derived from the tighter error bound, is simple to apply because it requires only a single calculation, but the tighter error bound yields more detailed insight. For example, it shows that the error is zero at the interpolation points.

The looser error bound is always worse for the Chebyshev points than for equally spaced points because this bound is based on the maximum difference between the abscissas of adjacent interpolation points. The tighter error bound, however, illustrates that using the Chebyshev points for interpolation can distribute the error more evenly throughout the domain of the function. Interpolating the reciprocal function for a relatively large number of points makes this particularly evident.

**Reference:** *Scientific Computing,
An Introductory Survey*, 2nd edition, McGraw-Hill, New York,
2002. See Section 7.3.5; the tighter error bound is based on the first
equation on page 324, while the looser bound is given by the last
inequality on page 324.

**Developers:** Evan VanderZee and Michael Heath