ABSTRACT

First let's consider a completely general procedure for fitting a polynomial to a set of equally spaced or unequally spaced data. Given n + I sets of data [xo,/(xo)], [XI '/(x\)], ... , [XI/'/(XI/)]' which will be written as (xo'/o), (XI ,Jj), ... , (XI/,fn), determine the unique nth-degree polynomial ?I/(x) that passes exactly through the n + I points:

(4.34)

For simplicity of notation, letf(xi) = J;. Substituting each data point into Eq. (4.34) yields n + I equations:

(4.35.0) (4.35.1)

(4.35.n)

There are n + I linear equations containing the n + I coefficients ao to all" Equation (4.35) can be solved for ao to aI/ by Gauss elimination. The resulting polynomial is the unique nth-degree polynomial that passes exactly through the n + I data points. The direct fit polynomial procedure works for both equally spaced data and unequally spaced data.