interpolation and polynomial approximation › ~smpun › math417 › chapter-3.pdf ·...

17
Chapter 3 Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One of the most useful and well-known classes of functions mapping the set of real numbers into itself is the algebraic polynomials, the set of functions of the form P n pxq“ a n x n ` a n´1 x n´1 `¨¨¨` a 1 x ` a 0 , where n is a nonnegative integer and a 0 , ¨¨¨ ,a n are real constants. One reason for their impor- tance is that they uniformly approximate continuous functions. This result is expressed precisely in the Weierstrass Approximation Theorem. Theorem 3.1.1 (Weierstrass Approximation Theorem). Suppose that f P C ra, bs. For each " ° 0, there exists a polynomial P pxq such that |f pxP pxq| " for all x Pra, bs. Another important reason for considering the class of polynomials in the approximation of functions is that the derivative and indefinite integral of a polynomial are easy to determine and are also polynomials. For these reasons, polynomials are often used for approximating continuous functions. Lagrange Interpolating Polynomials The problem of determining a polynomial of degree one that passes through the distinct points px 0 ,y 0 q and px 1 ,y 1 q is the same as approximating a function for which f px 0 q“ y 0 and f px 1 q“ y 1 by means of a first-degree polynomial interpolating, or agreeing with the values of f at the given points. Using this polynomial for approximation within the interval given by the endpoints is called polynomial interpolation. Define the functions L 0 pxq“ x ´ x 1 x 0 ´ x 1 , and L 1 pxq“ x ´ x 0 x 1 ´ x 0 . The linear Lagrange interpolating polynomial through px 0 ,y 0 q and px 1 ,y 1 q is P pxq“ L 0 pxqf px 0 q` L 1 pxqf px 1 q. 35

Upload: others

Post on 29-Jun-2020

35 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

Chapter 3

Interpolation and PolynomialApproximation

3.1 Interpolation and the Lagrange Polynomial

One of the most useful and well-known classes of functions mapping the set of real numbers intoitself is the algebraic polynomials, the set of functions of the form

Pnpxq “ anxn ` an´1x

n´1 ` ¨ ¨ ¨ ` a1x ` a0,

where n is a nonnegative integer and a0, ¨ ¨ ¨ , an are real constants. One reason for their impor-tance is that they uniformly approximate continuous functions. This result is expressed preciselyin the Weierstrass Approximation Theorem.

Theorem 3.1.1 (Weierstrass Approximation Theorem). Suppose that f P Cra, bs. For each" ° 0, there exists a polynomial P pxq such that

|fpxq ´ P pxq| † " for all x P ra, bs.

Another important reason for considering the class of polynomials in the approximation offunctions is that the derivative and indefinite integral of a polynomial are easy to determineand are also polynomials. For these reasons, polynomials are often used for approximatingcontinuous functions.

Lagrange Interpolating Polynomials

The problem of determining a polynomial of degree one that passes through the distinct pointspx0, y0q and px1, y1q is the same as approximating a function for which fpx0q “ y0 and fpx1q “ y1by means of a first-degree polynomial interpolating, or agreeing with the values of f at thegiven points. Using this polynomial for approximation within the interval given by the endpointsis called polynomial interpolation.

Define the functions

L0pxq “ x ´ x1x0 ´ x1

, and L1pxq “ x ´ x0x1 ´ x0

.

The linear Lagrange interpolating polynomial through px0, y0q and px1, y1q is

P pxq “ L0pxqfpx0q ` L1pxqfpx1q.

35

Page 2: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

36 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

Note that L0px0q “ 1, L0px1q “ 0, L1px0q “ 0, and L1px1q “ 1, which implies that

P px0q “ fpx0q “ y0 and P px1q “ fpx1q “ y1.

So P is the unique polynomial of degree at most one that passes through px0, y0q and px1, y1q.

Example 3.1.2. We determine the linear Lagrange interpolating polynomial that passes throughthe points p2, 4q and p5, 1q. In this case, we have

L0pxq “ x ´ 5

2 ´ 5“ ´1

3px ´ 5q and L1pxq “ x ´ 2

5 ´ 2“ 1

3px ´ 2q.

Hence, we have

P pxq “ ´1

3px ´ 5q ¨ 4 ` 1

3px ´ 2q ¨ 1 “ ´4

3x ` 20

3` 1

3x ´ 2

3“ ´x ` 6.

To generalize the concept of interpolation, consider the construction of a polynomial of degreeat most n that passes through the n ` 1 points pxi, fpxiqq for i “ 0, ¨ ¨ ¨ , n. In this case, we firstconstruct, for each i “ 0, 1, ¨ ¨ ¨ , n, a function Ln,kpxq with the property that

Ln,kpxiq “ 0 when i ‰ k and Ln,kpxkq “ 1.

To satisfy the first type of condition, it requires that the numerator of Ln,kpxq contains the term

px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xk´1qpx ´ xk`1q ¨ ¨ ¨ px ´ xnq.

To satisfy Ln,kpxkq “ 1, the denominator of Ln,kpxq must be the same term but evaluated atx “ xk. Thus,

Ln,kpxq “ px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xk´1qpx ´ xk`1q ¨ ¨ ¨ px ´ xnqpxk ´ x0qpxk ´ x1q ¨ ¨ ¨ pxk ´ xk´1qpxk ´ xk`1q ¨ ¨ ¨ pxk ´ xnq .

The interpolating polynomial is easily described once the form of Ln,k is known. This polynomial,called n-th Lagrange interpolating polynomial, is defined in the following theorem.

Theorem 3.1.3 (Lagrange Polynomial). If x0, x1, ¨ ¨ ¨ , xn are n ` 1 distinct numbers and f isa function whose values are given at these points, then a unique polynomial P pxq of degree atmost n exists with

fpxkq “ P pxkq for k “ 0, ¨ ¨ ¨ , n.The polynomial P pxq is given by

P pxq “nÿ

k“0

fpxkqLn,kpxq (3.1)

where

Lpnqk pxq “ px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xk´1qpx ´ xk`1q ¨ ¨ ¨ px ´ xnq

