Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With the following data set, what is the best way to interpolate the data for each time.

Time    X    Y
0      10    15
24     28    17
49     9     14
share|cite|improve this question
Best way in what sense? There are different methods and each has its own dis/advantages. – Gigili Aug 1 '12 at 8:51
Now I think about it more, I guess just a linear straight line fit is best for my usage. As I know my objects position at 0 and at 24, and need to estimate as close as possible where it is at any other time. in this instance it is a cube structure rotating slightly off-axis. – davivid Aug 1 '12 at 9:03
up vote 2 down vote accepted

You can use Newton's divided differences interpolation polynomial which is easy to use and if you add a new point to the set, you don't have to calculate everything again.

So you'll have a table with four columns, $x_i, y_i$ and divided differences where:

$$f\left[x_0,x_1,\dots, x_n\right]=\dfrac{f\left[x_0,x_1,\dots, x_{n-1}\right]-f\left[x_1,\dots, x_n\right]}{x_0-x_n}$$

Then, for example, you have:

$x_0=10, y_0=15, x_1=28,y_1=17$: $$f[x_0,x_1]=\dfrac{y_0-y_1}{x_0-x_1}=\dfrac{15-17}{10-28}=0.11$$



Thus, the interpolating polynomial is:


And it's easy to take it from here.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.