Interpolation is the art of reading between the lines in a table. It may be regarded as a special case of the general process of curve fitting (Steps 26, Steps 28). More precisely, interpolation is the process whereby untabulated values of a function, given only at certain values, are estimated on the assumption that the function has sufficiently smooth behaviour between tabular points, so that it can be approximated by a polynomial of fairly low degree.
Interpolation is not as important in Numerical Analysis as it has been, now that computers (and calculators with built-in functions) are available, and function values may often be obtained readily by an algorithm (probably from a standard subroutine). However,
In Step 20, we have observed that, if the differences of order k are constant (within round-off fluctuation), the tabulated function may be approximated by a polynomial of degree k. Linear and quadratic interpolation correspond to the cases k = 1 and k = 2, respectively.
When a tabulated function varies so slowly that first differences are approximately constant, it may be approximated closely by a straight line between adjacent tabular points. This is the basic idea of linear interpolation. In Fig. 10, the two function points (xj, fj) and (xj+1, fj+1) are connected by a straight line. Any x between xj and xj+1 may be defined by a value of q such that
![]()
If f (x) varies only slowly in the interval, a value of the function at x is approximately given by the ordinate to the straight line at x. Elementary geometrical considerations yield
![]()
so that
.

FIGURE 10. Linear interpolation.
In analytical terms, we have approximated f (x) by
,
the linear function of x which satisfies
,
As an example, consider the following difference table, taken from a 4D table of e-x:
,
The first differences are almost constant locally, so that the table is suitable for linear interpolation. For example,
.
As previously indicated, linear interpolation is appropriate only for slowly varying functions. The next simple process is quadratic interpolation, based on a quadratic approximating polynomial; one might expect that such an approximation would give better accuracy for functions with larger variations.
Given three adjacent points xj, xj+1 = xj and xj+2 = xj + 2h, suppose that f (x) can be approximated by
,.
where a, b, and c are chosen so that
.
Thus,
.
whence
.
Setting
, we obtain the quadratic interpolation
formula:
.
We note immediately that this formula
introduces a second term (involving
), not included in the linear interpolation
formula.
As an example, we determine the second-order correction to the value of f (0.934) obtained above using linear interpolation. The extra term is
![]()
so that the quadratic interpolation formula yields
![]()
(In this case, the extra term -0.0024/200 is negligible!)
![]()
Compare your estimate with the
value of sin(0.55) given by your calculator.
.
Obtain an estimate of cos(80° 35') by means of
![]()
Is it more appropriate to use linear or quadratic interpolation? Obtain an estimate of tan(80° 35').