Upload
aubrey-warren
View
225
Download
0
Tags:
Embed Size (px)
Citation preview
1
Interpolation
Lecture NotesDr. Rakhmad Arief SiregarUniversiti Malaysia Perlis
Applied Numerical Method for Engineers
Chapter 17
2
3
Interpolation
The first-order The second-order
The third-order
nnxaxaaaxf ...)( 2
210
4
Interpolation
There are variety of alternative forms for expressing an interpolating polynomial.
The methods are: Newton’s Divided-difference interpolating
polynomial Linear interpolation Quadratic interpolation
Lagrange interpolating polynomial
5
Linear interpolation
The simplest form of interpolation is to connect two data points with a straight line
01
01
0
011 )()()()(
xx
xfxf
xx
xfxf
)()()(
)()( 0101
0101 xx
xx
xfxfxfxf
6
Linear interpolation
The simplest form of interpolation is to connect two data points with a straight line
01
01
0
011 )()()()(
xx
xfxf
xx
xfxf
)()()(
)()( 0101
0101 xx
xx
xfxfxfxf
7
Ex. 18.x
Due to special order, you need to make a special taper pin with standard size of 3.5 mm.
Compute by using linear interpolation for the max. size and min size based on the following data.
8
Dimensions at large end
of some standard
Taper Pins
- Metric Series-
Max:3.51
Min: 3.503mm
9(1,0)
(2,0.6931472)
(6,1.791759)
(2,0.3583519), t=48.3%
(4,1.386294)
t=33.3% (2,0.4620981)
10
Quadratic Interpolation
To reduce error in Ex. 18.1,we need to introduce curvature into the line.
This is accomplished with a second-order polynomial.
After multiplying
))(()()( 1020102 xxxxbxxbbxf
nnxaxaaaxf ...)( 2
210
12021022
201102 )( xxbxxbxxbxbxbxbbxf
2210)( xaaaxf
1020100 xxbxbba 120221 xbxbba 22 ba
11
Quadratic Interpolation
A simple procedure can be used to determine the value of the coefficients.
For b0 with x = x0 can be computed:
Then substitute back, which can be evaluated at x = x1
Finally substitute back b0 and b1
))(()()( 1020102 xxxxbxxbbxf
00 xfb
01
011 xx
xfxfb
12
01
01
12
01
2 xx
xx
xfxf
xx
xfxf
b
12
Ex. 18.2
Fit a second-order polynomial to the three points used in Ex. 18.1
x0=1 f(x0)=0 x1=4 f(x1)=1.386294 X2=6 f(x2)=1.791759 Use the polynomial to evaluate ln 2
13
Ex. 18.2
Solution
00 xfb
01
011 xx
xfxfb
12
01
01
12
01
2 xx
xx
xfxf
xx
xfxf
b
00 b
4620981.014
0386294.11
b
16
4620981.046386294.1791759.1
2
b
0518731.02 b
14
Ex. 18.2
Substituting value of b0, b1, b2
For x = 2
The relative percentage error is t = 18.4%
))(()()( 1020102 xxxxbxxbbxf
)4)(1(051873.0)1(4620981.00)(2 xxxxf
5658444.0)2(2 f
15
16
General Form of Newton’s Interpolating Polynomial
The nth-order polynomial
As comparison, below is 2nd-order polynomial
))...()((...)()( 110010 nnn xxxxxxbxxbbxf
))(()()( 1020102 xxxxbxxbbxf
17
General Form of Newton’s Interpolating Polynomial
The nth-order polynomial
The coefficient
))...()((...)()( 110010 nnn xxxxxxbxxbbxf
00 xfb
011 , xxfb
0122 ,, xxxfb
011 ,,...,, xxxxfb nnn
.
.
18
General Form of Newton’s Interpolating Polynomial
Recursive nature divided differences
19