interpolation 2
TRANSCRIPT
Interpolation
• Lagrange form of interpolating polynomial. (Has a simple form and useful for the error estimation.)
Defining the Lagrange polynomial by
Lagrange form of interpolating polynomial is written
Derive an interpolating polynomial for points,
Interpolation Error
Lagrange form of interpolating polynomial is written
Theorem: (Interpolation Error)If a function f is continuous on [a,b] and has n+1 continuous derivatives on (a,b), then for 8 x2[a,b], 9 ξ(x)2(a,b), such that
• Newton form of interpolating polynomial is written
namely,
• Interpolation error in Newton form can be derived as follows:
Important Theorem
Theorem: Let be n times continuously differentiable on ,
and let be distinct points in .then there
exists a number such that
f [ ]ba ,
nxxx ...................,, 10[ ]ba ,
[ ]bac ,∈exists a number such that
[ ] ( )!
...................,, 10 n
cfxxxf x
n
n =
[ ]bac x ,∈
French MathematicianCharles Hermite
1822 - 1901
Hermite Interpolation• Hermite interpolation allows us to find a ploynomial that matched both function valueand
some of the derivative values
Runge's phenomenon
Carle David Tolmé Runge(August 30, 1856 – January 3, 1927) was a German mathematician, physicist, and spectroscopist
Nonconvergence
Polynomial interpolating an underlying continuous function at
equally spaced points may not converge to function as number
of data points (and hence polynomial degree) increases, as
illustrated by Runge’s function.
16th Order Polynomial
Original Function
8th Order Polynomial
4th Order Polynomial
Figure : Higher order polynomial interpolation is a bad idea
Isaac Jacob Schoenberg(April 21, 1903, Galaţi—February 21, 1990)
Spline Interpolation• Piecewise Linear Interpolation
– Simplest form of piecewise polynomial interpolation
– Interpolate the data with piecewise linear
432144332211 with ),(),,(),,(),,( :points data ofSet xxxxyxyxyxyx <<<
],[ ],,[ ],,[ ,lssubinterva threeDefine 433322211 xxIxxIxxI ===– Interpolate the data with piecewise linear
function
≤≤−
−+
−−
≤≤−−+
−−
≤≤−
−+−−
=
43434
33
43
4
32323
22
32
3
21212
11
21
2
,
,
,
)(
xxxyxx
xxy
xx
xx
xxxyxx
xxy
xx
xx
xxxyxx
xxy
xx
xx
xP
),( 11 yx
),( 22 yx
),( 33 yx
),( 44 yx
x
y
Piecewise Linear Interpolation
• Example 8.14 Piecewise Linear Interpolation
]3 4 1 0[ ],3 2 1 0[ Using, == yx 3
4y
≤≤+−≤≤−≤≤
=32 ,6
21 ,23
10 ,
)(
xx
xx
xx
xP
0 1 2 30
1
2
x
Figure 8.18 Piecewise linear interpolation
Piecewise Quadratic Interpolation
• “Knots”
– Where the intervals meet to be the midpoints between the data points where the function values are given
• Processing
– 4 data points
– Define node points432144332211 with ),(),,(),,(),,( xxxxyxyxyxyx <<<
– Define node points
– Spacing between consecutive data points
– Relationships:
4543432321211 ,2/)( ,2/)( ,2/)( , xzxxzxxzxxzxz =+=+=+==
343232121 , , xxhxxhxxh −=−=−=
),( 11 yx121 xxh −=
),( 33 yx
),( 44 yx
x
y
232 xxh −=343 xxh −=
1z 2z 3z 4z 5z
2/
,2/
,2/
334
223
112
hxz
hxz
hxz
=−=−=−
2/
,2/
,2/
344
233
122
hxz
hxz
hxz
−=−−=−−=−
Piecewise Quadratic Interpolation – Example
• Example : 8: 15 )3,3( ),4,2( ),1,1( ),0,0( :points Data
−−
−−
=010011
201100
220110
020011
A
3.0] [2.5,on 3)3(4571.2)(
2.5] [1.5,on 4)2(9143.0)2(3714.3)(
1.5] [0.5,on 1)1(5143.2)1(7714.1)(
0.5] [0.0,on )0(7429.0)(
24
23
22
21
+−=
+−+−−=
+−+−=
−=
xxP
xxxP
xxxP
xxP
Piecewise interpolating polynomial
−−
101100
110110
010011
[ ] .0004124 ′−=r
:,,,,, tscoefficien :Solution 324321 bbaaaa
]9143.05143.24571.23714.37714.17429.0[x
on elliminatiGaussian Using
−=
0 1 2 3 0
1
2
3
4
x
Piecewise quadratic interpolation of four data pointsy
Spline Interpolation Definition
• Given n+1 distinct knots xi such that:
with n+1 knot values yi find a spline function
with each Si(x) a polynomial of degree at most n.
B-splines, continued
To start recursion, define B-splines of degree 0 by
<≤
= +
otherwise0
if1)( 10 ii
i
ttttB
and then for k > 0 define B-splines of degree k by
).())(1()()()( 111
1 tBtvtBtvtB ki
ki
ki
ki
ki
−++
− −+=
Since Bi0 is piecewise constant and vi
k is linear, Bi1 is piecewise
linear.
Similarly, Bi2 is in turn piecewise quadratic, and in general,
Bik is piecewise polynomial of degree k.
B-splines
B-splines, continued
Important properties of B-spline functions Bik :
1. For t < ti or t > ti+k+1, Bik (t ) = 0.
2. For ti < t < ti+k+1, Bik (t ) > 0.
3. For all t, ( ) 1.kiB t
∞
=∑3. For all t, ( ) 1.ii
B t=−∞
=∑4. For k ≥ 1, Bi
k has k – 1 continuous derivatives.
5. Set of functions {Bi–1k , . . . , Bn–1
k} is linearly independent
on interval [t1, tn] and spans set of all splines of degree k
having knots ti.
B-splines, continued
Properties 1 and 2 together say that B-spline functions have
local support.
Property 3 indicates how functions are normalized.
Property 4 says that they are indeed splines.
Property 5 says that for given k these functions form basis for
set of all splines of degree k.
B-splines, continued
If we use B-spline basis, linear system to be solved for spline
coefficients will be nonsingular and banded.
Use of B-spline basis yields efficient and stable methods for
determining and evaluating spline interpolants, and many
library routines for spline interpolation are based on this library routines for spline interpolation are based on this
approach.
B-splines are also useful in many other contexts, such as
numerical solution of differential equations, as we will see
later.
Bezier Spline InterpolationPractical Application