Professional Documents
Culture Documents
f (x ) = a1 + a2 x + a3 x 2 + · · · an x n−1 (1)
f (x ) = a1 + a2 x + a3 x 2 + · · · an x n−1 (1)
For n data points, there is one and only one polynomial of order (n − 1)
that passes through all the points.
f (x ) = a1 + a2 x + a3 x 2 + · · · an x n−1 (1)
For n data points, there is one and only one polynomial of order (n − 1)
that passes through all the points.
1 There is only one straight line (i.e., a first-order polynomial) that
connects two points.
f (x ) = a1 + a2 x + a3 x 2 + · · · an x n−1 (1)
For n data points, there is one and only one polynomial of order (n − 1)
that passes through all the points.
1 There is only one straight line (i.e., a first-order polynomial) that
connects two points.
2 Only one parabola connects a set of three points.
or in matrix form:
Linear Interpolation
The simplest form of interpolation is to connect two data points with
a straight line. This technique, called linear interpolation. Using similar
triangles,
Linear Interpolation
The simplest form of interpolation is to connect two data points with
a straight line. This technique, called linear interpolation. Using similar
triangles,
Linear Interpolation
The simplest form of interpolation is to connect two data points with
a straight line. This technique, called linear interpolation. Using similar
triangles,
Linear Interpolation
The simplest form of interpolation is to connect two data points with
a straight line. This technique, called linear interpolation. Using similar
triangles,
f (x2 ) − f (x1 )
f1 (x ) = f (x1 ) + (x − x1 ) (3)
x2 − x1
1.791759 − 0
f1 (2) = 0 + (2 − 1) = 0.3583519
6−1
which represents an error of εt = 48.3%. Using the smaller interval from
x1 = 1 to x2 = 4 yields
1.791759 − 0
f1 (2) = 0 + (2 − 1) = 0.3583519
6−1
which represents an error of εt = 48.3%. Using the smaller interval from
x1 = 1 to x2 = 4 yields
1.386294 − 0
f1 (2) = 0 + (2 − 1) = 0.4620981
4−1
Thus, using the shorter interval reduces the percent relative error to εt =
33.3%.
f2 (x ) = b1 + b2 (x − x1 ) + b3 (x − x1 )(x − x2 ) (4)
f2 (x ) = b1 + b2 (x − x1 ) + b3 (x − x1 )(x − x2 ) (4)
b1 = f (x1 ) (5)
x1 = 1 f (x1 ) = 0
x2 = 4 f (x2 ) = 1.386294
x3 = 6 f (x3 ) = 1.791759
x1 = 1 f (x1 ) = 0
x2 = 4 f (x2 ) = 1.386294
x3 = 6 f (x3 ) = 1.791759
1.386294 − 0
b2 = = 0.4620981
4−1
x1 = 1 f (x1 ) = 0
x2 = 4 f (x2 ) = 1.386294
x3 = 6 f (x3 ) = 1.791759
1.386294 − 0
b2 = = 0.4620981
4−1
and Eq.(7) yields
1.791759−1.386294
6−4 − 0.4620981
b3 = = −0.0518731
6−1
As was done previously with linear and quadratic interpolation, data points
can be used to evaluate the coefficients b1 , b2 , . . . , bn . For an (n − 1)th-
order polynomial, n data points are required: [x1 , f (x1 )], [x2 , f (x2 )], . . . ,
[xn , f (xn )]. We use these data points and the following equations to eval-
uate the coefficients:
where the bracketed function evaluations are finite divided differences. For
example, the first finite divided difference is represented generally as
where the bracketed function evaluations are finite divided differences. For
example, the first finite divided difference is represented generally as
f (xi ) − f (xj )
f [xi , xj ] = (11)
xi − xj
f [xi , xj ] − f [xj , xk ]
f [xi , xj , xk ] = (12)
xi − xk
f [xi , xj ] − f [xj , xk ]
f [xi , xj , xk ] = (12)
xi − xk
Similarly, the nth finite divided difference is
f [xi , xj ] − f [xj , xk ]
f [xi , xj , xk ] = (12)
xi − xk
Similarly, the nth finite divided difference is
f [xi , xj ] − f [xj , xk ]
f [xi , xj , xk ] = (12)
xi − xk
Similarly, the nth finite divided difference is
f [xi , xj ] − f [xj , xk ]
f [xi , xj , xk ] = (12)
xi − xk
Similarly, the nth finite divided difference is
where the L0 s are the weighting coefficients. It is logical that the first
weighting coefficient is the straight line that is equal to 1 at x1 and 0 at
x2 :
where the L0 s are the weighting coefficients. It is logical that the first
weighting coefficient is the straight line that is equal to 1 at x1 and 0 at
x2 :
x − x2
L1 =
x1 − x2
Similarly, the second coefficient is the straight line that is equal to 1 at x2
and 0 at x1 :
where the L0 s are the weighting coefficients. It is logical that the first
weighting coefficient is the straight line that is equal to 1 at x1 and 0 at
x2 :
x − x2
L1 =
x1 − x2
Similarly, the second coefficient is the straight line that is equal to 1 at x2
and 0 at x1 :
x − x1
L2 =
x2 − x1