17

I'm just wondering, what are the advantages of using either the Newton form of polynomial interpolation or the Lagrange form over the other? It seems to me, that the computational cost of the two are equal, and seeing as the interpolated polynomial is unique, why ever use one over the other?

I get that they give different forms of the polynomial, but when is one form superior to the other?

4 Answers4

13

Frankly, Lagrange interpolation is mostly just useful for theory. Actually computing with it requires huge numbers and catastrophic cancellations. In floating point arithmetic this is very bad. It does have some small advantages: for instance, the Lagrange approach amounts to diagonalizing the problem of finding the coefficients, so it takes only linear time to find the coefficients. This is good if you need to use the same set of points repeatedly. But all of these advantages do not make up for the problems associated with trying to actually evaluate a Lagrange interpolating polynomial.

With Newton interpolation, you get the coefficients reasonably fast (quadratic time), the evaluation is much more stable (roughly because there is usually a single dominant term for a given $x$), the evaluation can be done quickly and straightforwardly using Horner's method, and adding an additional node just amounts to adding a single additional term. It is also fairly easy to see how to interpolate derivatives using the Newton framework.

Ian
  • 104,572
  • can you give an example when one would need to use the same set of points repeatedly? Thanks – jayjay May 08 '20 at 17:00
  • @Jung Doing recalibration of an instrument where you take measurements at the same values of the independent variable and change something else (or are trying not to change anything and are just recalibrating to avoid error). With computers this advantage is rather trivial, though. In principle you might hope that the expression for the Lagrange interpolant would have some terms dominating over other terms so that you could gain intuition by some kind of approximation including only some of the terms...but actually this only holds if you are far closer to one node than any other nodes. – Ian May 08 '20 at 17:15
8

Here are two differences:

  • Lagrange's form is more efficient when you have to interpolate several data sets on the same data points.

  • Newton's form is more efficient when you have to interpolate data incrementally.

lhf
  • 221,500
  • That makes good sense, especially the thing about the Lagrange form.

    When you say that the Newton form is more effecient when interpolating data incrementally, do you mean that it's more efficient when adding data points to the existing interpolation (just want to make sure, that I'm getting this right :) ). If so, is that because the divided differences are determined recursively, so that all the prior values are used in the computation of the next one?

    – Phillip Bredahl Nov 02 '15 at 15:47
  • 1
    @phibre, use, that's what I meant. – lhf Nov 02 '15 at 16:12
6

Lagrange method is mostly a theoretical tool used for proving theorems. Not only it is not very efficient when a new point is added (which requires computing the polynomial again, from scratch), it is also numerically unstable.

Therefore, Newton's method is usually used. However, there is a variation of the Lagrange interpolation, which is numerically stable and computationally efficient! Unfortunately, this method is not very known...

I am attaching a link to a paper from SIAM Review called "Barycentric Lagrange interpolation", which is not difficult to read. I hope you will find it interesting.

http://epubs.siam.org/doi/abs/10.1137/S0036144502417715

(A typo for that article is noted at https://people.sc.fsu.edu/~jburkardt/py_src/barycentric_interp_1d/barycentric_interp_1d.html)

smichr
  • 560
Gil
  • 774
1

Here is an example of a problem that is much easier using Newton interpolation than Lagrange interpolation. Let $p(x)$ be the unique polynomial of degree $n$ such that

$$p(k) = 3^k, 0 \le k \le n.$$

What is $p(n + 1)$?

Qiaochu Yuan
  • 468,795