polynomial interpolation – part ii · polynomial interpolation – part ii – prof. dr. florian...

48
Polynomial Interpolation – Part II – Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term 2016

Upload: vongoc

Post on 21-Aug-2019

235 views

Category:

Documents


0 download

TRANSCRIPT

Polynomial Interpolation– Part II –

Prof. Dr. Florian Rupp

German University of Technology in Oman (GUtech)Introduction to Numerical Methods for ENG & CS

(Mathematics IV)

Spring Term 2016

Exercise Session

Reviewing the highlights from last time(1/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 3 / 48

Reviewing the highlights from last time

Page 174, exercise 4Verify that the polynomials

p(x) = 5x3 − 27x2 + 45x− 21

q(x) = x4 − 5x3 + 8x2 − 5x+ 4

interpolate the data

x 1 2 3 4

f(x) = y 2 1 6 47

and explain why this does not violate the uniqueness part of the existence anduniqueness theorem on polynomial interpolation.

Reviewing the highlights from last time(1/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 4 / 48

We have

x 1 2 3 4

f(x) = y 2 1 6 47

p(x) 2 1 6 47q(x) 2 1 6 47

and thus

p(x) = 5x3 − 27x2 + 45x− 21

and

q(x) = x4 − 5x3 + 8x2 − 5x+ 4

are both interpolating polynomials. Though, their degree differs and thus the

uniqueness part is not violated.

Reviewing the highlights from last time(2/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 5 / 48

Reviewing the highlights from last time

Given the table

x 0 2 3 4

f(x) = y 7 11 28 63

■ Page 174, exercise 1Use the Lagrange interpolation process to obtain a polynomial of leastdegree that interpolates the above table.

■ Page 174, exercise 1 (reformulated)Use the Newton interpolation process to obtain a polynomial of least degreethat interpolates the above table.

Today, we will focus on further details ofpolynomial interpolation

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 6 / 48

Today’s topics:

■ Calculating the coefficients for Newton’s interpolation ansatz usingdivided differences

■ Interpolation with monomials and the Vandermode matrix

Corresponding textbook chapters: 4.1

Calculating the NewtonCoefficients Using Divided

Differences

The key idea in gaining the Newtoncoefficients (1/ 4)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 8 / 48

We now turn to the problem of determining the coefficients a0, a1, . . . , an ofthe Newton interpolation polynomial

pn(x) = a0 + a1(x− x0) + a2(x− x0)(x− x1) + . . .

· · ·+ an(x− x0)(x− x1) · · · (x− xn−1) ,

efficiently. Again, we start with a table of values of a function f :

x x0 x1 x2 . . . xn

f(x) f(x0) f(x1) f(x2) . . . f(xn)

The points x0, x1, x2, . . . , xn are assumed to be distinct, but no furtherassumption is made about their positions on the real line. We already knowthat for each n = 0, 1, . . . there exists an unique polynomial pn such that

■ the degree of pn is at most n, and■ pn(xi) = f(xi) for all i = 0, 1, . . . , n.

The key idea in gaining the Newtoncoefficients (2/ 4)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 9 / 48

A crucial observation about the Newton interpolation polynomial

pn(x) = a0 + a1(x− x0) + a2(x− x0)(x− x1) + . . .

· · ·+ an(x− x0)(x− x1) · · · (x− xn−1) ,

is that its coefficients a0, a1, . . . , an do not depend on n.

In other words, pn is obtained from pn−1 by adding one more term, withoutaltering the coefficients already present in pn−1 itself:

pn(x) = pn−1(x) + an(x− x0)(x− x1) · · · (x− xn−1) .

The key idea in gaining the Newtoncoefficients (3/ 4)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 10 / 48

A systematic way of determining the unknown coefficients a0, a1, . . . , an fromthe table

x x0 x1 x2 . . . xn

f(x) f(x0) f(x1) f(x2) . . . f(xn)

is to set x equal in turn to x0, x1, . . . , xn during the construction of theNewton interpolation polynomial

pn(x) = a0 + a1(x− x0) + a2(x− x0)(x− x1) + . . .

· · ·+ an(x− x0)(x− x1) · · · (x− xn−1) ,

i.e.

p0(x0) = f(x0) = a0 ,

p1(x1) = f(x1) = a0 + a1(x1 − x0) ,

p2(x2) = f(x2) = a0 + a1(x2 − x0) + a2(x2 − x0)(x2 − x1) , etc. . . .

The key idea in gaining the Newtoncoefficients (4/ 4)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 11 / 48

The equations

p0(x0) = f(x0) = a0 ,

p1(x1) = f(x1) = a0 + a1(x1 − x0) ,

p2(x2) = f(x2) = a0 + a1(x2 − x0) + a2(x2 − x0)(x2 − x1) , etc.

can be solved for the ai’s in turn, starting with a0:

a0 = f [x0] := f(x0)

a1 = f [x0, x1] :=f(x1)− a0

x1 − x0=

f(x1)− f(x0)

x1 − x0

a2 = f [x0, x1, x2] :=f(x2)− a0 − a1(x2 − x0)

(x2 − x0)(x2 − x1)

=

f(x2)−f(x1)x2−x1

− f(x1)−f(x0)x1−x0

x2 − x0, etc.

Some remarks on Newton’s divideddifferences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 12 / 48

The (bracket) notation

ak = f [x0, x1, . . . , xk]

indicates that ak depends on the values of f at the nodes x0, x1, . . . , xn.

As the values ak are uniquely determined through the system of equationsshown on the last slide we can view the identity ak =: f [x0, x1, . . . , xk] asdefinition of the quantity f [x0, x1, . . . , xk].

The quantity f [x0, x1, . . . , xk] is called divided difference of order k for f.

Example: Determining divided differences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 13 / 48

Example

Determine the quantities f [x0], f [x0, x1] and f [x0, x1, x2] based on the table

x 1 −4 0

f(x) 3 13 −23

The determining systems of equations reads as

p0(x0) = f(x0) = 3 = a0 ,

p1(x1) = f(x1) = 13 = a0 + a1(x1 − x0) = a0 + a1(−5) ,

p2(x2) = f(x2) = −23 = a0 + a1(x2 − x0) + a2(x2 − x0)(x2 − x1)

= a0 + a1(−1) + a2(−1)(4) .

Example: Determining divided differences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 14 / 48

Example [cont.]

From

3 = a0 ,

13 = a0 − 5a1 ,

−23 = a0 − a1 − 4a2 ,

we can read of the coefficients of the Newton interpolation polynomial as

a0 = 3 = f [1]

a1 = −2 = f [1,−4]

a2 = 7 = f [1,−4, 0] .

Newton’s form of the interpolatingpolynomial

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 15 / 48

With the notation of the divided differences, the Newton form of theinterpolating polynomial takes the form

pn(x) =n∑

i=0

ai

i−1∏

j=0

(x− xj)

=n∑

i=0

f [x0, x1, . . . , xi]i−1∏

j=0

(x− xj) ,

with the convention∏

−1j=0(x− xj) := 1.

Notice that the coefficient of xn in pn is f [x0, x1, . . . , xn] because the termxn occurs only in

∏n−1j=0 (x− xj).

Thus, if f is a polynomial of degree ≤ n− 1, then f [x0, x1, . . . , xn] = 0

leading to a Newton interpolating polynomial of degree ≤ n− 1, too.

Computing the divided differences (1/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 16 / 48

The determining system of the coefficients (a.k.a. the divided differences)

f(x0) = a0 ,

f(x1) = a0 + a1(x1 − x0) ,

f(x2) = a0 + a1(x2 − x0) + a2(x2 − x0)(x2 − x1) , etc.

can be rewritten as

f(xk) =k

i=0

ai

i−1∏

j=0

(xk − xj) , for 0 ≤ k ≤ n .

It is evident, that the computation of the coefficients can be performed

recursively. E.g. a1 can be computed once a0 is known, a2 can be computed

once a0 and a1 are known and so on.

Computing the divided differences (2/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 17 / 48

We rewrite f(xk) =∑k

i=0 ai∏i−1

j=0(xk − xj) as

f(xk) = ak

k−1∏

j=0

(xk − xj) +

k−1∑

i=0

ai

i−1∏

j=0

(xk − xj) ,

and get

ak =

f(xk)−

k−1∑

i=0

ai

i−1∏

j=0

(xk − xj)

k−1∏

j=0

(xk − xj)

which allows a recursive computation of the coefficients ai = f [x0, x1, . . . , xi].

Algorithm for computing the divideddifferences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 18 / 48

Algorithm (Divided Differences)

1. Set f [x0] = f(x0).2. For k = 1, 2, . . . , n compute f [x0, x1, . . . , xk] via

f [x0, x1, . . . , xk] =

f(xk)−k−1∑

i=0

f [x0, x1, . . . , xi]i−1∏

j=0

(xk − xj)

k−1∏

j=0

(xk − xj)

The divided differences f [x0], f [x0, x1], . . . , f [x0, x1, . . . , xn] can thus be

computed at the cost of 13n(3n+ 1) additions, (n− 1)(n− 2) multiplications

and n divisions.

The first four divided difference

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 19 / 48

Example

Use our algorithm to write out the divided difference formulas for f [x0],f [x0, x1], f [x0, x1, x2] and f [x0, x1, x2, x3].

We have:

f [x0] = f(x0)

f [x0, x1] =f(x1)− f [x0]

x1 − x0

f [x0, x1, x2] =f(x2)− f [x0]− f [x0, x1](x2 − x0)

(x2 − x0)(x2 − x1)

f [x0, x1, x2, x3]

=f(x3)− f [x0]− f [x0, x1](x3 − x0)− f [x0, x1, x2](x3 − x0)(x3 − x1)

(x3 − x0)(x3 − x1)(x3 − x2)

Improving the Computationof the Divided Differences

Improving the computation of the divideddifferences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 21 / 48

We have just derived an algorithm that computes the divided differencesf [x0], f [x0, x1], . . . , f [x0, x1, . . . , xn] at the cost of 1

3n(3n+ 1) additions,(n− 1)(n− 2) multiplications and n divisions.

In this section, we will improve this result such that our new algorithmrequires only

■ n(n+ 1) additions, 12n(n+ 1) divisions, and

■ the storage of just three statements (!).

The tools that allow for the derivation of this algorithm are

■ the recursive property of the divided differences, and■ the invariance theorem for divided differences.

The recursive property of the divideddifferences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 22 / 48

Theorem (Recursive Property of the Divided Differences)

The divided differences obey the formula

f [x0, x1, . . . , xk] =f [x1, x2, . . . , xk]− f [x0, x1, . . . , xk−1]

xk − x0

For instance, this allows the computation of f [x0, x1, x2] via the scheme

f [x0]〉 → f [x0, x1]

f [x1] 〉 → f [x0, x1, x2]〉 → f [x1, x2]

f [x2]

Proof of the recursive property (1/ 3)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 23 / 48

Since f [x0, x1, . . . , xk] was defined to be equal to the coefficient ak in theNewton form of the interpolating polynomial

pk(x) =

k∑

i=0

ai

i−1∏

j=0

(x− xj) ,

we say that f [x0, x1, . . . , xk] is the coefficient of xk in the polynomial pk ofdegree ≤ k which interpolates the function f at the points x0, x1, . . . , xk.

Similarly, f [x1, x2, . . . , xk] is the coefficient of xk−1 in the polynomial q ofdegree ≤ k− 1 which interpolates the function f at the points x1, x2, . . . , xk.

And finally, we can interpret f [x0, x1, . . . , xk−1] as the coefficient of xk−1 in

the polynomial pk−1 of degree ≤ k − 1 which interpolates the function f at

the points x0, x1, . . . , xk−1.

Proof of the recursive property (2/ 3)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 24 / 48

We have

■ f [x0, x1, . . . , xk] is the coefficient of xk in the polynomial pk,■ f [x1, x2, . . . , xk] is the coefficient of xk−1 in the polynomial q, and■ f [x0, x1, . . . , xk−1] is the coefficient of xk−1 in the polynomial pk−1.

These three polynomials pk, q and pk−1 are related as follows:

pk(x)!= q(x) +

x− xk

xk − x0(q(x)− pk−1(x)) .

To establish this, we utilize the interpolation properties of pk, q and pk−1.

First, we see that the right hand side is a polynomial of degree at most k.Next, we evaluate the right hand side at xi, i = 1, . . . , k − 1. This gives

q(xi) +xi − xk

xk − x0(q(xi)− pk−1(xi)) = f(xi) +

xi − xk

xk − x0(f(xi)− f(xi))

= f(xi) .

Proof of the recursive property (3/ 3)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 25 / 48

Similarly, evaluating

q(x) +x− xk

xk − x0(q(x)− pk−1(x))

at x0 and xk gives f(x0) and f(xk), respectively.

Thus, both sides of the identity are interpolating the same k + 1 points andare polynomials with a degree at most k. Thus, their difference is apolynomial of degree at most k that vanishes at k + 1 points. Hence, the twosides are equal.

Finally, as the coefficient of xk−1 in q is f [x1, x2, . . . , xk] and that of xk−1 inpk−1 is f [x0, x1, . . . , xk−1], we have that the coefficient of xk on the righthand side of the equation is

f [x1, x2, . . . , xk]− f [x0, x1, . . . , xk−1]

xk − x0.

The invariance property of the divideddifferences

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 26 / 48

Notice that f [x0, x1, . . . , xk] is not changed if the nodes x0, x1, . . . , xk arepermuted. Thus, e.g., we have

f [x0, x1, x2] = f [x1, x2, x0] .

The reason is that f [x0, x1, x2] is the coefficient of x2 in the quadraticpolynomial p2 interpolating f at x0, x1 and x2, whereas f [x1, x2, x0] is thecoefficient of x2 in the quadratic polynomial q2 interpolating f at x1, x2 andx0. Due to the uniqueness and existence theorem of polynomial interpolationthese two polynomials are of course the same.

This implies the following theorem:

Theorem (Recursive Property of the Divided Differences)

The divided difference f [x0, x1, . . . , xk] is invariant under all permutations ofthe arguments x0, x1, . . . , xk.

Generalization of the divided differenceformula ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 27 / 48

As the variables x0, x1, . . . , xk and k are arbitrary, the recursive formula canalso be written as

f [xi, xi+1, . . . , xj−1, xj ] =f [xi+1, xi+2, . . . , xj ]− f [xi, xi+1, . . . , xj−1]

xj − xi

The first three divided differences are thus

f [xi] = f(xi)

f [xi, xi+1] =f [xi+1]− f [xi]

xi+1 − xi

f [xi, xi+1, xi+2] =f [xi+1, xi+2]− f [xi, xi+1]

xi+2 − xi.

... and the divided difference table

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 28 / 48

As an illustration for n = 3, this leads to the following divided difference tablefor an arbitrary function f :

x f [] f [ , ] f [ , , ] f [ , , , ]

x0 f [x0]

〉 → f [x0, x1]

x1 f [x1] 〉 → f [x0, x1, x2]

〉 → f [x1, x2] 〉 → f [x0, x1, x2, x3]

x2 f [x2] 〉 → f [x1, x2, x3]〉 → f [x2, x3]

x3 f [x2]

In this table, the coefficients along the top diagonal are the ones needed to

form the Newton form of the interpolating polynomial p3.

Example: Set-up of a divided differencetable

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 29 / 48

Example

Construct a divided difference table for the function f given in the followingdata table, and write out the Newton form of the interpolating polynomial:

x 1 32 0 2

f(x) 3 134 3 5

3

We apply the just derived formulas for the divided differences:

f [xi] = f(xi)

f [xi, xi+1] =f [xi+1]− f [xi]

xi+1 − xi

f [xi, xi+1, xi+2] =f [xi+1, xi+2]− f [xi, xi+1]

xi+2 − xi, and so on

Example: Set-up of a divided differencetable

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 30 / 48

Example [cont.]

Thus, for

x 1 32 0 2

f(x) 3 134 3 5

3

the first entry of the divided difference table for f reads as

f [1, 32 ] =f [32 ]− f [1]

32 − 1

=134 − 3)32 − 1

=1

2,

and, for instance, after completion of the columns for f [] and f [ , ] the firstentry f [ , , ] is given as

f [1, 32 , 0] =f [32 , 0]− f [1, 32 ]

0− 1=

16 − 1

2

0− 1=

1

3.

Example: Set-up of a divided differencetable

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 31 / 48

Example [cont.]

Finally, the complete divided difference table for f reads as

x f [] f [ , ] f [ , , ] f [ , , , ]

1 3

〉 → 12

32

134 〉 → 1

3

〉 → 16 〉 → −2

0 3 〉 → −53

〉 → −23

2 53

Thus, we obtain

p3(x) = 3 + 12(x− 1) + 1

3(x− 1)(x− 32)− 2(x− 1)(x− 3

2)x .

Classroom problem: Set-up of a divideddifference table

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 32 / 48

Classroom Problem

Construct a divided difference table for the function f given in the followingdata table, and write out the Newton form of the interpolating polynomial:

x 1 −4 0

f(x) 3 13 −23

Use the just derived formulas for the divided differences:

f [xi] = f(xi)

f [xi, xi+1] =f [xi+1]− f [xi]

xi+1 − xi

f [xi, xi+1, xi+2] =f [xi+1, xi+2]− f [xi, xi+1]

xi+2 − xi.

Classroom problem: Set-up of a divideddifference table

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 33 / 48

Classroom Problem [Solution]

x f [] f [ , ] f [ , , ]

1 3

〉 → −2

−4 13 〉 → 7〉 → −9

0 −23

Thus we obtain

p2(x) = 3− 2(x− 1) + 7(x− 1)(x+ 4) .

Interpolation withMonomials and theVandermode Matrix

Approximation with basis functions ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 35 / 48

Another view of interpolation is that for a given set of n+ 1 data points

x x0 x1 x2 . . . xn

f(x) = y y0 y1 y2 . . . yn

we want to express an interpolating function f(x) as a linear combination of aset of basis functions ϕ0, ϕ1, . . . , ϕn such that

f(x) ≈ c0ϕ0(x) + c1ϕ1(x) + · · ·+ cnϕn(x) ,

where the coefficients c0, c1, . . . , cn are to be determined.

We want the function f to interpolate the data (xi, yi), i.e., we want to havelinear equations in c0, c1, . . . , cn of the form

f(xi) = c0ϕ0(xi) + c1ϕ1(xi) + · · ·+ cnϕn(xi) = yi ,

for each i = 0, 1, . . . , n.

... leads naturally to linear systems

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 36 / 48

This is a system of linear equations

Ac = y ,

where the entries of the coefficient matrix A are given by ai,j = ϕj(xi), whichis the value of the jth basis function evaluated at the ith data point. Theright-hand side vector y contains the known data values yi, and thecomponents of the vector c are the unknown coefficients ci.

Thus, in principle interpolation is nothing else than solving a linear system . . .

Monomials as basis functions forpolynomial interpolation (1/ 2) ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 37 / 48

The natural basis for the vector space Pn of all polynomials up to degree n

consists of monomials

ϕ0(x) = 1 , ϕ1(x) = x , ϕ2(x) = x2 , . . . ϕn(x) = xn .

Consequently, a interpolation polynomial pn has the form

pn(x) = c0 + c1x+ c2x2 + · · ·+ cnx

n ,

and the associates linear system Ac = y reads as

1 x0 x20 . . . xn01 x1 x21 . . . xn11 x2 x22 . . . xn2...

......

. . ....

1 xn x2n . . . xnn

c0c1c2...cn

=

y0y1y2...yn

.

Monomials as basis functions forpolynomial interpolation (2/ 2) ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 38 / 48

Sketch of the first few monomials on [−1, 1]:

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

φ0 = 1

φ1 = x

φ2 = x2

φ4 = x4

φ3 = x3

... may not be the smartest choice

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 39 / 48

The coefficient matrix is the well-known Vandermonde matrix. We alreadyknow that it is regular provided the points x0, x1, . . . , xn are distinct. So, inprinciple, we can solve the polynomial interpolation problem.

Although, the Vandermonde matrix is invertible, we know that it isill-conditioned as n increases: For large n, the monomials are lessdistinguishable from one another (see the figure on the previous slide). Thus,the columns of the Vandermonde matrix become nearly dependent in thiscase. Moreover, high-degree polynomials often oscillate widely and are highlysensitive to small changes in the data.

Up to now, we have discussed three choices for the basis functions of Pn: the

Lagrange polynomials li(x), the Newton polynomials πi, and the monomials.

It turns out that there are better choices for the basis functions; namely, the

Chebysev polynomials have more desirable features.

The Chebysev polynomials ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 40 / 48

The Chebysev polynomials play an important role in mathematics becausethey have several special properties such as the recursive relation

T0(x) = 1 , T1(x) = x

Ti(x) = 2xTi−1(x)− Ti−2(x)

for i = 2, 3, 4, . . . . Thus, the first six Chebysev polynomials are

T0(x) = 1 , T1(x) = x , T2(x) = 2x2 − 1 , T3(x) = 4x3 − 3x ,

T4(x) = 8x4 − 8x2 + 1 , T5(x) = 16x5 − 20x3 + 5x .

The Chebysev polynomials are usually employed on the interval [−1, 1]. With

change of variable, they can be used on any interval. E.g., substituting x by

cos(t) allows for their use on the interval [0, 2π].

... their graphs ...

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 41 / 48

Sketch of the first few Chebysev polynomials on [−1, 1]:

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

T0(x)

T1(x)

T2(x)

T3(x)

T4(x)

T5(x)

... and the equal oscillation property

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 42 / 48

One of the important properties of the Chebysev polynomials is the equaloscillation property. Notice in the previous figure that successive extremepoints of the Chebysev polynomials are equal in magnitude and alternate insign.

This property tends to distribute the error uniformly when Chebysevpolynomials are used as basis functions.

In polynomial interpolation for continuous functions, it is particularly

advantageous to select as the interpolation points the roots or the extreme

points of a Chebysev polynomial. This causes the maximum error over the

interval of the interpolation to be minimized. (We will illustrate this effect

next time.)

Summary & Outlook

Major concepts covered today (1/ 4):Newton’s form

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 44 / 48

■ The Newton form of the interpolation polynomial is

pn(x) =n

i=0

ai

i−1∏

j=0

(x− xj) .

with divided differences

ai = f [x0, x1, . . . , xi] =f [x1, x2, . . . , xi]− f [x0, x1, . . . , xi−1]

xi − x0

■ The Lagrange and the Newton form are just two differentrepresentations of the unique polynomial p of degree n thatinterpolates a table of n+ 1 pairs of points (xi, f(xi)) fori = 0, 1, . . . , n.

Major concepts covered today (2/ 4):polynomial interpolation example

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 45 / 48

■ We illustrate the Lagrange and Newton form with the aid of a smalltable for n = 2:

x x0 x1 x2

f(x) f(x0) f(x1) f(x2)

The Lagrange interpolation polynomial is

p2(x) =(x− x1)(x− x2)

(x0 − x1)(x0 − x2)f(x0) +

(x− x0)(x− x2)

(x1 − x0)(x1 − x2)f(x1)

+(x− x0)(x− x1)

(x2 − x0)(x2 − x1)f(x2)

Clearly, p2(x0) = f(x0), p2(x1) = f(x1) and p2(x2) = f(x2).

Major concepts covered today (3/ 4):polynomial interpolation example

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 46 / 48

■ Next, we form the divided difference table

x f [] f [ , ] f [ , , ]

x0 f [x0]

〉 → f [x0, x1]

x1 f [x1] 〉 → f [x0, x1, x2]

〉 → f [x1, x2]x2 f [x2]

Using the divided difference entries from the top diagonal, we have

p2(x) = f [x0] + f [x0, x1](x− x0) + f [x0, x1, x2](x− x0)(x− x1) .

Again, it can be easily shown that p2(x0) = f(x0), p2(x1) = f(x1)and p2(x2) = f(x2).

Preparation for the next lecture (1/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 47 / 48

Please, prepare these short exercises for the next lecture:

1. Page 175, exercise 10 aUse a divided differences table to construct Newton’s interpolation poly-nomial for the following data:

x 0 2 3 4

f(x) 7 11 28 63

2. Page 175, exercise 10 bWithout simplifying the Newton interpolation polynomial obtained above,

write this polynomial in nested form for easy evaluation.

Preparation for the next lecture (2/ 2)

Prof. Dr. Florian Rupp GUtech 2016: Numerical Methods – 48 / 48

Please, prepare these short exercises for the next lecture:

3. Page 176, exercise 22Find a polynomial of least degree that takes these values:

x 1.73 1.82 2.61 5.22 8.26

f(x) = y 0 0 7.8 0 0

Hint: Rearrange the table so that the non-zero value of f(x) is the last

entry, or think of some better way.