Beruflich Dokumente
Kultur Dokumente
Interpolation is the process of finding and evaluating a function whose graph goes through the given points
The points
𝑦1 − 𝑦0 𝑥 − 𝑥0 + 𝑦0 (𝑥1 − 𝑥0 )
𝑦=
(𝑥1 − 𝑥0 )
𝑥1 − 𝑥 𝑦0 + 𝑥 − 𝑥0 𝑦1
𝑦=
(𝑥1 − 𝑥0 )
𝑦 = 𝑃1 𝑥
The straight line is the graph of linear polynomial
𝒙 𝟏 − 𝒙 𝒚 𝟎 + 𝒙 − 𝒙 𝟎 𝒚𝟏
𝑷𝟏 𝒙 =
(𝒙𝟏 − 𝒙𝟎 )
We say that this function interpolates the value 𝑦𝑖 at the points 𝑥𝑖 , 𝑖 = 0,1
or 𝑃1 𝑥𝑖 = 𝑦𝑖 , 𝑖 = 0,1
The formula 𝑃1 𝑥 is not very convenient for actual calculations. Instead, rewrite it as
𝑥 − 𝑥0
𝑷𝟏 𝒙𝒊 = 𝒚𝟎 + 𝒎 𝒚𝟏 − 𝒚𝟎 , 𝑚=
𝑥1 − 𝑥0
Ex1: Obtain a polynomial for the data points (1, 1) and (4, 2)
Solution:
𝑥 − 𝑥0 𝑥−1 𝑥−1
𝑚= = =
𝑥1 − 𝑥0 4 − 1 3
𝑥−1
𝑷𝟏 𝒙 = 𝟏 + 𝟐−𝟏
3
𝑥−1
𝑷𝟏 𝒙 = 𝟏 +
3
𝟏 2
𝑷𝟏 𝒙 = 𝒙+
𝟑 3