pxk ´ x0qpxk ´ x1q ¨ ¨ ¨ pxk ´ xk´1qpxk ´ xk`1q ¨ ¨ ¨ pxk ´ xnq “nπ

i“0, i‰k

x ´ xixk ´ xi

.

We will write Ln,k simply as Lk when there is no confusion as to its degree.

Example 3.1.4. (a) Use the numbers (called nodes) x0 “ 2, x1 “ 2.75, and x2 “ 4 to findthe second Lagrange interpolating polynomial for fpxq “ 1{x.

Page 3: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.1. INTERPOLATION AND THE LAGRANGE POLYNOMIAL 37

(b) Use this polynomial to approximate fp3q “ 1{3.

Solution. We first determine the coe�cient polynomials L0, L1, and L2. In nested form theyare

L0pxq “ px ´ 2.75qpx ´ 4qp2 ´ 2.75qp2 ´ 4q “ 2

3px ´ 2.75qpx ´ 4q,

L1pxq “ px ´ 2qpx ´ 4qp2.5 ´ 2qp2.75 ´ 4q “ ´16

15px ´ 2qpx ´ 4q,

and

L2pxq “ px ´ 2qpx ´ 2.75qp4 ´ 2qp4 ´ 2.75q “ 2

5px ´ 2qpx ´ 2.75q.

Also, fpx0q “ 1{2, fpx1q “ 4{11, fpx2q “ 1{4, so

P pxq “2ÿ

k“0

fpxkqLkpxq “ 1

22x2 ´ 35

88x ` 49

44.

