** Next:** Lagrange Interpolation

When it is expensive or difficult to evaluate a function at an
arbitrary value of , we might consider, instead, interpolating from
a table of values. Consider the exponential integral,

tabulated below for small .
This function diverges as at . To evaluate it
requires doing the integral, or summing a series, so it is somewhat
expensive. Suppose we want the value of
. A very crude
approximation chooses either of the two nearby values
or
. A common and somewhat better approach
makes a linear interpolation. Since 0.15 is midway between 0.1 and 0.2
the linear interpolation just averages the two values, giving
.