From: rusin@vesuvius.math.niu.edu (Dave Rusin) Newsgroups: sci.math Subject: Re: 10th order polynomial from 11 data points Date: 22 Nov 1997 20:25:17 GMT In article <6eguoCAcQxd0EwXw@lynagh.demon.co.uk>, Ian Lynagh wrote: >In an experiment I collected 2 sets of 11 data points >and I now need to find the area under the graph. However, >first I need a function which I can integrate. Can anyone >recommend a program I can download which will find a 10th >order polynomial if I give it the points? Getting the polynomial is no problem for just 11 points. You simply compute Sum_i y_i * Prod_{j <> i} (X-x_j)/(x_i-x_j) which clearly takes the value y_i when we substitute X = x_i. But you do need to ask if this is "the graph". Do you have any reason to suspect that the function you're observing in this experiment is really a degree-10 polynomial? Do you really know your points (x_i, y_i) are accurate? If the answer to either question is "not really", then the integral of this polynomial could well be far from the value you hope you're computing. Much more reasonable, I would think, would be to do one of the following: 1. Decide, on the basis of the theory of whatever field your experiment is in, what kind of relationship x and y should be in -- linear, perhaps, or y quadratic in x, or y an exponential in x. Then use some statistical technique to choose the "best" curve of this type to fit the data. _Then_ you have a function to integrate. 2. Or, assume the 11 measurements are accurate, but assume something else about the function than that it be a degree-10 polynomial. Two reasonable suggestions come to mind: assume either that f is locally constant or piecewise linear. (Those are the assumptions involved in estimating an integral via a Riemann sum or via the trapezoidal rule, after all). dave