Movatterモバイル変換


[0]ホーム

URL:


TOPICS
SearchClose
Search

Lagrange Interpolating Polynomial


DOWNLOAD Mathematica NotebookDownloadWolfram Notebook
LagrangeInterpolatingPoly

The Lagrange interpolating polynomial is thepolynomialP(x) of degree<=(n-1) that passes through then points(x_1,y_1=f(x_1)),(x_2,y_2=f(x_2)), ...,(x_n,y_n=f(x_n)), and is given by

 P(x)=sum_(j=1)^nP_j(x),
(1)

where

 P_j(x)=y_jproduct_(k=1; k!=j)^n(x-x_k)/(x_j-x_k).
(2)

Written explicitly,

P(x)=((x-x_2)(x-x_3)...(x-x_n))/((x_1-x_2)(x_1-x_3)...(x_1-x_n))y_1+((x-x_1)(x-x_3)...(x-x_n))/((x_2-x_1)(x_2-x_3)...(x_2-x_n))y_2+...+((x-x_1)(x-x_2)...(x-x_(n-1)))/((x_n-x_1)(x_n-x_2)...(x_n-x_(n-1)))y_n.
(3)

The formula was first published by Waring (1779), rediscovered by Euler in 1783, and published by Lagrange in 1795 (Jeffreys and Jeffreys 1988).

Lagrange interpolating polynomials are implemented in theWolfram Language asInterpolatingPolynomial[data,var]. They are used, for example, in the construction ofNewton-Cotes formulas.

When constructing interpolating polynomials, there is a tradeoff between having a better fit and having a smooth well-behaved fitting function. The more data points that are used in the interpolation, the higher the degree of the resulting polynomial, and therefore the greater oscillation it will exhibit between the data points. Therefore, a high-degree interpolation may be a poor predictor of the function between points, although the accuracy at the data points will be "perfect."

Forn=3 points,

P(x)=((x-x_2)(x-x_3))/((x_1-x_2)(x_1-x_3))y_1+((x-x_1)(x-x_3))/((x_2-x_1)(x_2-x_3))y_2+((x-x_1)(x-x_2))/((x_3-x_1)(x_3-x_2))y_3
(4)
P^'(x)=(2x-x_2-x_3)/((x_1-x_2)(x_1-x_3))y_1+(2x-x_1-x_3)/((x_2-x_1)(x_2-x_3))y_2+(2x-x_1-x_2)/((x_3-x_1)(x_3-x_2))y_3.
(5)

Note that the functionP(x) passes through the points(x_i,y_i), as can be seen for the casen=3,

P(x_1)=((x_1-x_2)(x_1-x_3))/((x_1-x_2)(x_1-x_3))y_1+((x_1-x_1)(x_1-x_3))/((x_2-x_1)(x_2-x_3))y_2+((x_1-x_1)(x_1-x_2))/((x_3-x_1)(x_3-x_2))y_3=y_1
(6)
P(x_2)=((x_2-x_2)(x_2-x_3))/((x_1-x_2)(x_1-x_3))y_1+((x_2-x_1)(x_2-x_3))/((x_2-x_1)(x_2-x_3))y_2+((x_2-x_1)(x_2-x_2))/((x_3-x_1)(x_3-x_2))y_3=y_2
(7)
P(x_3)=((x_3-x_2)(x_3-x_3))/((x_1-x_2)(x_1-x_3))y_1+((x_3-x_1)(x_3-x_3))/((x_2-x_1)(x_2-x_3))y_2+((x_3-x_1)(x_3-x_2))/((x_3-x_1)(x_3-x_2))y_3=y_3.
(8)

Generalizing to arbitraryn,

 P(x_j)=sum_(k=1)^nP_k(x_j)=sum_(k=1)^ndelta_(jk)y_k=y_j.
(9)

The Lagrange interpolating polynomials can also be written using what Szegö (1975) called Lagrange's fundamental interpolating polynomials. Let

pi(x)=product_(k=1)^(n)(x-x_k)
(10)
pi(x_j)=product_(k=1)^(n)(x_j-x_k),
(11)
pi^'(x_j)=[(dpi)/(dx)]_(x=x_j)
(12)
=product_(k=1; k!=j)^(n)(x_j-x_k)
(13)

so thatpi(x) is annth degreepolynomial with zeros atx_1, ...,x_n. Then define the fundamental polynomials by

 pi_nu(x)=(pi(x))/(pi^'(x_nu)(x-x_nu)),
(14)

which satisfy

 pi_nu(x_mu)=delta_(numu),
(15)

wheredelta_(numu) is theKronecker delta. Now lety_1=P(x_1), ...,y_n=P(x_n), then the expansion

 P(x)=sum_(k=1)^npi_k(x)y_k=sum_(k=1)^n(pi(x))/((x-x_k)pi^'(x_k))y_k
(16)

gives the unique Lagrange interpolating polynomial assuming the valuesy_k atx_k. More generally, letdalpha(x) be an arbitrary distribution on the interval[a,b],{p_n(x)} the associatedorthogonal polynomials, andl_1(x), ...,l_n(x) the fundamentalpolynomials corresponding to the set of zeros of a polynomialP_n(x). Then

 int_a^bl_nu(x)l_mu(x)dalpha(x)=lambda_mudelta_(numu)
(17)

fornu,mu=1, 2, ...,n, wherelambda_nu areChristoffel numbers.

Lagrange interpolating polynomials give no error estimate. A more conceptually straightforwardmethod for calculating them isNeville's algorithm.


See also

Aitken Interpolation,Hermite's Interpolating Polynomial,Lebesgue Constants,Magata's Constant,Neville's Algorithm,Newton's Divided Difference Interpolation Formula

Portions of this entry contributed byBrandenArcher

Explore with Wolfram|Alpha

References

Abramowitz, M. and Stegun, I. A. (Eds.).Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 878-879 and 883, 1972.Beyer, W. H. (Ed.).CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, p. 439, 1987.Jeffreys, H. and Jeffreys, B. S. "Lagrange's Interpolation Formula." §9.011 inMethods of Mathematical Physics, 3rd ed. Cambridge, England: Cambridge University Press, p. 260, 1988.Pearson, K.Tracts for Computers2, 1920.Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Polynomial Interpolation and Extrapolation" and "Coefficients of the Interpolating Polynomial." §3.1 and 3.5 inNumerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 102-104 and 113-116, 1992.Séroul, R. "Lagrange Interpolation." §10.9 inProgramming for Mathematicians. Berlin: Springer-Verlag, pp. 269-273, 2000.Szegö, G.Orthogonal Polynomials, 4th ed. Providence, RI: Amer. Math. Soc., pp. 329 and 332, 1975.Waring, E.Philos. Trans.69, 59-67, 1779.Whittaker, E. T. and Robinson, G. "Lagrange's Formula of Interpolation." §17 inThe Calculus of Observations: A Treatise on Numerical Mathematics, 4th ed. New York: Dover, pp. 28-30, 1967.

Referenced on Wolfram|Alpha

Lagrange Interpolating Polynomial

Cite this as:

Archer, Branden andWeisstein, Eric W. "Lagrange Interpolating Polynomial." FromMathWorld--A Wolfram Resource.https://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html

Subject classifications

Created, developed and nurtured by Eric Weisstein at Wolfram Research

[8]ページ先頭

©2009-2025 Movatter.jp