Top Banner
Interpolation
43

Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Jul 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Interpolation

Page 2: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

• 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

Page 3: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

• Newton form of interpolating polynomial is written

namely,

• Interpolation error in Newton form can be derived as follows:

Page 4: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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 ,∈

Page 5: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

French MathematicianCharles Hermite

1822 - 1901

Page 6: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 7: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 8: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 9: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 10: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 11: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 12: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 13: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Hermite Interpolation• Hermite interpolation allows us to find a ploynomial that matched both function valueand

some of the derivative values

Page 14: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 15: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 16: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 17: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 18: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 19: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Runge's phenomenon

Carle David Tolmé Runge(August 30, 1856 – January 3, 1927) was a German mathematician, physicist, and spectroscopist

Page 20: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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

Page 21: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Isaac Jacob Schoenberg(April 21, 1903, Galaţi—February 21, 1990)

Page 22: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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

Page 23: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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

Page 24: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 25: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 26: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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

−=−−=−−=−

Page 27: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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

Page 28: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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.

Page 29: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 30: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 31: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 32: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 33: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 34: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 35: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 36: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition
Page 37: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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.

Page 38: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

B-splines

Page 39: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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.

Page 40: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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.

Page 41: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

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.

Page 42: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition

Bezier Spline InterpolationPractical Application

Page 43: Interpolation - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/interpolati… · y Piecewise quadratic interpolation of four data points. Spline Interpolation Definition