# Lagrange polynomial

In numerical analysis, a Lagrange polynomial, named after Joseph Louis Lagrange, is the interpolation polynomial for a given set of data points in the Lagrange form. It was first discovered by Edward Waring in 1779 and later rediscovered by Leonhard Euler in 1783.

As there is only one interpolation polynomial for a given set of data points it is a bit misleading to call the polynomial Lagrange interpolation polynomial. The more precise name is interpolation polynomial in the Lagrange form.

 Contents

## Definition

Missing image
Lagrangepolys.png
This image shows, for 4 random points ((-9, 5), (-4, 2), (-1, -2), (7, 9)), the (cubic) interpolation polynomial L(x), which is the sum of the scaled basis polynomials y0l0(x)</font>, y1l1(x), y2l2(x) and y3l3(x). The interpolation polynomial passes through all 4 control points, and each scaled basis polynomial passes through its respective control point and is 0 where x corresponds to the other three control points.

Given a set of k+1 data points

[itex](x_0, y_0),\ldots,(x_k, y_k)[itex]

where no two xj are the same, the interpolation polynomial in the Lagrange form is a linear combination of Lagrange basis polynomials

[itex]L(x) := \sum_{j=0}^{k} y_j l_j(x)[itex]

with the Lagrange basis polynomials defined as

[itex]l_j(x) := \prod_{i=0, j\neq i}^{k} \frac{x-x_i}{x_j-x_i} = \frac{x-x_0}{x_j-x_0} \cdots \frac{x-x_{j-1}}{x_j-x_{j-1}} \frac{x-x_{j+1}}{x_j-x_{j+1}} \cdots \frac{x-x_{k}}{x_j-x_{k}}[itex]

## Proof

The function we are looking for has to be polynomial function L(x) of degree k with

[itex]L(x_j) = y_j \qquad j=0,\ldots,k[itex]

According to the Stone-Weierstrass theorem such a function exists and is unique. The Langrange polynomial is the solution to the interpolation problem.

As can be easily seen

1. [itex]l_j(x)[itex] is a polynomial and has degree k
2. [itex]l_i(x_j) = \delta_{ij}, 0 \leq i,j \leq k [itex]

Thus the function L(x) is a polynomial with degree k and

[itex]L(x_i) = \sum_{j=0}^{k} y_j l_j(x_i) = y_i[itex].

Therefore L(x) is our unique interpolation polynomial.

## Main idea

Solving an interpolation problem leads to a problem in linear algebra where we have to solve a matrix. Using a standard monomial basis for our interpolation polynomial we get the very complicated Vandermonde matrix. By choosing another basis, the Langrange basis we get the much simpler identity matrix = δi,j which we can solve instantly.

## Usage

### Example

Missing image
LagrangeInterp.png
The tangent function and its interpolant

We wish to interpolate [itex]f(x)=\tan{x}[itex] at the points

 [itex]x_0=-1.5[itex] [itex]x_1=-0.75[itex] [itex]x_2=0[itex] [itex]x_3=0.75[itex] [itex]x_4=1.5[itex] [itex]f(x_0)=-14.1014[itex] [itex]f(x_1)=-0.931596[itex] [itex]f(x_2)=0[itex] [itex]f(x_3)=0.931596[itex] [itex]f(x_4)=14.1014[itex]

Now, the basis polynomials are:

[itex]l_0(x)={x - x_1 \over x_0 - x_1}\cdot{x - x_2 \over x_0 - x_2}\cdot{x - x_3 \over x_0 - x_3}\cdot{x - x_4 \over x_0 - x_4}
            ={1\over 243} x (2x-3)(4x-3)(4x+3)[itex]

[itex]l_1(x)={x - x_0 \over x_1 - x_0}\cdot{x - x_2 \over x_1 - x_2}\cdot{x - x_3 \over x_1 - x_3}\cdot{x - x_4 \over x_1 - x_4}
            =-{8\over 243} x (2x-3)(2x+3)(4x-3)[itex]

[itex]l_2(x)={x - x_0 \over x_2 - x_0}\cdot{x - x_1 \over x_2 - x_1}\cdot{x - x_3 \over x_2 - x_3}\cdot{x - x_4 \over x_2 - x_4}
            ={1\over 243} (243-540x^2+192x^4)[itex]

[itex]l_3(x)={x - x_0 \over x_3 - x_0}\cdot{x - x_1 \over x_3 - x_1}\cdot{x - x_2 \over x_3 - x_2}\cdot{x - x_4 \over x_3 - x_4}
            =-{8\over 243} x (2x-3)(2x+3)(4x+3)[itex]

[itex]l_4(x)={x - x_0 \over x_4 - x_0}\cdot{x - x_1 \over x_4 - x_1}\cdot{x - x_2 \over x_4 - x_2}\cdot{x - x_3 \over x_4 - x_3}
            ={1\over 243} x (2x-3)(4x-3)(4x+3)[itex]


Thus the interpolating polynomial then is

[itex]{1\over 243}(f(x_0)x (2x-3)(4x-3)(4x+3)-8f(x_1)x (2x-3)(2x+3)(4x-3)[itex]
[itex]+f(x_2)(243-540x^2+192x^4)-8f(x_3)x (2x-3)(2x+3)(4x+3)+f(x_4)x (2x-3)(4x-3)(4x+3)\,[itex]
[itex]=-1.47748x+4.83456x^3\,[itex]

### Notes

The Langrange form of the interpolation polynomial shows the linear character of polynomial interpolation and the uniqueness of the interpolation polynomial. Therefore, it is preferred in proofs and theoretical arguments. But, as can be seen from the construction, each time a node xk changes, all Langrange basis polynomials have to be recalculated. A better form of the interpolation polynomial for practical (or computational) purposes is the Newton polynomial. Using nested multiplication amounts to the same idea.

Lagrange and other interpolation at equally spaced points, as in the example above, yield a polynomial oscillating above and below the true function. This oscillation is lessened by choosing interpolation points at Chebyshev nodes.

The Lagrange basis polynomials are used in numerical integration to derive the Newton-Cotes formulas.

Lagrange interpolation is often used in digital signal processing of audio for the implementation of fractional delay FIR filters (e.g., to precisely tune digital waveguides in physical modelling synthesis).

## See also

##### Navigation

Academic Kids Menu

• Art and Cultures
• Art (http://www.academickids.com/encyclopedia/index.php/Art)
• Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
• Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
• Music (http://www.academickids.com/encyclopedia/index.php/Music)
• Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
• Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
• Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
• Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
• Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
• Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
• History (http://www.academickids.com/encyclopedia/index.php/History)
• Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
• Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
• Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
• Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
• Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
• Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
• United States (http://www.academickids.com/encyclopedia/index.php/United_States)
• Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
• World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
• Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
• Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
• Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
• Science (http://www.academickids.com/encyclopedia/index.php/Science)
• Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
• Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
• Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
• Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
• Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
• Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
• Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
• Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
• Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
• Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
• Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
• Government (http://www.academickids.com/encyclopedia/index.php/Government)
• Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
• Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
• Space and Astronomy
• Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
• Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
• Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
• Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
• Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
• US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

• Home Page (http://academickids.com/encyclopedia/index.php)
• Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

• Clip Art (http://classroomclipart.com)