Interpolation
Interpolation
Urban Planning
Civil Engineering Department
ECGD3110
Numerical Analysis
Polynomial Interpolation
Lecture 13
1st Semester 2009/2010
1
Definition
Interpolation is the process of finding equations
to approximate straight lines and curves that
best fit given sets of data.
Polynomial Interpolation
For a given set of N + 1 data points
{(x0, y0), (x1, y1), . . . , (xN, yN)},
we want to find the coefficients of an Nth-degree
polynomial function to match them:
Why polynomials?!!
4
Lagrange Interpolating
The coefficients can be obtained by solving the
following system of equations:
Polynomial Interpolation
Lagrange Interpolating Polynomials
Newtons divided-difference interpolating
polynomials
Spline Interpolation
Lagrange Interpolating
Lagrange Interpolating takes the following general
formula:
f N (x)
Linear Interpolation
Quadratic Interpolation
For 3 points of data
Example
Use a Lagrange interpolating polynomial of the first
and second order to evaluate f(2) on the basis of the
data:
x0 = 1
x1 = 4
x2 = 6
10
f(x0) = 0
f(x1) = 1.386294
f(x2) = 1.791760
.Example cont
11
.Example cont
12
.Example cont
These values were taken by substitution into
equation f(x) = ln(x):
x0 = 1 f(x0) = ln(1) = 0
x1 = 4 f(x1) = ln(4) = 1.386294
x2 = 6 f(x2) = ln(6) = 1.791760
f(2) = ln(2) = 0.693147
f1(2) = 0.462098
f2(2) = 0.565844
13
.Example cont
14
where f(x0, x1), f(x0, x1, x2), and f(x0, x1, x2, x3) are
the first, second, and third divided differences
respectively.
15
16
17
18
19
20