Theory of Approximation and Splines-I Lecture-1 Basic Concepts of Interpolation
Theory of Approximation and Splines-I Lecture-1 Basic Concepts of Interpolation
Lecture-1
A census of the population of the United States is taken every 10 years. The
following table lists the population, in thousands of people, from 1950 to 2000, and
the data are also represented in the figure.
In reviewing these data, we might ask whether they could be used to provide a
reasonable estimate of the population, say, in 1975 or even in the year 2020.
Predictions of this type can be obtained by using a function that fits the given data.
This process is called interpolation.
The problem of determining a polynomial of degree one that passes through the
distinct points (𝑥𝑜 , 𝑦𝑜 ) and (𝑥1 , 𝑦1 ) is the same as approximating a function 𝑓 for
which 𝑓(𝑥𝑜 ) = 𝑦𝑜 and 𝑓(𝑥1 ) = 𝑦1 by means of a first degree polynomial
interpolating, or agreeing with, the values of 𝑓 at the given points. Using the
polynomial for approximation within the interval given by the end points is called
polynomial interpolation.
𝑥 − 𝑥1 𝑥 − 𝑥𝑜
𝑃(𝑥) = 𝑦𝑜 + 𝑦
𝑥𝑜 − 𝑥1 𝑥1 − 𝑥𝑜 1
Note that 𝐿𝑜 (𝑥𝑜 ) = 1, 𝐿𝑜 (𝑥1 ) = 0 and 𝐿1 (𝑥𝑜 ) = 0, 𝐿1 (𝑥1 ) = 1 which implies that
𝑃(𝑥𝑜 ) = 𝑦𝑜 and 𝑃(𝑥1 ) = 𝑦1 . So 𝑃(𝑥) is the unique polynomial of degree at most
one that passes through (𝑥𝑜 , 𝑦𝑜 ) and (𝑥1 , 𝑦1 ). So we can say that 𝑃 is interpolating
these two points.
Example 2:
𝒙 𝒇(𝒙)
𝑥𝑜 𝑦𝑜
𝑥1 𝑦1
𝑥2 𝑦2
Solution: The Lagrange interpolation polynomial for given data can be constructed
as:
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥𝑜 )(𝑥 − 𝑥2 ) (𝑥 − 𝑥𝑜 )(𝑥 − 𝑥1 )
𝑃(𝑥) = 𝑦𝑜 + 𝑦1 + 𝑦 .
(𝑥𝑜 − 𝑥1 )(𝑥𝑜 − 𝑥2 ) (𝑥1 − 𝑥𝑜 )(𝑥1 − 𝑥2 ) (𝑥2 − 𝑥𝑜 )(𝑥2 − 𝑥1 ) 2
Example 3:
Determine the linear Lagrange interpolating polynomial that passes through the
points (2,4) and (5,1).
Solution.
In this case we first construct the functions 𝐿𝑛,𝑘 (𝑥), for each 𝑘 = 0,1,2, … , 𝑛 with
the property that 𝐿𝑛,𝑘 (𝑥𝑖 ) = 0 when 𝑖 ≠ 𝑘 and 𝐿𝑛,𝑘 (𝑥𝑘 ) = 1. To satisfy 𝐿𝑛,𝑘 (𝑥𝑖 ) =
0 for 𝑖 ≠ 𝑘 requires the numerator of 𝐿𝑛,𝑘 (𝑥) contain the term
To satisfy 𝐿𝑛,𝑘 (𝑥𝑘 ) = 1 for 𝑖 ≠ 𝑘, the denominator must be the same term but
evaluated at 𝑥 = 𝑥𝑘 . This
Thus,
(𝑥 − 𝑥𝑜 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑘−1 )(𝑥 − 𝑥𝑘+1 ) … (𝑥 − 𝑥𝑛 )
𝐿𝑛,𝑘 (𝑥) =
(𝑥𝑘 − 𝑥𝑜 )(𝑥𝑘 − 𝑥1 ) … (𝑥𝑘 − 𝑥𝑘−1 )(𝑥𝑘 − 𝑥𝑘+1 ) … (𝑥𝑘 − 𝑥𝑛 )
𝑛
(𝑥 − 𝑥𝑖 )
𝐿𝑛,𝑘 (𝑥) = ∏ .
(𝑥𝑘 − 𝑥𝑖 )
𝑖=0
𝑖≠𝑘
where
𝑛
(𝑥 − 𝑥1 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥𝑖 )
𝐿𝑛,0 (𝑥) = =∏
(𝑥𝑜 − 𝑥1 )(𝑥𝑜 − 𝑥2 ) … (𝑥𝑜 − 𝑥𝑛 ) (𝑥0 − 𝑥𝑖 )
𝑖=1
𝑛
(𝑥 − 𝑥𝑜 )(𝑥 − 𝑥2 ) … (𝑥 − 𝑥𝑛 ) (𝑥 − 𝑥𝑖 )
𝐿𝑛,1 (𝑥) = =∏
(𝑥1 − 𝑥𝑜 )(𝑥1 − 𝑥2 ) … (𝑥1 − 𝑥𝑛 ) (𝑥1 − 𝑥𝑖 )
𝑖=0
𝑖≠1
⋮
𝑛−1
(𝑥 − 𝑥𝑜 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑛−1 ) (𝑥 − 𝑥𝑖 )
𝐿𝑛,𝑛 (𝑥) = =∏ .
(𝑥𝑛 − 𝑥𝑜 )(𝑥𝑛 − 𝑥1 ) … (𝑥𝑛 − 𝑥𝑛−1 ) (𝑥𝑛 − 𝑥𝑖 )
𝑖=0
In short,
𝑛 𝑛 𝑛−1
(𝑥 − 𝑥𝑖 ) (𝑥 − 𝑥𝑖 ) (𝑥 − 𝑥𝑖 )
𝑓(𝑥) = ∏ 𝑓(𝑥𝑜 ) + ∏ 𝑓(𝑥1 ) + ⋯ + ∏ 𝑓(𝑥𝑛 ).
(𝑥0 − 𝑥𝑖 ) (𝑥1 − 𝑥𝑖 ) (𝑥𝑛 − 𝑥𝑖 )
𝑖=1 𝑖=0 𝑖=0
𝑖≠1
We can also write 𝐿𝑘 (𝑥) instead of 𝐿𝑛,𝑘 (𝑥) when there is no confusion as to its
degree.
Example 4
Construct the Lagrange interpolation polynomial that passes through the given data
points.
𝒙 𝒇(𝒙)
𝑥𝑜 𝑦𝑜
𝑥1 𝑦1
𝑥2 𝑦2
𝑥3 𝑦3
Example 5
Example 6