0% found this document useful (0 votes)
28 views

Lagrange

The document describes Lagrange interpolation, which is a method for interpolating a polynomial function through a set of n data points. It involves solving for the coefficients ak of a polynomial of degree n that passes through the given points. This is done by setting the Lagrange basis polynomials equal to the polynomial and solving the resulting system of equations. An example is given to demonstrate interpolating a polynomial through two data points.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Lagrange

The document describes Lagrange interpolation, which is a method for interpolating a polynomial function through a set of n data points. It involves solving for the coefficients ak of a polynomial of degree n that passes through the given points. This is done by setting the Lagrange basis polynomials equal to the polynomial and solving the resulting system of equations. An example is given to demonstrate interpolating a polynomial through two data points.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lagrange-Interpolation

𝑛 𝑛
𝑥 − 𝑥𝑖
∑ 𝑦𝑘 · (∏ ) = 𝑎0 𝑥 𝑛 +𝑎1 𝑥 𝑛−1 … + 𝑎𝑛 𝑥 0
𝑥𝑘 − 𝑥𝑖
𝑘=0 𝑖=0
𝑖≠𝑘

Solve for all 𝑎𝑘

𝑛 𝑛
𝑥 − 𝑥𝑖
∑ 𝑦𝑘 · (∏ ) = 𝑎0 𝑥 𝑛 +𝑎1 𝑥 𝑛−1 … + 𝑎𝑛 𝑥 0
𝑥𝑘 − 𝑥𝑖
𝑘=0 𝑖=0
𝑖≠𝑘

−1
𝑛 𝑛 𝑛 𝑛 𝑛
𝑥 − 𝑥𝑖
∑ 𝑦𝑘 · (∏ ) = ∑ 𝑦𝑘 · (∏ 𝑥 − 𝑥𝑖 ) · (∏ 𝑥𝑘 − 𝑥𝑖 )
𝑥𝑘 − 𝑥𝑖
𝑘=0 𝑖=0 𝑘=0 𝑖=0 𝑖=0
𝑖≠𝑘 𝑖≠𝑘 𝑖≠𝑘

−1
𝑛 𝑛 𝑛

𝑎0 = ∑ 𝑦𝑘 · (∏(−𝑥𝑖 )) · (∏ 𝑥𝑘 − 𝑥𝑖 )
𝑘=0 𝑖=0 𝑖=0
𝑖≠𝑘 𝑖≠𝑘

Example:

x 1 = x_0 2 = x_1
y 1 =y_0 3 =y_1

𝑛=1 𝑛=1
𝑥 − 𝑥𝑖
∑ 𝑦𝑘 · (∏ )
𝑥𝑘 − 𝑥𝑖
𝑘=0 𝑖=0
𝑖≠𝑘

𝑥−2 𝑥−1
=1·( )+3·( ) = 1 · (−𝑥 + 2) + 3 · (𝑥 − 1) = −𝑥 + 2 + 3𝑥 − 3 = 2𝑥 − 1
1−2 2−1

You might also like