Professional Documents
Culture Documents
Chapter 10
Chapter 10
Gerald Recktenwald
Portland State University
Mechanical Engineering Department
gerry@me.pdx.edu
The latest version of this PDF file, along with other supplemental material
for the book, can be found at www.prenhall.com/recktenwald.
11 12 1
10 2
9 3
60 80 100
12 8 4
40 0
1
0 kmh 7 5
4
2
6
0
12
10
Viscosity (N⋅ s)/m2
0
0 10 20 30 40 50
Temperature (C)
known data
y curve fit
interpolation
y2 y3
y2
y1 y1
x1 x2 x1 x2 x3
30
historic data
linear
quadratic
25 cubic
spline
20
Millions of passengers
?
15
10
0
1980 1985 1990 1995 2000 2005 2010
145
140
gasoline price, (cents)
135
130
1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
year
145
140
gasoline price, (cents)
135
130
1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
year
y2
1
L1(x) L2(x)
y1
0 0
x1 x2 x1 x2
degree 1 degree 2
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
1 2 3 4 5 1 2 3 4 5
degree 3 degree 4
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
1 2 3 4 5 1 2 3 4 5
x1 f [x1]
x4 f [x4] f [x3, x4] f [x2, x3, x4] f [x1, x2, x3, x4]
x1 c1
x2 c2 c2
x3 c3 c3 c3
x4 c4 c4 c4 c4
6
10
monomial
Lagrange
Newton
5
10
4
10
Flops
3
10
2
10
1
10 0 1 2 3
10 10 10 10
Number of points to interpolate
5 5
0 0
-5 -5
0 2 4 6 8 10 0 2 4 6 8 10
5 5
0 0
-5 -5
0 2 4 6 8 10 0 2 4 6 8 10
5 5
0 0
-5 -5
0 2 4 6 8 10 0 2 4 6 8 10
5 5
0 0
-5 -5
0 2 4 6 8 10 0 5 10
1.5
0.5
0
0 1 2 3 4 5 6
1.5
0.5
0
0 1 2 3 4 5 6
0
0 1 2 3 4 5 6
'
fi+2, fi+2
'
fi+1, fi+1
Pi+1(x)
Pi(x)
fi , fi'
xi xi+1 xi+2
P4(x) P5(x)
P2(x) P3(x)
P1(x)
x1 x2 x3 x4 x5 x6
x̂
0.5 0.5
Given Given
0.4 x*exp(-x) 0.4 x*exp(-x)
Hermite Hermite
0.3 0.3
0.1 0.1
0 0
0 2 4 6 8 0 2 4 6 8
0.5 0.5
Given Given
0.4 x*exp(-x) 0.4 x*exp(-x)
Hermite Hermite
0.3 0.3
0.1 0.1
0 0
0 2 4 6 8 0 2 4 6 8
segments coupled
´´ (xi) = Pi´´(xi)
by Pi–1
Pn–2(x)
P2(x) Pn–1(x)
P1(x) Pi–1(x) P (x)
i
no curvature
no curvature
0.2 0.2
0.1 0.1
0 0
0 2 4 6 0 2 4 6
0.2 0.2
0.1 0.1
0 0
0 2 4 6 0 2 4 6
100 100
Nearest neighbor Piecewise linear
50 50
0 0
100 100
Piecewise cubic Cubic spline
50 50
0 0
6
5
y 4
3
2
1
0
-1 0 1 2 3 4
x
6
t=5
5
y 4 t=2
t=4
3 t=3
2
1 t=1
0
-1 0 1 2 3 4
x