Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Scientific Computing
An Introductory Survey
Second Edition
by Michael T. Heath
Chapter 7
Interpolation
Copyright
c 2001. Reproduction permitted only for
noncommercial, educational use in conjunction with the
book.
1
Issues in Interpolation
5
Functions for Interpolation
• Polynomials
• Piecewise polynomials
• Trigonometric functions
• Exponential functions
• Rational functions
7
Basis Functions
Ax = y
for n-vector x of parameters xj , where entries
of m × n matrix A are given by aij = φj (ti)
8
Existence, Uniqueness, and Conditioning
9
Polynomial Interpolation
10
Evaluating Polynomials
For example,
1−4t+5t2−2t3+3t4 = 1+t(−4+t(5+t(−2+3t)))
17
Lagrange Basis Functions
18
Example: Lagrange Interpolation
(t − t1)(t − t2)
+y3
(t3 − t1)(t3 − t2)
19
High-Degree Polynomial Interpolation
32
Nonconvergence
33
Piecewise Polynomial Interpolation
38
Hermite Interpolation
39
Hermite Cubic Interpolation
40
Cubic Spline Interpolation
42
Example: Cubic Spline Interpolation
α1 + α2t1 + α3t2 3
1 + α4 t1 = y1 ,
43
Example Continued
α1 + α2t2 + α3t2 3
2 + α4 t2 = y2
β1 + β2t2 + β3t2
2 + β 4 t3=y ,
2 2
β1 + β2t3 + β3t2
3 + β 4 t3=y
3 3
α2 + 2α3t2 + 3α4t2 2
2 = β2 + 2β3 t2 + 3β4 t2
44
Example Continued
2α3 + 6α4t1 = 0,
2β3 + 6β4t3 = 0
45
Hermite Cubic vs Spline Interpolation
46
Hermite Cubic vs Spline Interpolation
8 •......
....
....
.......
6 •.................................... monotone
•....
... Hermite cubic
...
4 ...
...
...
...
2 ...............
• .....................•
..................•
...................................•
.................•
..
0
0 2 4 6 8 10
8 •.....
...
....
.......................................
6 •.. ...
•.....
... cubic spline
...
4 ...
...
...
...
2 ...
• .... ..................•
............................• ...................................•
.................•
.
..
0
0 2 4 6 8 10
47
B-splines
48
B-splines, continued
49
B-splines
1.0 ......................................................
Bi0 ...
...
...
0.5 ...
..
...
...
...
0.0 t .
i ti+1 ti+2 ti+3 ti+4
..
1.0 .
................
. .
...... 1 ..........
.
. Bi
. .....
0.5 .
....... .....
.....
.
... .....
. .
... .....
...
. .....
....
. ....
0.0 t ti+1 ti+2 ti+3 ti+4
i
1.0
............................
.
..........
. ......
0.5 .
..
.. Bi 2 .....
...
..
. ......
..
.... ......
..
...
. .......
.
..
..
..
... ...........
.
.................
. ...................
0.0 t ti+1 ti+2 ti+3 ti+4
i
1.0
...............
.
...
............ 3...................
.
0.5 ... Bi .......
..
....... .......
........
.
..
...
. ...........
..
..
..
..
..
.. ...........................
0.0 t ........................................ ...............
i ti+1 ti+2 ti+3 ti+4
50
B-splines, continued
P∞ k
3. For all t, i=−∞ Bi (t) = 1
k , . . . , Bk
5. Set of functions {B1−k n−1 } is linearly
independent on interval [t1, tn] and spans
space of all splines of degree k having knots
ti
51
B-splines, continued
52
B-splines, continued
53