Sie sind auf Seite 1von 4

Numerical Interpolation

Interpolation is the process of finding and evaluating a function whose graph goes through the given points

The points

may a rise as may be obtained


measurements in Or
from a known
a physical function
problem

We use polynomial interpolation to produce approximations to given function 𝑓 𝑥 .


Polynomials can be easily evaluated, integrate and differentiate.
Interpolation is used to solve the following problems
 Given a table of values of a function
example: 𝑓 𝑥 = cos(𝑥) we use interpolation to extend the table to x not in the table.
 Given a set of data points.
find a smooth non-oscillatory functions f(x) that fits the data either exactly or approximation.
 Given a known function f(x).
example: 𝑓 𝑥 = log(𝑥) we need to have a way of evaluating it in a computer.
 To numerical integrate or differentiate a function with a simpler approximating expression.
Polynomial Interpolation
y
Linear Interpolation
𝑦 − 𝑦0 𝑦1 − 𝑦0 𝑥1 , 𝑦1
= ; 𝑠𝑙𝑜𝑝𝑒 𝑜𝑓 𝑠𝑡𝑟𝑎𝑖𝑔ℎ𝑡
𝑥 − 𝑥0 𝑥1 − 𝑥0
𝑦1 − 𝑦0 𝑥0 , 𝑦0
𝑦 − 𝑦0 = (𝑥 − 𝑥0 )
𝑥1 − 𝑥0 x
𝑦1 − 𝑦0
𝑦= 𝑥 − 𝑥0 + 𝑦0
𝑥1 − 𝑥0

𝑦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

Das könnte Ihnen auch gefallen