Knowledge base dedicated to Linux and applied mathematics.
All the versions of this article: [English] [français]
In this section, we shall study the interpolation polynomial in the Lagrange form. Given a set of (n+1) data points and a function f, the aim is to determine a polynomial of degree n which interpolates f at the points in question.
Given a set of data points , the points defined by are called points of interpolation. The points are the values of interpolation. To interpolate a function , we define the values of interpolation as follows:
The purpose here is to determine the unique polynomial of degree , which verifies
They are the polynomials which verify the following property:
They form a basis of the vector space of polynomials of degree at most equal to
The proof is shown above. Actually, it corresponds to the construction of Lagrange interpolation polynomial with regard to the basis
Uniqueness. Consider two elements and of which verify
Assume that and . Let be the closed set defined by (the smallest closed set containing and ).
Proof. There are two possible ways to prove this theorem: 1) the one encountered in The polynomial interpolation in the form of Newton and, 2) the following proof.
If , the problem is over:
Assume that and .
Given a set of three data points , we shall determine the Lagrange interpolation polynomial of degree 2 which passes through these points.
First, we compute and :
The Scilab function lagrange.sci determines Lagrange interpolation polynomial. encompasses the points of interpolation and the values of interpolation. is the Lagrange interpolation polynomial.
function[P]=lagrange(X,Y)//X nodes,Y values;P is the numerical Lagrange polynomial interpolation
n=length(X);// n is the number of nodes. (n-1) is the degree
for i=1:n, L=1;
for j=[1:i-1,i+1:n] L=L*(x-X(j))/(X(i)-X(j));end
We thus have:
-->X=[0;2;4]; Y=[1;5;17]; P=lagrange(X,Y)
P = 1 + x^2