Professional Documents
Culture Documents
Lecture9 PDF
Lecture9 PDF
LECTURE 9
• All these Lagrange Interpolation methods discussed had the general form:
N
∑ ai x
i
g( x) = ⇒
i=0
2 3 N
g ( x ) = ao + a1 x + a2 x + a3 x + … + a N x
• Fitting the data points meant requiring the interpolating polynomial to be equal to the
functional values at the data points:
g ( xi ) = f i , i = 0, N
p. 9.1
CE 341/441 - Lecture 9 - Fall 2004
x
x0 x1 xN
f0 , f0(1)
,... ,f0
(P)
fN , fN(1),... ,fN(P)
f1 , f1(1)
,... ,f1
(P)
p. 9.2
CE 341/441 - Lecture 9 - Fall 2004
( p + 1)( N + 1) – 1
∑
i
g( x) = ai x
i=0
p. 9.3
CE 341/441 - Lecture 9 - Fall 2004
• Develop a two data point Hermite interpolation function which passes through the func-
tion and its first derivative for the interval [0, 1].
(1)
x f f
xo 0 fo (1)
fo
x1 +1 f1 (1)
f1
• Therefore p = 1 and N + 1 = 2 .
• We must impose ( 1 + 1 ) ( 2 ) = 4 constraint equations (match function and its derivative
at two data points).
• Therefore we require a 3rd degree polynomial.
2 3
g ( x ) = ao + a1 x + a2 x + a3 x
(1) 2
g ( x ) = a 1 + 2a 2 x + 3a 3 x
p. 9.4
CE 341/441 - Lecture 9 - Fall 2004
• Application of constraints
g(0) = f o ⇒ ao = f o
g(1) = f 1 ⇒ ao + a1 + a2 + a3 = f 1
ao fo
1 0 0 0
a1 f1
1 1 1 1 = (1)
0 1 0 0 a2 fo
0 1 2 3 a3 (1)
f1
p. 9.5
CE 341/441 - Lecture 9 - Fall 2004
• Solve for a o, a 1, a 2, a 3
ao = f o
(1)
a1 = f o
(1) (1)
a2 = 3 f 1 – 3 f o – f 1 – 2 f o
(1) (1)
a3 = – 2 f 1 + 2 f o + f o + f 1
• Therefore
g(1) = f 1
(1) (1)
g (0) = f o
(1) (1)
g (1) = f 1
p. 9.6
CE 341/441 - Lecture 9 - Fall 2004
• We note that g ( x ) can be re-written such that the functional and derivative values are
factored out:
3 2 3 2 (1) 3 2 (1) 3 2
g ( x ) = f o ( 2x – 3x + 1 ) + f 1 ( – 2x + 3x ) + f o ( x – 2x + x ) + f 1 ( x – x )
(1) (1)
g ( x ) = f o αo ( x ) + f 1 α1 ( x ) + f o βo ( x ) + f 1 β1 ( x )
3 2
α1 ( x ) ≡ – 2 x + 3 x associated with the function at data point x 1
3 2
βo ( x ) ≡ x – 2 x + x associated with the first derivative at data point x o
3 2
β1 ( x ) ≡ x – x associated with the first derivative at data point x 1
p. 9.7
CE 341/441 - Lecture 9 - Fall 2004
α0 (x) α1 (x)
β0 (x)
x x
x0 x1 x0 x1
β1 (x)
• Therefore we can define 2 separate functions associated with each data point. Each is a
third degree polynomial.
p. 9.8
CE 341/441 - Lecture 9 - Fall 2004
x αo ( x ) α1 ( x ) βo ( x ) β1 ( x )
xo = 0 1 0 0 0
x1 = 1 0 1 0 0
xo = 0 0 0 1 0
x1 = 1 0 0 0 1
p. 9.9
CE 341/441 - Lecture 9 - Fall 2004
α i ( x j ) = δ ij βi ( x j ) = 0 i, j = 0, 1
(1) (1)
αi ( x j ) = 0 β i ( x j ) = δ ij i, j = 0, 1
0 i≠ j
δ ij = Kronecker Delta
1 i= j
p. 9.10
CE 341/441 - Lecture 9 - Fall 2004
N N N
(1) ( p)
g( x) = ∑ αi ( x ) f i + ∑ βi ( x ) fi +…+ ∑ θi ( x ) f i
i=0 i=0 i=0
g( x j) = f j j = 0, N
(1) (1)
g ( x j) = f j j = 0, N
.
.
.
( p) ( p)
g ( x j) = f j j = 0, N
p. 9.11
CE 341/441 - Lecture 9 - Fall 2004
• In order to satisfy
g( x j) = f j
N N N
(1) ( p)
∑ αi ( x j ) f i + ∑ βi ( x j ) f i +…+ ∑ θi ( x j ) f i = fj
i=0 i=0 i=0
0 i≠ j
α i ( x j ) = δ ij = i, j = 0, N
1 i= j
βi ( x j ) = 0 i, j = 0, N
.
.
.
θi ( x j ) = 0 i, j = 0, N
p. 9.12
CE 341/441 - Lecture 9 - Fall 2004
• In order to satisfy:
(1) (1)
g ( x j) = f j j = 0, N
N N N
(1) (1) (1) (1) ( p) (1)
∑ αi ( x j ) f i + ∑ βi ( x j ) f i +…+ ∑ θi ( x j) f i = fj
i=0 i=0 i=0
(1)
β i ( x j ) = δ ij i, j = 0, N
.
.
.
(1)
θi ( x j ) = 0 i, j = 0, N
p. 9.13
CE 341/441 - Lecture 9 - Fall 2004
( p) ( p)
g ( x j) = f j j = 0, N
N N N
( p) ( p) (1) ( p) ( p) ( p)
∑ αi ( x j ) f i + ∑ βi ( x j ) f i +…+ ∑ θi ( x j ) f i = fj
i=0 i=0 i=0
( p)
βi ( x j ) = 0 i, j = 0, N
.
.
.
( p)
θ i ( x j ) = δ ij i, j = 0, N
p. 9.14
CE 341/441 - Lecture 9 - Fall 2004
( p + 1)( N + 1) – 1
∑
j
αi ( x ) = a ij x i = 0, N
j=0
( p + 1)( N + 1) – 1
∑
j
βi ( x ) = b ij x i = 0, N
j=0
.
.
.
( p + 1)( N + 1) – 1
∑
j
θi ( x ) = t ij x i = 0, N
j=0
EXTRAPOLATION
• Use an interpolating function outside of the range within which the data points lie
• Extrapolation must always be used with caution
• How was interpolation established?
• What is the behavior of the function?
• How far away from the interval is the point extrapolated?
p. 9.15
CE 341/441 - Lecture 9 - Fall 2004
• If we select the roots of the ( N + 1 ) th degree Chebyshev polynomial as data (or interpo-
lation) points for a N th degree polynomial interpolation formula (e.g. Lagrange), we
will have minimized the maximum error over the interval as far as we can.
c 1 ( N + 1)
e ( x ) = ------------------ψ N + 1 f (ξ)
( N + 1)
• The polynomial terms in the error expression actually equal the N + 1 th degree
Chebyshev polynomial and its maximum value on the interval is a minimum as
compared to using any other set of interpolation points.
p. 9.16
CE 341/441 - Lecture 9 - Fall 2004
• Hermite interpolation passes through the function and its first p derivatives at N + 1 data
points. This results in a polynomial function of degree ( p + 1 ) ( N + 1 ) – 1 .
• Extrapolation is the use of an interpolating formula for locations which do not lie within
the interval.
p. 9.17