Professional Documents
Culture Documents
Chapter 3
Chapter 3
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
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 precisely
in 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
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.
The problem of determining a polynomial of degree one that passes through the distinct points
px0 , y0 q and px1 , y1 q is the same as approximating a function for which f px0 q “ y0 and f px1 q “ y1
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
x ´ x1 x ´ x0
L0 pxq “ , and L1 pxq “ .
x0 ´ x1 x1 ´ x0
The linear Lagrange interpolating polynomial through px0 , y0 q and px1 , y1 q is
35
36 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION
Note that L0 px0 q “ 1, L0 px1 q “ 0, L1 px0 q “ 0, and L1 px1 q “ 1, which implies that
So P is the unique polynomial of degree at most one that passes through px0 , y0 q and px1 , y1 q.
Example 3.1.2. We determine the linear Lagrange interpolating polynomial that passes through
the points p2, 4q and p5, 1q. In this case, we have
x´5 1 x´2 1
L0 pxq “ “ ´ px ´ 5q and L1 pxq “ “ px ´ 2q.
2´5 3 5´2 3
Hence, we have
1 1 4 20 1 2
P pxq “ ´ px ´ 5q ¨ 4 ` px ´ 2q ¨ 1 “ ´ x ` ` x ´ “ ´x ` 6.
3 3 3 3 3 3
To satisfy the first type of condition, it requires that the numerator of Ln,k pxq contains the term
To satisfy Ln,k pxk q “ 1, the denominator of Ln,k pxq must be the same term but evaluated at
x “ xk . Thus,
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.
where
πn
pnq px ´ x0 qpx ´ x1 q ¨ ¨ ¨ px ´ xk´1 qpx ´ xk`1 q ¨ ¨ ¨ px ´ xn q x ´ xi
Lk pxq “ “ .
pxk ´ x0 qpxk ´ x1 q ¨ ¨ ¨ pxk ´ xk´1 qpxk ´ xk`1 q ¨ ¨ ¨ pxk ´ xn q i“0, i‰k xk ´ xi
Example 3.1.4. (a) Use the numbers (called nodes) x0 “ 2, x1 “ 2.75, and x2 “ 4 to find
the second Lagrange interpolating polynomial for f pxq “ 1{x.
3.1. INTERPOLATION AND THE LAGRANGE POLYNOMIAL 37
Solution. We first determine the coefficient polynomials L0 , L1 , and L2 . In nested form they
are
px ´ 2.75qpx ´ 4q 2
L0 pxq “ “ px ´ 2.75qpx ´ 4q,
p2 ´ 2.75qp2 ´ 4q 3
px ´ 2qpx ´ 4q 16
L1 pxq “ “ ´ px ´ 2qpx ´ 4q,
p2.5 ´ 2qp2.75 ´ 4q 15
and
px ´ 2qpx ´ 2.75q 2
L2 pxq “ “ px ´ 2qpx ´ 2.75q.
p4 ´ 2qp4 ´ 2.75q 5
Also, f px0 q “ 1{2, f px1 q “ 4{11, f px2 q “ 1{4, so
2
ÿ 1 2 35 49
P pxq “ f pxk qLk pxq “ x ´ x` .
k“0
22 88 44
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.2
2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4
1 2 35 49
Figure 3.1: The function f pxq “ 1{x and its 2-nd Lagrange polynomial P pxq “ 22 x ´ 88 x ` 44
The next step is to calculate a remainder term or bound for the error involved in approximating
a function by an interpolating polynomial.
Theorem 3.1.5. Suppose x0 , x1 , ¨ ¨ ¨ , xn are n ` 1 distinct numbers in the interval ra, bs and
f P C n`1 ra, bs. Then, for each x P ra, bs, a number ⇠pxq (generally unknown) between x0 , ¨ ¨ ¨ , xn
and hence in pa, bq exists with
f pn`1q p⇠pxqq
f pxq “ P pxq ` px ´ x0 qpx ´ x1 q ¨ ¨ ¨ px ´ xn q, (3.2)
pn ` 1q!
f pxk q “ P pxk q.
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
πn
t ´ xi
gptq “ f ptq ´ P ptq ´ rf pxq ´ P pxqs .
i“0
x ´ xi
Since f P C n`1 ra, bs, and P P C 8 ra, bs, it follows that g P C n`1 ra, bs. For t “ xk , we have
n
π xk ´ xi
gpxk q “ f pxk q ´ P pxk q ´ rf pxq ´ P pxqs “ 0 ´ rf pxq ´ P pxqs ¨ 0 “ 0.
i“0
x ´ xi
Thus, g P C n`1 ra, bs and g is zero at the n`2 distinct numbers x, x0 , x1 , ¨ ¨ ¨ , xn . By Generalized
Rolle’s Theorem 1.1.16, there exists a number ⇠ P pa, bq such that g pn`1q p⇠q “ 0. Hence, we have
« ff
π n
d n`1 t ´ x
0 “ g pn`1q p⇠q “ f pn`1q p⇠q ´ P pn`1q p⇠q ´ rf pxq ´ P pxqs n`1
i
. (3.3)
dt i“0
x ´ x i
t“⇠
The error formula is an important theoretical result because Lagrange polynomials are used
extensively for deriving numerical di↵erentiation and integration methods. Error bounds for
these techniques are obtained from the Lagrange error formula. Note that the error form for
the Lagrange polynomial is quite similar to that for the Taylor polynomial. The n-th Taylor
polynomial about x0 concentrates all the known information at x0 and has an error term of the
form
f pn`1q p⇠pxqq
px ´ x0 qn`1 .
pn ` 1q!
The Lagrange polynomial of degree n uses information at the distinct numbers x0 , x1 , ¨ ¨ ¨ , xn
and, in place of px ´ x0 qn`1 , its error formula uses a product of the n ` 1 terms:
f pn`1q p⇠pxqq
px ´ x0 qpx ´ x1 q ¨ ¨ ¨ px ´ xn q.
pn ` 1q!
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 f pxq “ 1{x
on r2, 4s using the nodes x0 “ 2, x1 “ 2.75, and x2 “ 4. Determine the error form for this
polynomial, and the maximum error when the polynomial is used to approximate f pxq for
x P r2, 4s.
1 2 6
f 1 pxq “ ´ , f 2 pxq “ , and f 3 pxq “ ´ .
x2 x3 x4
As a consequence, the second Lagrange polynomial has the error form
The maximum value of p⇠pxqq´4 on the interval is 2´4 “ 1{16. We now need to determine the
maximum value on this interval of the absolute value of the polynomial
35 2 49
gpxq :“ px ´ 2qpx ´ 2.75qpx ´ 4q “ x3 ´ x ` x ´ 22.
4 2
Because
35 49 1
g 1 pxq “ 3x2 ´ x` “ p3x ´ 7qp2x ´ 7q,
2 2 2
the critical points occur at
ˆ ˙ ˆ ˙
7 7 25 7 7 9
x“ with g “ , and x“ with g “´ .
3 3 108 2 2 16
f 3 p⇠pxqq 1 9 3
|px ´ x0 qpx ´ x1 qpx ´ x2 q| § ´ “ « 0.00586.
3! 16 ¨ 6 16 512
A practical difficulty with Lagrange interpolation is that the error term is difficult to apply, so
the 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 various
polynomials until appropriate agreement is obtained. However, the work done in calculating the
approximation by the second polynomial does not lessen the work needed to calculate the third
approximation; nor is the fourth approximation easier to obtain once the third approximation
is known, and so on. We now derive these approximating polynomials in a recursive manner.
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 numbers
in this set. Then
px ´ xj qP0,1,¨¨¨j´1,j`1,¨¨¨ ,k pxq ´ px ´ xi qP0,1,¨¨¨ ,i´1,i`1,¨¨¨k pxq
P pxq “
xi ´ 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 Qpxq
and Q̂pxq are polynomials of degree k ´ 1 or less, P pxq is of degree at most k. First note that
Q̂pxi q “ f pxi q, implies that
The theorem above implies that the interpolating polynomials can be generated recursively. For
example, we have
1 1
P0,1 “ rpx ´ x0 qP1 ´ px ´ x1 qP0 s, P1,2 “ rpx ´ x1 qP2 ´ px ´ x2 qP1 s,
x1 ´ x0 x2 ´ x1
1
P0,1,2 “ rpx ´ x0 qP1,2 ´ px ´ x2 qP0,1 s,
x2 ´ x0
and so on. They are generated in the manner shown in the following table, which each row is
completed before the succeeding rows are begun.
The procedure that uses the result of the theorem above to recursively generate interpolating
polynomial approximations is called Neville’s method. To avoid the multiple subscripts, we
let Qi,j pxq for 0 § j § i, denote the interpolating polynomial of degree j on the j ` 1 numbers
xi´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.
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
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
Example 3.2.4. Apply Neville’s method to the following data by constructing a recursive table
of the form shown in Table 3.2. Use this table to approximate f p1.5q.
Solution. Let x0 “ 1.0, x1 “ 1.3, x2 “ 1.6, x3 “ 1.9, and x4 “ 2.2, then Q0,0 “ f p1.0q,
Q1,0 “ f p1.3q, Q2,0 “ f p1.6q, Q3,0 “ f p1.9q, and Q4,0 “ f p2.2q. These are the five polynomials
of degree zero (constants).
Calculating the first-degree approximation Q1,1 p1.5q gives
p1.5 ´ 1.0qQ1,0 ´ p1.5 ´ 1.3qQ0,0
Q1,1 p1.5q “ “ 0.5233449,
1.3 ´ 1.0
p1.5 ´ 1.3qQ2,0 ´ p1.5 ´ 1.6qQ1,0
Q2,1 p1.5q “ “ 0.5102968,
1.6 ´ 1.3
p1.5 ´ 1.6qQ3,0 ´ p1.5 ´ 1.9qQ2,0
Q3,1 p1.5q “ “ 0.5132634,
1.9 ´ 1.6
p1.5 ´ 1.9qQ4,0 ´ p1.5 ´ 2.2qQ3,0
Q4,1 p1.5q “ “ 0.5104270.
2.2 ´ 1.9
The higher-degree approximations are generated in a similar manner and are shown in the
following table.
1.0 0.7651977
1.3 0.6200860 0.5233449
1.6 0.4554022 0.5102968 0.5124715
1.9 0.2818186 0.5132634 0.5112857 0.5118127
2.2 0.1103623 0.5104270 0.5137361 0.5118302 0.5118200
If the latest approximation Q4,4 , was not sufficiently 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.
42 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION
Iterated interpolation was used in the previous section to generate successively higher-degree
polynomial approximation at a specific point. Divided-di↵erence method introduced in this
section are used to successively generate the polynomials themselves.
Suppose that Pn pxq 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 algebraic
representation that are useful in certain situations. The divided di↵erences of f with respect to
x0 , x1 , ¨ ¨ ¨ , xn are used to express Pn pxq in the form
for appropriate constants a0 , a1 , ¨ ¨ ¨ , an . To determine the first of these constants, a0 , note that
if Pn pxq is written in the form of (3.4), then evaluating Pn px0 q leaves only the constant term a0 ;
that is
a0 “ Pn px0 q “ f px0 q.
Similarly, when Pn pxq is evaluated at x1 , the only nonzero terms in the evaluation of Pn px1 q are
the constant and linear terms,
f px1 q ´ f px0 q
f px0 q ` a1 px1 ´ x0 q “ Pn px1 q “ f px1 q ùñ a1 “ .
x1 ´ x0
We now introduce the divided-di↵erence notation. The zeroth divided di↵erence of the
function f with respect to xi , denoted f rxi s, is simply the value of f at xi :
The remaining divided di↵erences are defined recursively; the first divided di↵erence of f
with respect to xi and xi`1 is denoted f rxi , xi`1 s and defined as
f rxi`1 s ´ f rxi s
f rxi , xi`1 s :“ . (3.6)
xi`1 ´ xi
The second divided di↵erence, f rxi , xi`1 , xi`2 s is defined as
f rxi`1 , xi`2 s ´ f rxi , xi`1 s
f rxi , xi`1 , xi`2 s :“ . (3.7)
xi`2 ´ xi
Similarly, after the pk ´ 1q-st divided di↵erences,
have been determined, the k-th divided di↵erence relative to xi , xi`1 , ¨ ¨ ¨ , xi`k is defined as
f rxi`1 , xi`2 , ¨ ¨ ¨ , xi`k´1 , xi`k s ´ f rxi , xi`1 , xi`2 , ¨ ¨ ¨ , xi`k´1 s
f rxi , ¨ ¨ ¨ , xi`k s :“ . (3.8)
xi`k ´ xi
The process ends with the single n-th divided di↵erence
f rx1 , x2 , ¨ ¨ ¨ , xn s ´ f rx0 , x1 , ¨ ¨ ¨ , xn´1 s
f rx0 , x1 , ¨ ¨ ¨ , xn s “ .
xn ´ x0
Now we can write a1 “ f rx0 , x1 s, just as a0 can be expressed as a0 “ f rx0 s. Hence, the
interpolating polynomial in (3.4) can be written as
n
ÿ
Pn pxq “ f rx0 s ` f rx0 , x1 , ¨ ¨ ¨ , xk spx ´ x0 q ¨ ¨ ¨ px ´ xk´1 q. (3.9)
k“1
Example 3.3.1. Complete the divided di↵erence table for the following data, and construct
the interpolating polynomial that uses all this data.
The remaining first divided di↵erences are found in a similar manner and are shown in the fourth
column in the following table.
44 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION
f px1 q ´ f px0 q
f rx0 , x1 s “ ,
x1 ´ x0
implies that when f 1 exists, f rx0 , x1 s “ f 1 p⇠q for some number ⇠ between x0 and x1 . The
following theorem generalizes this result.
Theorem 3.3.2. Suppose that f P C n ra, bs and x0 , x1 , ¨ ¨ ¨ , xn are distinct numbers in ra, bs.
Then, a number ⇠ exists in pa, bq with
f pnq p⇠q
f rx0 , x1 , ¨ ¨ ¨ , xn s “ .
n!
Proof. Let gpxq :“ f pxq ´ Pn pxq. Since f pxi q “ Pn pxi q for each i “ 0, 1, ¨ ¨ ¨ , n, the function
g has n ` 1 distinct zeros in ra, bs. Generalized Rolle’s Theorem 1.1.16 implies that a number
⇠ P pa, bq exists with g pnq p⇠q “ 0, so
f pnq p⇠q
f rx0 , x1 , ¨ ¨ ¨ , xn s “ .
n!
Newton’s divided-di↵erence formula can be expressed in a simplified form when the nodes are
arranged consecutively with equal spacing. In this case, we introduce the notation h :“ xi`1 ´xi
for each i “ 0, 1, ¨ ¨ ¨ , n ´ 1 and let x “ x0 ` sh. Then, the di↵erence x ´ xi “ ps ´ iqh. Hence,
(3.9) becomes
Remark: One can use the notation of forward di↵erence (or backward di↵erence) to
rewrite the Newton’s divided-di↵erence formula above. This is just a book keeping and leave as
an exercise.
In this section, we introduce the concept of Hermite polynomial. For a given function f , the
Hermite polynomial Hpxq agree with f at x0 , x1 , ¨ ¨ ¨ , xn . Moreover, it requires that the first
derivatives of the Hermite polynomial Hpxq agree with those of f .
More precisely, the Hermite polynomial Hpxq corresponding to the function f at the given points
x0 , x1 , ¨ ¨ ¨ , xn satisfies the following conditions:
In total, there are 2n ` 2 constraints for the Hermite polynomial Hpxq and therefore it is a
polynomial with degree at most 2n ` 1. In order to find out the basis functions for the Hermite
polynomial, we make use of the Lagrange basis functions introduced in Section 3.1.
To simplify the notation, we define jk satisfying the following conditions:
"
1 if j “ k
jk “
0 if j ‰ k.
pnq
Suppose that we have developed two sets of basis functions with degree 2n ` 1, denoted tHk u
pnq
and tĤk u, for Hermite polynomial such that the following conditions are satisfied: for j “
0, 1, ¨ ¨ ¨ , n,
´ ¯
pnq pnq 1
Hk pxj q “ jk , Hk pxj q “ 0,
´ ¯1 (3.10)
pnq pnq
Ĥk pxj q “ 0, Ĥk pxj q “ jk .
Then, the desired Hermite polynomial Hpxq (with degree at most 2n ` 1) can be written as the
linear combination of those basis functions:
n
ÿ pnq pnq
Hpxq “ f pxj qHk pxq ` f 1 pxj qĤk pxq.
j“0
pnq pnq
It remains to find out the formula for Hk and Ĥk . Recall that the Lagrange basis functions
with degree n are defined as follows: for k “ 0, 1, ¨ ¨ ¨ , n
πn
pnq px ´ x0 qpx ´ x1 q ¨ ¨ ¨ px ´ xk´1 qpx ´ xk`1 q ¨ ¨ ¨ px ´ xn q x ´ xi
Lk pxq “ “ .
pxk ´ x0 qpxk ´ x1 q ¨ ¨ ¨ pxk ´ xk´1 qpxk ´ xk`1 q ¨ ¨ ¨ pxk ´ xn q i“0, i‰k xk ´ xi
46 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION
pnq pnq
We make use of the Lagrange basis functions to derive the formula for Hk and Ĥk . Since for
pnq pnq
each k “ 0, 1, ¨ ¨ ¨ , n the polynomial Hk is of degree 2n ` 1, one may assume that Hk has the
following form
´ ¯2
pnq pnq
Hk pxq “ pax ` bq Lk pxq .
pnq
Using the conditions in the first line of (3.10) for Hk , we have
´ ¯
pnq 1
axk ` b “ 1 and a ` 2paxk ` bq Lk pxk q “ 0.
It implies that
´ ¯ ´ ¯
pnq 1 pnq 1
a “ ´2 Lk pxk q and b “ 1 ` 2xk Lk pxk q.
Hence, we have
ˆ ´ ¯ ˙´ ¯2
pnq pnq 1 pnq
Hk pxq “ 1 ´ 2px ´ xk q Lk pxk q Lk pxq for k “ 0, 1, ¨ ¨ ¨ , n.
pnq
Using the conditions in the second line of (3.10) for Ĥk , we have
´ ¯
pnq 1
cxk ` d “ 0 and c ` 2pcxk ` dq Lk pxk q “ 1.
It implies that
c“1 and d “ ´xk .
Hence, we have
´ ¯2
pnq pnq
Ĥk pxq “ px ´ xk q Lk pxq .
Theorem 3.4.1. If f P C 1 ra, bs and x0 , ¨ ¨ ¨ , xn P ra, bs are distinct, the unique polynomial of
least degree agreeing with f and f 1 at x0 , ¨ ¨ ¨ , xn is the Hermite polynomial of degree at most
2n ` 1, given by
ÿn
H2n`1 pxq “ f pxj qHn,j pxq ` f 1 pxj qĤn,j pxq,
j“0
where, for Ln,j pxq denoting j-th Lagrange coefficient polynomial of degree n, we have
Hn,j pxq “ r1 ´ 2px ´ xj qL1n,j pxj qsL2n,j pxq and Ĥn,j pxq “ px ´ xj qL2n,j pxq.
px ´ x0 q2 ¨ ¨ ¨ px ´ xn q2 p2n`2q
f pxq “ H2n`1 pxq ` f p⇠pxqq ,
p2n ` 2q!
When n “ 1, there are two points x0 and x1 given and we may explicitly write down the complete
formulas for basis functions for Hermite polynomial:
ˆ ˙ˆ ˙
p1q x ´ x0 x ´ x1 2
H0 pxq “ 1 ´ 2 ,
x0 ´ x1 x0 ´ x1
ˆ ˙ˆ ˙
p1q x ´ x1 x ´ x0 2
H1 pxq “ 1 ´ 2 ,
x1 ´ x0 x1 ´ x0
ˆ ˙
p1q x ´ x1 2
Ĥ0 pxq “ px ´ x0 q ,
x0 ´ x1
ˆ ˙
p1q x ´ x0 2
Ĥ1 pxq “ px ´ x1 q .
x1 ´ x0
Example 3.4.2. Let f pxq “ ln x. Given
f p1.0q “ 0.0, f p2.0q “ 0.693147, f 1 p1.0q “ 1.0, and f 1 p2.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 f p1.5q and compute the absolute error.
0.7
0.6
0.5
0.4
0.3
0.2
0.1
-0.1
1 1.2 1.4 1.6 1.8 2
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 numbers
x0 , x1 , ¨ ¨ ¨ , xn in ra, bs and nonnegative integers m0 , m1 , ¨ ¨ ¨ , mn , and m “ maxtm0 , m1 , ¨ ¨ ¨ , mn u.
The osculating polynomial approximating a function f P C m ra, bs at xi , for each i “ 0, ¨ ¨ ¨ , n, is
the polynomial of least degree that has the same values as the function f and all its derivatives
of order less than or equal to mi at each xi . The degree of this osculating polynomial is at most
n
ÿ
M “n` mi
i“0
48 CHAPTER 3. INTERPOLATION AND POLYNOMIAL APPROXIMATION
∞
because the number of condition to be satisfied is n ` 1 ` ni“0 mi , and a polynomial of degree
M has M ` 1 coefficients that can be used to satisfy these conditions.
dk P pxi q dk f pxi q
“ for each i “ 0, 1, ¨ ¨ ¨ , n and k “ 0, 1, ¨ ¨ ¨ , mi .
dxk dxk
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 Lagrange
polynomial interpolating f on x0 , x1 , ¨ ¨ ¨ , xn .
The case when mi “ 1, for each i “ 0, 1, ¨ ¨ ¨ , n, gives the Hermite polynomials. For a
given function f , these polynomials agree with f at x0 , x1 , ¨ ¨ ¨ , xn . In addition, since their first
derivatives agree with those of f , they have the same shape as the function at pxi , f pxi qq in the
sense 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 clear
from the above example that the need to determine and evaluate the Lagrange polynomials and
their 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 the
Newton interpolatory divided-di↵erence formula (3.9) at x0 , x1 , ¨ ¨ ¨ , xn , that is
n
ÿ
Pn pxq “ f rx0 s ` f rx0 , x1 , ¨ ¨ ¨ , xk spx ´ x0 q ¨ ¨ ¨ px ´ xk´1 q.
k“1
The alternative method uses the connection between the n-th divided di↵erence and the n-th
derivative of f . Suppose that the distinct numbers x0 , x1 , ¨ ¨ ¨ , xn are given together with the
values of f and f 1 at these numbers. Define a new sequence z0 , z1 , ¨ ¨ ¨ , z2n`1 by
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`1 s by the divided di↵erence for-
mula. However, if we assume that the reasonable substitution in this situation is f rz2i , z2i`1 s “
f 1 pz2i q “ f 1 pxi q, we can use the entries f 1 px0 q, f 1 px1 q, ¨ ¨ ¨ , f 1 pxn q in place of the undefined first
divided di↵erences
f rz0 , z1 s, f rz2 , z3 s, ¨ ¨ ¨ , f rz2n , z2n`1 s.
The remaining divided di↵erences are produced as usual, and the appropriate divided di↵erence
are employed in Newton’s interpolatory divided-di↵erence formula. Table 3.4 shows the entries
that are used for the first three divided-di↵erence columns when determining the Hermite poly-
nomial H5 pxq for x0 , x1 , and x2 . The remaining entries are generated in the same manner. The
Hermite polynomial is then given by
2n`1
ÿ
H2n`1 pxq “ f rz0 s ` f rz0 , ¨ ¨ ¨ , zk spx ´ z0 qpx ´ z1 q ¨ ¨ ¨ px ´ zk´1 q.
k“1
3.5. PIECEWISE POLYNOMIALS APPROXIMATION 49
Table 3.4: The modified divided di↵erence table for polynomial of Hermite type.
The previous sections concerned the approximation of arbitrary functions on closed intervals
using 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 the
entire range.
1
Example 3.5.1 (Runge’s Phenomenon). Let f pxq “ and x P r´5, 5s. We partition
1 ` x2
the interval using the nodes xk “ ´5 ` kh with k “ 0, 1, ¨ ¨ ¨ , 10. Find the 10-th Lagrange
Interpolation Polynomial of f pxq.
The shapes of the function f and P can be found in the following figure. One can see from the
graph that when x is between ´3 and 3, the di↵erence |f pxq ´ P pxq| is quite small. However,
when |x| ° 3, the di↵erence is large, especially when x is near the endpoints, the di↵erence
becomes dramatically large. In general, one may not use a higher-order Lagrange interpolating
polynomial to approximate a function.
2.5
1.5
0.5
-0.5
-6 -4 -2 0 2 4 6
1
Figure 3.2: Using Lagrange polynomial P pxq to approximate the function f pxq “ .
1 ` x2
1.5
0.5
-6 -4 -2 0 2 4 6
1
Figure 3.3: Using piecewise linear function Qpxq to approximate the function f pxq “ .
1 ` x2
p1q p1q
Pi pxq “ f pxi qLi pxq ` f pxi`1 qLi`1 pxq for x P rxi , xi`1 s.
If f is at least twice di↵erentiable, then the remainder can be written as follows: for x P rxi , xi`1 s,
1
Ri pxq “ f pxq ´ Pi pxq “ f 2 p⇠pxqqpx ´ xi qpx ´ xi`1 q
2
3.5. PIECEWISE POLYNOMIALS APPROXIMATION 51
h2
|f pxq ´ Qpxq| § max f 2 pxq , for all x P rx0 , xn s.
8 xPrx0 ,xn s