Lecture 5 9v14 - MACM 316 document PDF

Title Lecture 5 9v14 - MACM 316 document
Author Matthew
Course Numerical Analysis I
Institution Simon Fraser University
Pages 17
File Size 342.9 KB
File Type PDF
Total Downloads 90
Total Views 117

Summary

MACM 316 document...


Description

CE 30125 - Lecture 5

LECTURE 5

HERMITE INTERPOLATING POLYNOMIALS

• So far we have considered Lagrange Interpolation schemes which fit an N

th

degree

polynomial to N + 1 data or interpolation points

f

N

f

f

2

0

f

1

x x

x

0

x

1

x

N

2

• All these Lagrange Interpolation methods discussed had the general form: N

 

g x

=



a x

i



i

i = 0

 

g x

= a

o

+a x +a x 1

2

2

+a x 3

3

+



+a

N

x

N

• Fitting the data points meant requiring the interpolating polynomial to be equal to the functional values at the data points:

 

g x

i

= f

i

,

i



= 0 N

p. 5.1

CE 30125 - Lecture 5

• Hermite Interpolation: Develop an interpolating polynomial which equals the function and its derivatives up to p

th

order at N + 1 data points.

x f

0

,

f

x

x

0

1

(1) (P) , . . . ,f 0

0

f

N

(1) (P) f , f , . . . ,f 1 1 1

,

f

x N

(1) (P) , . . . ,f N

N

• Therefore we require that

 

g x

g

i

1

= f

x  i



i

i

1

= fi

i

= 0 N

= 0

N + 1

N

N + 1



N + 1

constraints

constraints

: g

• We have a total of

• We need to

set

p

x  i

=

p

f

p + 1 N + 1

i

i

= 0 N

constraints

constraints

up a general polynomial which is of

degree

 p + 1  N + 1  – 1

(number of constraints must equal the number of unknowns in the interpolating polynomial).

p. 5.2

CE 30125 - Lecture 5

• Setting up a polynomial with a total of

gx

p + 1 N + 1

p + 1  N + 1  – 1

=

 i=0

unknowns:

ai xi

• Procedure to develop Hermite interpolation: • Set up the interpolating polynomial • Implement constraints • Solve for unknown coefficients,

ai , i

=

0 ,

 p + 1 N + 1  – 1

p

• Note that Lagrange interpolation is a special case of Hermite interpolation (

=

0 , i.e.

no derivatives are matched).

• It is also possible to set up specialized Hermite interpolation functions which do not include all functional and/or derivative values at all nodes • There may be some missing functional or derivative values at certain nodes • This lowers the degree of the interpolating function.

p. 5.3

CE 30125 - Lecture 5

Cubic Hermite Interpolation

• Develop a two data point Hermite interpolation function which passes through the function and its first derivative for the interval [0, 1].

xo x • Therefore

p

=

1 and

• We must impose

N

+ 1

 1 + 1  2 

=

f

f

0

fo

fo 

f

f

+1

1

=

x

1

g   x  1

1



1

2 .

4

constraint equations (match function and its derivative

• Therefore we require a 3rd degree polynomial.

=



1

at two data points).

gx

1

ao a x a x +

=

a

1

1

+2

+

ax 2

2

2

+ 3

p. 5.4

+

ax

ax 3

3

2

3

CE 30125 - Lecture 5

• Application of constraints

g0

=

fo

 a o

g1

=

f

 a o + a 1 + a 2 + a 3

g

1

g

1

1

=

fo

1

 a 1

1

 a 1 + 2 a 2 + 3 a 3

0

=

fo

1

=

f

1

• Constraint equations may be written in matrix form:

1

0

0

0

ao

1

1

1

1

a

1

0

1

0

0

a

2

0

1

2

3

a

3

fo f =

1

1 fo

f

p. 5.5

1 1

=

=

f

1

1

fo

=

f

1 1

CE 30125 - Lecture 5

• Solve for

ao  a  a  a 1

2

3

ao

=

fo

a

=

fo

1

a

2

a

3

1

=

3

f

1

= – 2

– 3

f

1

fo – f

+2

fo

1 1

+

– 2

1

fo

1

fo

+

1

f

1

• Therefore

gx

• Checking

=

gx

fo

1

+ fo

x

1

+ 3 f1 – 3 fo – f1



2 fo1   x 2 +  – 2 f1 + 2 fo + fo 1  + f1 1   x 3

to ensure that the constraints are satisfied:

g0

=

fo

g1

=

f

g

1

g

1

1

1

0

=

fo

1

=

f

1 1

p. 5.6

CE 30125 - Lecture 5

 

• We note that g x

can be re-written such that the functional and derivative values are

factored out:

 

g x



 

g x

= f

o

2x

3

– 3x

2

+ 1

 + f – 2x

3

1

+ 3x

2

1

 + fo x

3

– 2x

2

+ x

+f

1 1

x

3

– x

2

can be expressed in generic form as:

1

1

g  x  = fo  o  x  + f1  1  x  + fo o  x  + f1 1  x  • Each basis function is a

o x   2 x

3



third degree polynomial

3 x2 + 1

3

1 x  – 2 x + 3 x o x  x 1 x  x

3 3





2

2 x2 + x x

2

associated with the function at data point x

associated with the function at data point x

o

1

associated with the first derivative at data point x

associated with the first derivative at data pointx

p. 5.7

o

1



