Introduction to Numerical Analysis Using MATLAB

In this chapter we describe numerical methods for the approximation of functions other than elementary functions. The main purpose of these techniques is to replace a complicated function by one that is simpler and more manageable. We sometimes know the value of a function f ( x ) at a set of points (say, x 0< x 1< x 2 < x n) but we do not have an analytic expression for f ( x ) that lets us calculate its value at an arbitrary point. We concentrate on techniques that may be adapted if, for example, we have a table of values of functions that may have been obtained from some physical measurement or some experiments or long numerical calculations that cannot be cast into a simple functional form. The task now is to estimate f(x) for an arbitrary point x by, in some sense, drawing a smooth curve through (and perhaps beyond) the data point x i . If the desired x is in between the largest and smallest of the data point, then the problem is called interpolation; and if x is outside that range, it is called extrapolation. In this chapter we shall restrict our attention to interpolation. It is a rational process generally used in estimating a missing functional value by taking a weighted average of known functional values at neighboring data points.
An interpolation scheme must model the function...