I've seen that in Newton's method for interpolating polynomials, the coefficients can be found algorithmically using (in Python-ish):

a = Y_DataPoints.copy()
m = length(X_DataPoints)
for k in range(1,m):
       a[k: m] = (a[k:m] - a[k-1]) / (X_Data[k:m] - X_Data[k-1]) 

But I don't really understand the model is subtracting all points past $k_{i}$ by $k_{i-1}$. It seems like you would only subtract $k_{i}$ by $k_{i-1}$, not the entire vector.

Can someone shed some light on this?

EDIT: Spelling

  • 2
    $\begingroup$ Are you talking about the method for interpolating datapoints by polynomials? $\endgroup$ – Wolfgang Bangerth Oct 21 '13 at 2:14
  • $\begingroup$ yes I am. I'll edit my OP $\endgroup$ – 1ifbyLAN2ifbyC Oct 21 '13 at 12:26
  • $\begingroup$ Your python code (line 3) is not valid... $\endgroup$ – Jan Oct 21 '13 at 13:03
  • $\begingroup$ I think there's another typo in the last line. Shouldn't it be a[k:m] instead of a[k:length(m)]? $\endgroup$ – Wolfgang Bangerth Oct 21 '13 at 13:13

If you compute the coefficients of the Newton polynomial via the scheme of divided differences linewise (what is often a good choice since then one can simply add additional data), in every line, you have to compute the differences with a fixed X_data point. Also, depending on how you store the "new" abscissae in Y_DataPoints, in every line you have to take the differences with a fixed function value.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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