Skip to main content

Lagrange Interpolation

Lagrange interpolation6^6 gives a way of fitting a polynomial through at set of points. The basic polynomial is

P(x)=j=1nPj(x)P(x) = \sum_{j = 1}^{n}{P_{j}(x)}


Pj(x)=yjk=1,kjnxxkxjxkP_{j}(x) = y_{j}\prod_{k = 1,k \neq j}^{n}\frac{x - x_{k}}{x_{j} - x_{k}}

In order to generate a curve in space it is convenient to consider this as a four dimensional problem with parameter tt as the independent variable. This ensures that tt is monotonic avoid singularities. The resulting modified equations are

P(t)=j=1nPj(t)\mathbf{P}(t) = \sum_{j = 1}^{n}{\mathbf{P}_{j}(t)}


Pj(t)=xjk=1,kjnttktjtk\mathbf{P}_{j}(t) = \mathbf{x}_{j}\prod_{k = 1,k \neq j}^{n}\frac{t - t_{k}}{t_{j} - t_{k}}

For convenience the tt values are assumed to be in the range [0:1][0:1].

6^6 Archer, Branden and Weisstein, Eric W. "Lagrange Interpolating Polynomial." From MathWorld--A Wolfram Web Resource.