An approximation to fp3q “ 1{3 is

fp3q « P p3q “ 0.32955.

See Figure 3.1 for an illustration.

2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

Figure 3.1: The function fpxq “ 1{x and its 2-nd Lagrange polynomial P pxq “ 122x

2 ´ 3588x ` 49

44

The next step is to calculate a remainder term or bound for the error involved in approximatinga function by an interpolating polynomial.

Theorem 3.1.5. Suppose x0, x1, ¨ ¨ ¨ , xn are n ` 1 distinct numbers in the interval ra, bs andf P Cn`1ra, bs. Then, for each x P ra, bs, a number ⇠pxq (generally unknown) between x0, ¨ ¨ ¨ , xnand hence in pa, bq exists with

fpxq “ P pxq ` f pn`1qp⇠pxqqpn ` 1q! px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xnq, (3.2)

where P pxq is the interpolating polynomial given by (3.1).

Page 4: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

38 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

Proof. Note that if we take x “ xk, for any k “ 0, 1, ¨ ¨ ¨ , n, then we have

fpxkq “ P pxkq.

One may choose ⇠pxq arbitrarily in the interval pa, bq and the equation (3.2) will hold.

If x ‰ xk for all k “ 0, 1, ¨ ¨ ¨ , n, we define the function gptq for t P ra, bs by

gptq “ fptq ´ P ptq ´ rfpxq ´ P pxqsnπ

i“0

t ´ xix ´ xi

.

Since f P Cn`1ra, bs, and P P C8ra, bs, it follows that g P Cn`1ra, bs. For t “ xk, we have

gpxkq “ fpxkq ´ P pxkq ´ rfpxq ´ P pxqsnπ

i“0

xk ´ xix ´ xi

“ 0 ´ rfpxq ´ P pxqs ¨ 0 “ 0.

Moreover, when t “ x, we have

gpxq “ fpxq ´ P pxq ´ rfpxq ´ P pxqsnπ

i“0

x ´ xix ´ xi

“ fpxq ´ P pxq ´ rfpxq ´ P pxqs “ 0.

Thus, g P Cn`1ra, bs and g is zero at the n`2 distinct numbers x, x0, x1, ¨ ¨ ¨ , xn. By GeneralizedRolle’s Theorem 1.1.16, there exists a number ⇠ P pa, bq such that gpn`1qp⇠q “ 0. Hence, we have

0 “ gpn`1qp⇠q “ f pn`1qp⇠q ´ P pn`1qp⇠q ´ rfpxq ´ P pxqs dn`1

dtn`1

«nπ

i“0

t ´ xix ´ xi

t“⇠

. (3.3)

However, P pxq is a polynomial of degree at most n, so the n` 1-st derivative is identically zero.Also,

±ni“0pt ´ xiq{px ´ xiq is a polynomial of degree n ` 1, so we have

dn`1

dtn`1

i“0

t ´ xix ´ xi

“ pn ` 1q!±ni“0px ´ xiq

.

Then, (3.3) now becomes

0 “ f pn`1qp⇠q ´ 0 ´ rfpxq ´ P pxqs pn ` 1q!±ni“0px ´ xiq

ùñ fpxq “ P pxq ` f pn`1qp⇠qpn ` 1q!

i“0

px ´ xiq.

This completes the proof.

The error formula is an important theoretical result because Lagrange polynomials are usedextensively for deriving numerical di↵erentiation and integration methods. Error bounds forthese techniques are obtained from the Lagrange error formula. Note that the error form forthe Lagrange polynomial is quite similar to that for the Taylor polynomial. The n-th Taylorpolynomial about x0 concentrates all the known information at x0 and has an error term of theform

f pn`1qp⇠pxqqpn ` 1q! px ´ x0qn`1.

The Lagrange polynomial of degree n uses information at the distinct numbers x0, x1, ¨ ¨ ¨ , xnand, in place of px ´ x0qn`1, its error formula uses a product of the n ` 1 terms:

f pn`1qp⇠pxqqpn ` 1q! px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xnq.

Page 5: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.2. DATA APPROXIMATION AND NEVILLE’S METHOD 39

Example 3.1.6. In Example 3.1.4, we found the second Lagrange polynomial for fpxq “ 1{xon r2, 4s using the nodes x0 “ 2, x1 “ 2.75, and x2 “ 4. Determine the error form for thispolynomial, and the maximum error when the polynomial is used to approximate fpxq forx P r2, 4s.

Solution. Because fpxq “ 1{x, we have

f 1pxq “ ´ 1

x2, f2pxq “ 2

x3, and f3pxq “ ´ 6

x4.

As a consequence, the second Lagrange polynomial has the error form

f3p⇠pxqq3!

px ´ x0qpx ´ x1qpx ´ x2q “ ´px ´ 2qpx ´ 2.75qpx ´ 4qp⇠pxqq4 for ⇠pxq P p2, 4q.

The maximum value of p⇠pxqq´4 on the interval is 2´4 “ 1{16. We now need to determine themaximum value on this interval of the absolute value of the polynomial

gpxq :“ px ´ 2qpx ´ 2.75qpx ´ 4q “ x3 ´ 35

4x2 ` 49

2x ´ 22.

Because

g1pxq “ 3x2 ´ 35

2x ` 49

2“ 1

2p3x ´ 7qp2x ´ 7q,

the critical points occur at

x “ 7

3with g

ˆ7

3

˙“ 25

108, and x “ 7

2with g

ˆ7

2

˙“ ´ 9

16.

Hence, the maximum error is

f3p⇠pxqq3!

|px ´ x0qpx ´ x1qpx ´ x2q| § 1

16 ¨ 6

����´9

16

���� “ 3

512« 0.00586.

3.2 Data Approximation and Neville’s Method

A practical di�culty with Lagrange interpolation is that the error term is di�cult to apply, sothe degree of the polynomial needed for the desired accuracy is generally not known until com-putations have been performed. A common practice is to compute the results given from variouspolynomials until appropriate agreement is obtained. However, the work done in calculating theapproximation by the second polynomial does not lessen the work needed to calculate the thirdapproximation; nor is the fourth approximation easier to obtain once the third approximationis known, and so on. We now derive these approximating polynomials in a recursive manner.

Definition 3.2.1. Let f be a function defined at x0, x1, ¨ ¨ ¨ , xn and suppose thatm1,m2, ¨ ¨ ¨ ,mk

are k distinct integers, with 0 § mi § n for each i “ 1, ¨ ¨ ¨ , k. The Lagrange polynomial thatagrees with fpxq at the k points xm1 , ¨ ¨ ¨ , xmk is denoted Pm1,m2,¨¨¨ ,mkpxq.

Example 3.2.2. Let x0 “ 1, x1 “ 2, x2 “ 3, x3 “ 4, x4 “ 6, and fpxq “ ex. Determine theinterpolating polynomial denoted P1,2,4pxq, and use this polynomial to approximate fp5q.

Page 6: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

40 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

Solution. This is the Lagrange polynomial that agrees with fpxq at x1 “ 2, x2 “ 3, x4 “ 6.Hence,

P1,2,4pxq “ px ´ 3qpx ´ 6qp2 ´ 3qp2 ´ 6q e

2 ` px ´ 2qpx ´ 6qp3 ´ 2qp3 ´ 6q e

3 ` px ´ 2qpx ´ 3qp6 ´ 2qp6 ´ 3q e

6.

Hence,

fp5q « P p5q “ p5 ´ 3qp5 ´ 6qp2 ´ 3qp2 ´ 6qe

2 ` p5 ´ 2qp5 ´ 6qp3 ´ 2qp3 ´ 6qe

3 ` p5 ´ 2qp5 ´ 3qp6 ´ 2qp6 ´ 3qe

6 « 218.105.

The next result describes a method for recursively generating Lagrange polynomial approxima-tions.

Theorem 3.2.3. Let f be defined at x0, x1, ¨ ¨ ¨ , xn and let xj and xi be two distinct numbersin this set. Then

P pxq “ px ´ xjqP0,1,¨¨¨j´1,j`1,¨¨¨ ,kpxq ´ px ´ xiqP0,1,¨¨¨ ,i´1,i`1,¨¨¨kpxqxi ´ xj

is the k-th Lagrange polynomial that interpolates at the k ` 1 points x0, x1, ¨ ¨ ¨ , xk.

Proof. For ease of notation, let Q ” P0,1,¨¨¨ ,i´1,i`1,¨¨¨k and Q ” P0,1,¨¨¨j´1,j`1,¨¨¨ ,k. Since Qpxqand Qpxq are polynomials of degree k ´ 1 or less, P pxq is of degree at most k. First note thatQpxiq “ fpxiq, implies that

P pxiq “ pxi ´ xjqQpxiq ´ pxi ´ xiqQpxiqxi ´ xj

“ pxi ´ xjqpxi ´ xjq

fpxiq “ fpxiq.

Similarly, since Qpxjq “ fpxjq, we have P pxjq “ fpxjq. In addition, if 0 § r § k and r is neitheri nor j, then Qpxrq “ Qpxrq “ fpxrq. Hence, we have

P pxrq “ pxr ´ xjqQpxrq ´ pxr ´ xiqQpxrqxi ´ xj

“ pxi ´ xjqpxi ´ xjq

fpxrq “ fpxrq.

But, by definition, P0,1,¨¨¨ ,kpxq is the unique polynomial of degree at most k that agrees with fat x0, x1, ¨ ¨ ¨ , xk. Thus, P ” P0,1,¨¨¨ ,k.

The theorem above implies that the interpolating polynomials can be generated recursively. Forexample, we have

P0,1 “ 1

x1 ´ x0rpx ´ x0qP1 ´ px ´ x1qP0s, P1,2 “ 1

x2 ´ x1rpx ´ x1qP2 ´ px ´ x2qP1s,

P0,1,2 “ 1

x2 ´ x0rpx ´ x0qP1,2 ´ px ´ x2qP0,1s,

and so on. They are generated in the manner shown in the following table, which each row iscompleted before the succeeding rows are begun.

The procedure that uses the result of the theorem above to recursively generate interpolatingpolynomial approximations is called Neville’s method. To avoid the multiple subscripts, welet Qi,jpxq for 0 § j § i, denote the interpolating polynomial of degree j on the j ` 1 numbersxi´j , xi´j`1, ¨ ¨ ¨ , xi´1, xi; that is,

Qi,j “ Pi´j,i´j`1,¨¨¨ ,i´1,i.

Using this notation provides the Q notation array in Table 3.2.

Page 7: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.2. DATA APPROXIMATION AND NEVILLE’S METHOD 41

x0 P0

x1 P1 P0,1

x2 P2 P1,2 P0,1,2

x3 P3 P2,3 P1,2,3 P0,1,2,3

x4 P4 P3,4 P2,3,4 P1,2,3,4 P0,1,2,3,4

Table 3.1: Recursive generation of Lagrange polynomials.

x0 P0 “ Q0,0

x1 P1 “ Q1,0 P0,1 “ Q1,1

x2 P2 “ Q2,0 P1,2 “ Q2,1 P0,1,2 “ Q2,2

x3 P3 “ Q3,0 P2,3 “ Q3,1 P1,2,3 “ Q3,2 P0,1,2,3 “ Q3,3

x4 P4 “ Q4,0 P3,4 “ Q4,1 P2,3,4 “ Q4,2 P1,2,3,4 “ Q4,3 P0,1,2,3,4 “ Q4,4

Table 3.2: Recursive generation of Lagrange polynomials using Q notation.

Example 3.2.4. Apply Neville’s method to the following data by constructing a recursive tableof the form shown in Table 3.2. Use this table to approximate fp1.5q.

x 1.0 1.3 1.6 1.9 2.2fpxq 0.7651977 0.6200860 0.4554022 0.2818186 0.1103623

Solution. Let x0 “ 1.0, x1 “ 1.3, x2 “ 1.6, x3 “ 1.9, and x4 “ 2.2, then Q0,0 “ fp1.0q,Q1,0 “ fp1.3q, Q2,0 “ fp1.6q, Q3,0 “ fp1.9q, and Q4,0 “ fp2.2q. These are the five polynomialsof degree zero (constants).

Calculating the first-degree approximation Q1,1p1.5q gives

Q1,1p1.5q “ p1.5 ´ 1.0qQ1,0 ´ p1.5 ´ 1.3qQ0,0

1.3 ´ 1.0“ 0.5233449,

Q2,1p1.5q “ p1.5 ´ 1.3qQ2,0 ´ p1.5 ´ 1.6qQ1,0

1.6 ´ 1.3“ 0.5102968,

Q3,1p1.5q “ p1.5 ´ 1.6qQ3,0 ´ p1.5 ´ 1.9qQ2,0

1.9 ´ 1.6“ 0.5132634,

Q4,1p1.5q “ p1.5 ´ 1.9qQ4,0 ´ p1.5 ´ 2.2qQ3,0

2.2 ´ 1.9“ 0.5104270.

The higher-degree approximations are generated in a similar manner and are shown in thefollowing table.

1.0 0.76519771.3 0.6200860 0.52334491.6 0.4554022 0.5102968 0.51247151.9 0.2818186 0.5132634 0.5112857 0.51181272.2 0.1103623 0.5104270 0.5137361 0.5118302 0.5118200

If the latest approximation Q4,4, was not su�ciently accurate, another node x5, could be added,and another row added to the table:

x5 Q5,0 Q5,1 Q5,2 Q5,3 Q5,4 Q5,5.

Then, Q4,4, Q5,4, and Q5,5 could be compared to determine further accuracy.

Page 8: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

42 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

3.3 Divided Di↵erences

Iterated interpolation was used in the previous section to generate successively higher-degreepolynomial approximation at a specific point. Divided-di↵erence method introduced in thissection are used to successively generate the polynomials themselves.

Suppose that Pnpxq is the n-th Lagrange polynomial that agrees with the function f at the dis-tinct numbers x0, x1, ¨ ¨ ¨ , xn. Although this polynomial is unique, there are alternate algebraicrepresentation that are useful in certain situations. The divided di↵erences of f with respect tox0, x1, ¨ ¨ ¨ , xn are used to express Pnpxq in the form

Pnpxq “ a0 ` a1px ´ x0q ` a2px ´ x0qpx ´ x1q ` ¨ ¨ ¨ ` anpx ´ x0q ¨ ¨ ¨ px ´ xn´1q, (3.4)

for appropriate constants a0, a1, ¨ ¨ ¨ , an. To determine the first of these constants, a0, note thatif Pnpxq is written in the form of (3.4), then evaluating Pnpx0q leaves only the constant term a0;that is

a0 “ Pnpx0q “ fpx0q.Similarly, when Pnpxq is evaluated at x1, the only nonzero terms in the evaluation of Pnpx1q arethe constant and linear terms,

fpx0q ` a1px1 ´ x0q “ Pnpx1q “ fpx1q ùñ a1 “ fpx1q ´ fpx0qx1 ´ x0

.

We now introduce the divided-di↵erence notation. The zeroth divided di↵erence of thefunction f with respect to xi, denoted f rxis, is simply the value of f at xi:

f rxis “ fpxiq. (3.5)

The remaining divided di↵erences are defined recursively; the first divided di↵erence of fwith respect to xi and xi`1 is denoted f rxi, xi`1s and defined as

f rxi, xi`1s :“ f rxi`1s ´ f rxisxi`1 ´ xi

. (3.6)

The second divided di↵erence, f rxi, xi`1, xi`2s is defined as

f rxi, xi`1, xi`2s :“ f rxi`1, xi`2s ´ f rxi, xi`1sxi`2 ´ xi

. (3.7)

Similarly, after the pk ´ 1q-st divided di↵erences,

f rxi, xi`1, xi`2, ¨ ¨ ¨ , xi`k´1s and f rxi`1, xi`2, ¨ ¨ ¨ , xi`k´1, xi`ks,

have been determined, the k-th divided di↵erence relative to xi, xi`1, ¨ ¨ ¨ , xi`k is defined as

f rxi, ¨ ¨ ¨ , xi`ks :“ f rxi`1, xi`2, ¨ ¨ ¨ , xi`k´1, xi`ks ´ f rxi, xi`1, xi`2, ¨ ¨ ¨ , xi`k´1sxi`k ´ xi

. (3.8)

The process ends with the single n-th divided di↵erence

f rx0, x1, ¨ ¨ ¨ , xns “ f rx1, x2, ¨ ¨ ¨ , xns ´ f rx0, x1, ¨ ¨ ¨ , xn´1sxn ´ x0

.

Now we can write a1 “ f rx0, x1s, just as a0 can be expressed as a0 “ f rx0s. Hence, theinterpolating polynomial in (3.4) can be written as

Pnpxq “ f rx0s ` f rx0, x1spx ´ x1q ` a2px ´ x0qpx ´ x1q ` ¨ ¨ ¨ ` anpx ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xn´1q,

Page 9: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.3. DIVIDED DIFFERENCES 43

x fpxq First divided di↵erences Second divided di↵erencesx0 f rx0s

f rx0, x1s “ f rx1s ´ f rx0sx1 ´ x0

x1 f rx1s f rx0, x1, x2s “ f rx1, x2s ´ f rx0, x1sx2 ´ x0

f rx1, x2s “ f rx2s ´ f rx1sx2 ´ x1

x2 f rx2s f rx1, x2, x3s “ f rx2, x3s ´ f rx1, x2sx3 ´ x1

f rx2, x3s “ f rx3s ´ f rx2sx3 ´ x2

x3 f rx3s f rx2, x3, x4s “ f rx3, x4s ´ f rx2, x3sx4 ´ x2

f rx3, x4s “ f rx4s ´ f rx3sx4 ´ x3

x4 f rx4s f rx3, x4, x5s “ f rx4, x5s ´ f rx3, x4sx5 ´ x3

f rx4, x5s “ f rx5s ´ f rx4sx5 ´ x4

x5 f rx5s

Table 3.3: The divided di↵erence table.

where ak “ f rx0, x1, ¨ ¨ ¨ , xks, for each k “ 0, ¨ ¨ ¨ , n. Hence, Pnpxq can be rewritten in a formcalled Newton’s Divided-Di↵erence:

Pnpxq “ f rx0s `nÿ

k“1

f rx0, x1, ¨ ¨ ¨ , xkspx ´ x0q ¨ ¨ ¨ px ´ xk´1q. (3.9)

The value of f rx0, ¨ ¨ ¨ , xks is independent of the order of the number x0, ¨ ¨ ¨ , xk.The generation of the divided di↵erences is outlined in the following table. Two fourth and onefifth di↵erence can also be determined from these data.

Example 3.3.1. Complete the divided di↵erence table for the following data, and constructthe interpolating polynomial that uses all this data.

x 1.0 1.3 1.6 1.9 2.2fpxq 0.7651977 0.6200860 0.4554022 0.2818186 0.1103623

Solution. The first divided di↵erence involving x0 and x1 is

f rx0, x1s “ fpx1q ´ fpx0qx1 ´ x0

“ 0.6200860 ´ 0.7651977

1.3 ´ 1.0“ ´0.4837057.

The remaining first divided di↵erences are found in a similar manner and are shown in the fourthcolumn in the following table.

Page 10: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

44 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

i xi f rxis f rxi´1, xis f rxi´2, xi´1, xis f rxi´3, ¨ ¨ ¨ , xis f rxi´4, ¨ ¨ ¨ , xis0 1.0 0.7651977

´0.48370571 1.3 0.6200860 ´0.1087339

´0.5489460 0.06587842 1.6 0.4554022 ´0.0494433 0.0018251

´0.5786120 0.06806853 1.9 0.2818186 0.0118183

´0.57152104 2.2 0.1103623

The Mean Value Theorem 1.1.14 applied to (3.6) when i “ 0,

f rx0, x1s “ fpx1q ´ fpx0qx1 ´ x0

,

implies that when f 1 exists, f rx0, x1s “ f 1p⇠q for some number ⇠ between x0 and x1. Thefollowing theorem generalizes this result.

Theorem 3.3.2. Suppose that f P Cnra, bs and x0, x1, ¨ ¨ ¨ , xn are distinct numbers in ra, bs.Then, a number ⇠ exists in pa, bq with

f rx0, x1, ¨ ¨ ¨ , xns “ f pnqp⇠qn!

.

Proof. Let gpxq :“ fpxq ´ Pnpxq. Since fpxiq “ Pnpxiq for each i “ 0, 1, ¨ ¨ ¨ , n, the functiong has n ` 1 distinct zeros in ra, bs. Generalized Rolle’s Theorem 1.1.16 implies that a number⇠ P pa, bq exists with gpnqp⇠q “ 0, so

0 “ f pnqp⇠q ´ P pnqn p⇠q.

Since Pn is a polynomial of degree n whose leading coe�cient is f rx0, x1, ¨ ¨ ¨ , xns, then

P pnqpxq “ n!f rx0, x1, ¨ ¨ ¨ , xns,

for all values of x P ra, bs. As a consequence, we have

f rx0, x1, ¨ ¨ ¨ , xns “ f pnqp⇠qn!

.

Newton’s divided-di↵erence formula can be expressed in a simplified form when the nodes arearranged consecutively with equal spacing. In this case, we introduce the notation h :“ xi`1´xifor each i “ 0, 1, ¨ ¨ ¨ , n ´ 1 and let x “ x0 ` sh. Then, the di↵erence x ´ xi “ ps ´ iqh. Hence,(3.9) becomes

Pnpxq “ Pnpx0 ` shq “ f rx0s ` shf rx0, x1s ` sps ´ 1qh2f rx0, x1, x2s` ¨ ¨ ¨ ` sps ´ 1q ¨ ¨ ¨ ps ´ n ` 1qhnf rx0, x1, ¨ ¨ ¨ , xns

“ f rx0s `nÿ

k“1

sps ´ 1q ¨ ¨ ¨ ps ´ k ` 1qhkf rx0, x1, ¨ ¨ ¨ , xks.

Page 11: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.4. HERMITE INTERPOLATION 45

Using binomial-coe�cient notation,ˆ

sk

˙“ sps ´ 1q ¨ ¨ ¨ ps ´ k ` 1q

k!,

we can express Pnpxq compactly as

Pnpxq “ Pnpx0 ` shq “ f rx0s `nÿ

k“1

ˆsk

˙k!hkf rx0, x1, ¨ ¨ ¨ , xks.

Remark: One can use the notation of forward di↵erence (or backward di↵erence) torewrite the Newton’s divided-di↵erence formula above. This is just a book keeping and leave asan exercise.

3.4 Hermite Interpolation

In this section, we introduce the concept of Hermite polynomial. For a given function f , theHermite polynomial Hpxq agree with f at x0, x1, ¨ ¨ ¨ , xn. Moreover, it requires that the firstderivatives of the Hermite polynomial Hpxq agree with those of f .

More precisely, the Hermite polynomial Hpxq corresponding to the function f at the given pointsx0, x1, ¨ ¨ ¨ , xn satisfies the following conditions:

Hpxiq “ fpxiq and H 1pxiq “ f 1pxiq for i “ 0, 1, ¨ ¨ ¨ , n.

In total, there are 2n ` 2 constraints for the Hermite polynomial Hpxq and therefore it is apolynomial with degree at most 2n ` 1. In order to find out the basis functions for the Hermitepolynomial, we make use of the Lagrange basis functions introduced in Section 3.1.

To simplify the notation, we define �jk satisfying the following conditions:

�jk “"

1 if j “ k0 if j ‰ k.

Suppose that we have developed two sets of basis functions with degree 2n ` 1, denoted tHpnqk u

and tHpnqk u, for Hermite polynomial such that the following conditions are satisfied: for j “

0, 1, ¨ ¨ ¨ , n,

Hpnqk pxjq “ �jk,

´Hpnq

k

¯1pxjq “ 0,

Hpnqk pxjq “ 0,

´Hpnq

k

¯1pxjq “ �jk.

(3.10)

Then, the desired Hermite polynomial Hpxq (with degree at most 2n` 1) can be written as thelinear combination of those basis functions:

Hpxq “nÿ

j“0

fpxjqHpnqk pxq ` f 1pxjqHpnq

k pxq.

It remains to find out the formula for Hpnqk and Hpnq

k . Recall that the Lagrange basis functionswith degree n are defined as follows: for k “ 0, 1, ¨ ¨ ¨ , n

Lpnqk pxq “ px ´ x0qpx ´ x1q ¨ ¨ ¨ px ´ xk´1qpx ´ xk`1q ¨ ¨ ¨ px ´ xnq

pxk ´ x0qpxk ´ x1q ¨ ¨ ¨ pxk ´ xk´1qpxk ´ xk`1q ¨ ¨ ¨ pxk ´ xnq “nπ

i“0, i‰k

x ´ xixk ´ xi

.

Page 12: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

46 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

We make use of the Lagrange basis functions to derive the formula for Hpnqk and Hpnq

k . Since for

each k “ 0, 1, ¨ ¨ ¨ , n the polynomial Hpnqk is of degree 2n` 1, one may assume that Hpnq

k has thefollowing form

Hpnqk pxq “ pax ` bq

´Lpnqk pxq

¯2.

Using the conditions in the first line of (3.10) for Hpnqk , we have

axk ` b “ 1 and a ` 2paxk ` bq´Lpnqk

¯1pxkq “ 0.

It implies that

a “ ´2´Lpnqk

¯1pxkq and b “ 1 ` 2xk

´Lpnqk

¯1pxkq.

Hence, we have

Hpnqk pxq “

ˆ1 ´ 2px ´ xkq

´Lpnqk

¯1pxkq

˙ ´Lpnqk pxq

¯2for k “ 0, 1, ¨ ¨ ¨ , n.

Similarly, we assume that

Hpnqk pxq “ pcx ` dq

´Lpnqk pxq

¯2.

Using the conditions in the second line of (3.10) for Hpnqk , we have

cxk ` d “ 0 and c ` 2pcxk ` dq´Lpnqk

¯1pxkq “ 1.

It implies that

c “ 1 and d “ ´xk.

Hence, we have

Hpnqk pxq “ px ´ xkq

´Lpnqk pxq

¯2.

We summarize the results above as a theorem.

Theorem 3.4.1. If f P C1ra, bs and x0, ¨ ¨ ¨ , xn P ra, bs are distinct, the unique polynomial ofleast degree agreeing with f and f 1 at x0, ¨ ¨ ¨ , xn is the Hermite polynomial of degree at most2n ` 1, given by

H2n`1pxq “nÿ

j“0

fpxjqHn,jpxq ` f 1pxjqHn,jpxq,

where, for Ln,jpxq denoting j-th Lagrange coe�cient polynomial of degree n, we have

Hn,jpxq “ r1 ´ 2px ´ xjqL1n,jpxjqsL2

n,jpxq and Hn,jpxq “ px ´ xjqL2n,jpxq.

Moreover, if f P C2n`2ra, bs, then

fpxq “ H2n`1pxq ` px ´ x0q2 ¨ ¨ ¨ px ´ xnq2p2n ` 2q! f p2n`2q p⇠pxqq ,

for some (generally unknown) ⇠pxq in the interval pa, bq.

Page 13: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.4. HERMITE INTERPOLATION 47

When n “ 1, there are two points x0 and x1 given and we may explicitly write down the completeformulas for basis functions for Hermite polynomial:

Hp1q0 pxq “

ˆ1 ´ 2

x ´ x0x0 ´ x1

˙ ˆx ´ x1x0 ´ x1

˙2

,

Hp1q1 pxq “

ˆ1 ´ 2

x ´ x1x1 ´ x0

˙ ˆx ´ x0x1 ´ x0

˙2

,

Hp1q0 pxq “ px ´ x0q

ˆx ´ x1x0 ´ x1

˙2

,

Hp1q1 pxq “ px ´ x1q

ˆx ´ x0x1 ´ x0

˙2

.

Example 3.4.2. Let fpxq “ lnx. Given

fp1.0q “ 0.0, fp2.0q “ 0.693147, f 1p1.0q “ 1.0, and f 1p2.0q “ 0.5,

find the Hermite polynomial Hpxq corresponding to the function f about x0 “ 1.0 and x1 “ 2.0.Use Hp1.5q as an approximation of fp1.5q and compute the absolute error.

Solution. Using the formula above, we have

Hpxq “ 0.693147p5 ´ 2xqpx ´ 1q2 ` px ´ 1qpx ´ 2q2 ` 1

2px ´ 2qpx ´ 1q2

and we have Hp1.5q “ 0.409074. One may also obtain fp1.5q “ 0.405465 and

|fp1.5q ´ Hp1.5q| « 0.0036089.

See the figure below for an illustration. They look like almost the same.

1 1.2 1.4 1.6 1.8 2

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Remark: More generally, the so-called osculating polynomial is generalizing both the Tay-lor polynomial and Lagrange polynomial. Suppose that we are given n ` 1 distinct numbersx0, x1, ¨ ¨ ¨ , xn in ra, bs and nonnegative integersm0,m1, ¨ ¨ ¨ ,mn, andm “ maxtm0,m1, ¨ ¨ ¨ ,mnu.The osculating polynomial approximating a function f P Cmra, bs at xi, for each i “ 0, ¨ ¨ ¨ , n, isthe polynomial of least degree that has the same values as the function f and all its derivativesof order less than or equal to mi at each xi. The degree of this osculating polynomial is at most

M “ n `nÿ

i“0

mi

Page 14: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

48 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

because the number of condition to be satisfied is n ` 1 ` ∞ni“0mi, and a polynomial of degree

M has M ` 1 coe�cients that can be used to satisfy these conditions.

Definition 3.4.3 (Osculating Polynomial). Let x0, x1, ¨ ¨ ¨ , xn be n ` 1 distinct numbers inra, bs and for i “ 0, 1, ¨ ¨ ¨ , n let mi be a nonnegative integer. Suppose that f P Cmra, bs, wherem “ max

0§i§nmi. The osculating polynomial approximating f is the polynomial P of least

degree such that

dkP pxiqdxk

“ dkfpxiqdxk

for each i “ 0, 1, ¨ ¨ ¨ , n and k “ 0, 1, ¨ ¨ ¨ ,mi.

Note that when n “ 0, the osculating polynomial approximating f is the m0-th Taylor Poly-nomial for f at x0. When mi “ 0 for each i, the osculating polynomial is the n-th Lagrangepolynomial interpolating f on x0, x1, ¨ ¨ ¨ , xn.

The case when mi “ 1, for each i “ 0, 1, ¨ ¨ ¨ , n, gives the Hermite polynomials. For agiven function f , these polynomials agree with f at x0, x1, ¨ ¨ ¨ , xn. In addition, since their firstderivatives agree with those of f , they have the same shape as the function at pxi, fpxiqq in thesense that the tangent lines to be the polynomial and the function agree.

Although Theorem 3.4.1 provides a complete description of the Hermite polynomials, it is clearfrom the above example that the need to determine and evaluate the Lagrange polynomials andtheir derivatives makes the procedure tedious even for small values of n.

There is an alternative method for generating Hermite approximations that has as its basis theNewton interpolatory divided-di↵erence formula (3.9) at x0, x1, ¨ ¨ ¨ , xn, that is

Pnpxq “ f rx0s `nÿ

k“1

f rx0, x1, ¨ ¨ ¨ , xkspx ´ x0q ¨ ¨ ¨ px ´ xk´1q.

The alternative method uses the connection between the n-th divided di↵erence and the n-thderivative of f . Suppose that the distinct numbers x0, x1, ¨ ¨ ¨ , xn are given together with thevalues of f and f 1 at these numbers. Define a new sequence z0, z1, ¨ ¨ ¨ , z2n`1 by

z2i “ z2i`1 “ xi, for each i “ 0, 1, ¨ ¨ ¨ , n

and construct the divided di↵erence table in the form of Table 3.3 that uses z0, z1, ¨ ¨ ¨ , z2n`1.Since z2i “ z2i`1 “ xi for each i, we cannot define f rz2i, z2i`1s by the divided di↵erence for-mula. However, if we assume that the reasonable substitution in this situation is f rz2i, z2i`1s “f 1pz2iq “ f 1pxiq, we can use the entries f 1px0q, f 1px1q, ¨ ¨ ¨ , f 1pxnq in place of the undefined firstdivided di↵erences

f rz0, z1s, f rz2, z3s, ¨ ¨ ¨ , f rz2n, z2n`1s.The remaining divided di↵erences are produced as usual, and the appropriate divided di↵erenceare employed in Newton’s interpolatory divided-di↵erence formula. Table 3.4 shows the entriesthat are used for the first three divided-di↵erence columns when determining the Hermite poly-nomial H5pxq for x0, x1, and x2. The remaining entries are generated in the same manner. TheHermite polynomial is then given by

H2n`1pxq “ f rz0s `2n`1ÿ

k“1

f rz0, ¨ ¨ ¨ , zkspx ´ z0qpx ´ z1q ¨ ¨ ¨ px ´ zk´1q.

Page 15: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.5. PIECEWISE POLYNOMIALS APPROXIMATION 49

x fpxq First divided di↵erences Second divided di↵erencesz0 “ x0 f rz0s “ fpx0q

f rz0, z1s “ f 1px0qz1 “ x0 f rz1s “ fpx0q f rz0, z1, z2s “ f rz1, z2s ´ f rz0, z1s

z2 ´ z0

f rz1, z2s “ f rz2s ´ f rz1sz2 ´ z1

z2 “ x1 f rz2s “ fpx1q f rz1, z2, z3s “ f rz2, z3s ´ f rz1, z2sz3 ´ z1

f rz2, z3s “ f 1px1qz3 “ x1 f rz3s “ fpx1q f rz2, z3, z4s “ f rz3, z4s ´ f rz2, z3s

z4 ´ z2

f rz3, z4s “ f rz4s ´ f rz3sz4 ´ z3

z4 “ x2 f rz4s “ fpx2q f rz3, z4, z5s “ f rz4, z5s ´ f rz3, z4sz5 ´ z3

f rz4, z5s “ f 1px2qz5 “ x2 f rz5s “ fpx2q

Table 3.4: The modified divided di↵erence table for polynomial of Hermite type.

3.5 Piecewise Polynomials Approximation

The previous sections concerned the approximation of arbitrary functions on closed intervalsusing a single polynomial. However, high-degree polynomials can oscillate erratically, that is,a minor fluctuation over a small portion of the interval can induce large fluctuations over theentire range.

Example 3.5.1 (Runge’s Phenomenon). Let fpxq “ 1

1 ` x2and x P r´5, 5s. We partition

the interval using the nodes xk “ ´5 ` kh with k “ 0, 1, ¨ ¨ ¨ , 10. Find the 10-th LagrangeInterpolation Polynomial of fpxq.

Solution. The 10-th Lagrange polynomial P can be written as follows:

P pxq “10ÿ

k“0

fpxkqLkpxq.

The shapes of the function f and P can be found in the following figure. One can see from thegraph that when x is between ´3 and 3, the di↵erence |fpxq ´ P pxq| is quite small. However,when |x| ° 3, the di↵erence is large, especially when x is near the endpoints, the di↵erencebecomes dramatically large. In general, one may not use a higher-order Lagrange interpolatingpolynomial to approximate a function.

An alternative approach is to divide the approximation interval into a collection of subintervalsand construct a (generally) di↵erent approximating polynomial on each subinterval. This iscalled piecewise-polynomial approximation. The simplest piecewise-polynomial approxi-mation is piecewise-linear interpolation, which consists of joining a set of data points

tpx0, fpx0qq, px1, fpx1qq, ¨ ¨ ¨ , pxn, fpxnqqu

by a series of straight lines. See Figure 3.3 for illustration.

Page 16: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

50 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION

-6 -4 -2 0 2 4 6

-0.5

0

0.5

1

1.5

2

2.5

Figure 3.2: Using Lagrange polynomial P pxq to approximate the function fpxq “ 1

1 ` x2.

-6 -4 -2 0 2 4 6

0

0.5

1

1.5

Figure 3.3: Using piecewise linear function Qpxq to approximate the function fpxq “ 1

1 ` x2.

To be more specific, in each subinterval rxi, xi`1s for i “ 0, 1, ¨ ¨ ¨ , n ´ 1, we use a first-orderLagrange Interpolation polynomial to approximate the function fpxq. The Lagrange basis func-tions in this subinterval rxi, xi`1s are given by the following formulas

Lp1qi pxq “ x ´ xi`1

xi ´ xi`1and Lp1q

i`1pxq “ x ´ xixi`1 ´ xi

.

Then, the corresponding (first-order) Lagrange Interpolation polynomial Pi is

Pipxq “ fpxiqLp1qi pxq ` fpxi`1qLp1q

i`1pxq for x P rxi, xi`1s.

Eventually, the piecewise linear function Qpxq is defined to be

Qpxq “ Pipxq, for x P rxi, xi`1s, i “ 0, 1, ¨ ¨ ¨ , n ´ 1.

If f is at least twice di↵erentiable, then the remainder can be written as follows: for x P rxi, xi`1s,

Ripxq “ fpxq ´ Pipxq “ 1

2f2p⇠pxqqpx ´ xiqpx ´ xi`1q

Page 17: Interpolation and Polynomial Approximation › ~smpun › MATH417 › Chapter-3.pdf · Interpolation and Polynomial Approximation 3.1 Interpolation and the Lagrange Polynomial One

3.5. PIECEWISE POLYNOMIALS APPROXIMATION 51

and we have the following error estimate

|Ripxq| § 1

8pxi`1 ´ xiq2 max

xPrxi,xi`1s

��f2pxq�� , for all x P rxi, xi`1s.

If the points x0, x1, ¨ ¨ ¨ , xn (assuming x0 § x1 § ¨ ¨ ¨ § xn) are equally distributed and leth “ xn´x0

n , then we have

|fpxq ´ Qpxq| § h2

8max

xPrx0,xns

��f2pxq�� , for all x P rx0, xns.

A disadvantage of linear function approximation is that there is likely no di↵erentiability atthe endpoints of the subintervals, which, in a geometrical context, means that the interpolatingfunction is not smooth. Often it is clear from physical condition that smoothness is required,so the approximating function must be continuously di↵erentiable.

An alternative is to use a piecewise polynomial of Hermite type. For example, if the values of fand of f 1 are known at each of the points x0 † x1 † ¨ ¨ ¨ † xn, a cubic Hermite polynomial canbe used on each of the subintervals rx0, x1s, rx1, x2s, ¨ ¨ ¨ , rxn´1, xns to obtain a function that hasa continuous derivative on the interval rx0, xns.To determine the appropriate Hermite cubic polynomial on a given interval is simply a matter ofcomputing H3pxq for that interval. The Lagrange interpolating polynomials needed to determineH3 are of first degree, so this can be accomplished without great di�culty. However, to useHermite piecewise polynomials for general interpolation, we need to know the derivative of thefunction being approximated, and this is frequently unavailable.