CE 30125 - Lecture 5

• The cubic Hermite basis functions vary with x as:



0



(x)

1

(x)



0

(x)

x

x x

x

0

x

1

0



1

x

1

(x)

• Therefore we can define 2 separate functions associated with each data point. Each is a third degree polynomial.

• NOW

WE

NEED

2

NODES



2

FUNCTIONS

PER

FREEDOM PER FUNCTION = 16 CONSTRAINTS.



Each of these functions satisfies the following constraints

p. 5.8

NODE



4

DEGREES

OF

CE 30125 - Lecture 5



 

8 constraints on the functions themselves for g x

to match the specified functional

values

 

g x

= f

1

o

 o  x  + f   x  + fo o  x  + 1

x x x



o

1

1

f

1 1

 x 1

o  x 

 x

o  x 

 x

1

1

=

0

1

0

0

0

=

1

0

1

0

0

8 constraints on the derivatives of the functions for g

1  x

to match the specified

derivative values

g

1

x

x

o

1

1

o

o  x  + 1

o  x

x

x

= f

f

1

1



1



1

1

1 1

 x  + fo o  x  + f

x

1

o  x



1 1 1

1 1

x

=

0

0

0

1

0

=

1

0

0

0

1

p. 5.9



1

x

CE 30125 - Lecture 5

• Mathematically these 16 constraints can be expressed as

 x  =  i



j

1 i

 ij

 x  = 0

ij

i

x  = 0



j

=

0  1

i

1 i

 j = 0 1

i

j

x  =  j

 j = 0 1

i

ij

j Kronecker Delta

i = j

• Therefore an alternative method for setting up

 

g x

is to associate a basis function

with each functional value and the various derivative values at each data point.

• Each of these basis functions is a polynomial of degree

• There will be

 p + 1  N + 1 

• We must set up

basis functions.

  p + 1  N + 1  

2

constraints.

p. 5.10

 p + 1  N + 1  – 1

.

CE 30125 - Lecture 5

General Hermite Interpolation Using Basis Functions

• In general, Hermite interpolation can be set up as:

gx

N

=

 i  x  fi  i  x  fi

1

+

i

i

= 0

= 0

• We must satisfy the constraints:

g x j 

=

g   xj 1

fj =



j



j

fj p 

j

fj

1

= 0

N

= 0

N

. . .

g p  xj

=

N

N

= 0

N

p. 5.11

+



+

p

  i  x  fi

i

= 0

CE 30125 - Lecture 5

• In order to satisfy

g  xj 

=

fj





N



N

 i xj fi  i x j  fi

1

+

i

i

= 0

N

+

+

i

= 0

p

 i x j  fi = 0

• We require the following constraints:

i xj 

=

 i x j 

=

0

=

0

 ij

=

0  1

i

j

i =

j

i j i j

= 0

N N

= 0

. . .

 i x j 

i j

p. 5.12

= 0

N

=

fj

CE 30125 - Lecture 5

• In order to satisfy:

g   xj 1

=

fj

1

j



= 0

N



N

N

N

  i  xj  fi  i  xj  fi 1

i

1

+

i

= 0

1

+

+

=

0

i  xj 

=

 ij

1

1

i j i j

= 0

N

= 0

N

. . .

i  x j 1

=

0

i j

= 0

p. 5.13

1

i

= 0

• We require the following constraints:

i xj 

  p  i  xj fi

N

= 0

=

fj

1



CE 30125 - Lecture 5

• In order to satisfy the

p

th

derivative conditions:

g  p   x j

=

fj p 

j

= 0

N



N

i

N

p

p

 i  xj fi  i xj  fi +

i

= 0

= 0

• We require the following constraints:

p i  xj p  i  x j

=

0

=

0

=

 ij

i j i j

= 0

N N

= 0

. . .

p i  x j 

i j

= 0

N

p. 5.14

1

N

+

+

p p  i  x j  f i

i

= 0

=

f j p 

CE 30125 - Lecture 5

• Each set of basis functions has the general form

i x  i  x 

i  x 

 p + 1  N + 1  – 1

a ij x j

i

b ij x j

i

t ij xj

i



=

j

 j

N

. . .

– 1

 j

= 0

= 0

p + 1N + 1  =

N

= 0

 p + 1  N + 1  – 1 =

= 0

= 0

N

= 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. 5.15

CE 30125 - Lecture 5

SUMMARY OF LECTURE 5

• Normalized Chebyshev polynomials are polynomial functions whose maximum amplitude is minimized over a given interval.

• If we select the roots of the tion) points for a

N

th

th N + 1

degree Chebyshev polynomial as data (or interpola-

degree polynomial interpolation formula (e.g. Lagrange), we will

have minimized the maximum error over the interval as far as we can.

• If Chebyshev roots are used as data points:

ec x

=

1 -----------------+ 1

N

  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.



Nth

degree polynomial interpolation error is also more evenly distributed when

Chebyshev roots are used as data points as opposed to using evenly spaced points since in the latter case the error is increased near the ends of the interval and decreased within the interval.

p. 5.16

CE 30125 - Lecture 5

• Hermite interpolation passes through the function and its first points. This results in a polynomial function of degree

p

derivatives at

 p + 1  N + 1  – 1

N

+ 1

data

.

• Extrapolation is the use of an interpolating formula for locations which do not lie within the interval.

p. 5.17...


Similar Free PDFs