• Aucun résultat trouvé

*2.7 THE DIVIDED DIFFERENCE AS A FUNCTION OF ITS ARGUMENTS AND OSCULATORY INTERPOLATION

We have so far dealt with divided differences only in their role as coefficients in the Newton form for the interpolating polynomial, i.e., as constants to be calculated from the given numbers f(xi), i = 0, . . . , n. But the appearance of the function gn(x) = f [x0, x1, . . . , xn, x] in the error term (2.18) for polynomial interpolation makes it necessary to understand how the divided difference f[x0, . . . , xk] behaves as one or all of the points x0, . . . , xk vary.

We begin by extending the definition of the kth divided difference f[x0, . . . , xk] to all choices of x0, . . . , xk; i.e., we drop the requirement

that the points x0, . . . , xk be pair-wise distinct. Since, to recall, the k t h divided difference f[x0, . . . , xk] off at the points x0, . . . , xk is defined as the leading coefficient (i.e., the coefficient of xk) in the polynomial pk(x) of degree < k which agrees with f(x) at the k + 1 points x0, . . . , xk, we must then explain what we mean by the phrase “pk(x) agrees with f(x) at the points x0, . . . , xk,” in case some of these points coincide.

Here is our definition of that phrase. We say that the two functions f(x) and g(x) agree at the points x0, . . . , xk in case

for every point z which occurs m times in the sequence x0, . . . , xk. In effect, f(x) and g(x) agree at the points x0, . . . , xk if their difference has the zeros x0, . . . , xk, counting multiplicity (see Sec. 2.1).

*2.7 CONTINUITY OF DIVIDED DIFFERENCES AND OSCULATORY INTERPOLATION 63 Example f(x) and g(x) agree at the points 2, 1, 2, 4, 2, 5, 4 in case

The Taylor polynomial

agrees with f(x) at the point c n + 1 times, according to this definition.

For and therefore

(2.31)

One speaks of osculatory interpolation whenever the interpolating poly-nomial has higher than first-order contact with f(x) at an interpolation point (osculum is the Latin word for “kiss”).

It does make good sense to talk about the polynomial of degree < k which agrees with a given function f(x) at k + 1 points since, by the corollary to Lemma 2.2 (in Sec. 2.1), two polynomials of degree < k which agree at k + 1 points (distinct or not, but counting multiplicity) must be identical. If this interpolating polynomial pk(x) of degree < k to f(x) at x0, . . . , xk exists, then its leading coefficient is, by definition, the kth divided difference f[x0, . . . , xk], hence

is a polynomial of degree < k - 1. Since (x - x0) · · · (x - xk-1) agrees with the zero function at x0, . . . , xk-1, it follows that p(x) agrees at x0, . . . , xk-1 with pk(x), hence with f(x), i.e., p(x) must be the polynomial of degree < k - 1 which agrees with f(x) at x0, . . . , xk-1. Induction on n therefore establishes the Newton formula

(2.32) for the polynomial of degree < n which agrees with f(x) at x0, . . . , xn. This formula is, of course, indistinguishable from the formula (2.10), which is the whole point of this section.

Finally, we should like to make certain that, for every choice of interpolation points x0, . . . , xk and function f(x), there exists a polynomial of degree < k which agrees with the function f(x) at these points. This we cannot guarantee, for f(x) may not have as many derivatives as we are required to match by the coincidences among the xi’s. But, if f(x) has enough derivatives, then we can prove the existence of the interpolating polynomial pk(x) by induction on k and gain a useful formula [essentially (2.12) again] for the divided difference in the bargain.

Theorem 2.4 If f(x) has m continuous derivatives and no point occurs in the sequence x0, . . . , xn more than m + 1 times, then there exists exactly one polynomial pn(x) of degree < n which agrees with f(x) at x0, . . . , xn.

For the proof of existence, we may interpolation points is nondecreasing,

as well assume that the sequence of

For n = 0, there is nothing to prove. Assume the statement correct for n = k - 1 and consider it for n = k. There are two cases.

Case x0 = xk. Then x0 = . . . = xk and we must have m > k, by assumption; i.e., f(x) has at least k continuous derivatives. Then the Taylor polynomial for f(x) around the center c = x0 does the job, as already remarked earlier; see (2.31). Note that its leading coefficient is the number f(k)(x0)/k!, thus

(2.33) Case x0 < xk. Then, by induction hypothesis, we can find a poly-nomial Pk-1(x) of degree < k - 1 which agrees with f(x) at x0, . . . , xk-1, and a polynomial qk-1(x) of degree < k - 1 which agrees with f(x) at x1, . . . , xk. The polynomial

(2.34) is then of degree < k, and we claim that it is the required polynomial; i.e., pk(x) agrees with f(x) at x0, . . . , xk. We have

(2.35) Suppose z = xi = . . . = xi+r. If z = x0, then

for j = 0,..., r - 1 and also (2.35),

The argument for the case z = xk is analogous. Finally, if then and so, from (2.35),

This proves the statement for n = k.

*2.7 CONTINUITY OF DIVIDED DIFFERENCES AND OSCULATORY INTERPOLATION 65 On comparing leading coefficients on both sides of (2.34), we get again the formula (2.12), i.e.,

(2.36) Having extended the definition of f[x0, . . . , xk] to arbitrary choices of x0, . . . , xk, we now consider how f[xo, . . . , xk] depends on these points x0, . . . , xk. These considerations will make clear that the extended defini-tion was motivated by continuity consideradefini-tions.

We begin with the observation that f[x0, . . . , xk] is a symmetric function of its arguments; that is, f[x0, . . . , xk] depends only on the numbers x0, . . . , xk and not on the order in which they appear in the argument list. This is obvious since the entire interpolating polynomial pk(x) does not depend on the order in which we write down the interpola-tion points. This implies that we may assume without loss that the arguments x0, . . . , xk of f[x0, . . . , xk] are in increasing order whenever it is convenient to do so.

Next we show that f[x0, . . . , xk] is a continuous function of its arguments.

Theorem 2.5 Assume that f(x) is n times continuously differentiable on [a, b], and let y0, . . . , yn, be points in [a, b], distinct or not. Then

The proof is by induction on n. For n = 0, all assertions are trivially true. Assume the statements correct for n = k - 1, and consider n = k.

We first prove (ii) in case not all n + 1 points y0, . . . , yn, are the same.

Then, assuming without loss that y0 < . . . < yn, we have y0 < yn and therefore for all large r, and so, by (2.36),

The last equality is by induction hypothesis. But this last expression equals f[y0, . . . , yn], by (2.36), which proves (ii) for this case.

Next, we prove (i). If y0 = y1 = · · · = yn, then (i) is just a restate-ment of (2.33). Otherwise, we may assume that

and then y0 < yn. But then we may find, for all in

[a, b] so that . By Theorem 2.2, we can find

then so that

But then, by (ii) just proved for this case,

for some by the continuity of f(n)(x),

which proves (i).

Finally, to prove (ii) in the case that y0 = y1 = · · · = yn, we now use

(i) to conclude the existence of so that

for all r. But then, since y0 = · · · = yn

and all i, we have

continuity of f(n)(x)

and so, with (2.36) and the ,

This proves both (i) and (ii) for n = k and for all choices of y0, . . . , yn in [a, b].

We conclude this section with some interesting consequences of Theo-rem 2.5. It follows at once that the function

which appears in the error term for polynomial interpolation is defined for all x and is a continuous function of x if f(x) is sufficiently smooth. Thus it follows that

(2.37) for all x, and not only for [see (2.16)], and also for all x0, . . . , xn, distinct or not, in case f(x) has enough derivatives.

Further, if f(x) is sufficiently often differentiable, then gn(x) is dif-ferentiable. For by the definition of derivatives,

if this limit exists. On the other hand,

*2.7 CONTINUITY OF DMDED DIFFERENCES AND OSCULATORY INTERPOLATION 67 by Theorem 2.5. Hence

(2.38) Finally, it explains our definition of osculatory interpolation as re-peated interpolation. For it shows that the interpolating polynomial at points x0, . . . , xn converges to the interpolating polynomial at points y0, . . . yn as all i. Thus, k-fold interpolation at a point is the limiting case as we let k distinct interpolation points coalesce. The student is familiar with this phenomenon in the case n = 1 of linear interpolation.

In this case, the straight line p1(x) = f(x0) + f[x0, x1](x - x0) is a secant to (the graph of) f(x) which goes over into the tangent

(x - y)f’(y) as both x0 and x1 approach the pointy, and agrees with f(x) in value and slope at x = y.

Example 2.9 With f(x) = 1n x, calculate f(l.5) by cubic interpolation, using f(1) = 0, f(2) = 0.693147, f’(1) = 1, f’(2) = 0.5.

In this case, the four interpolation points are y0 = y1 = 1, y2 = y3 = 2. We calculate

The complete divided-difference table is written as follows:

With this

p3(x) = 0. + (1.)(x - 1) + (-0.306853)(x - 1)2 + (0.113706)(x - l)2(x - 2) is the cubic polynomial which agrees with 1n x in value and slope at the two points x = 1 and x = 2. The osculatory character of the approximation of 1n x by p3(x) is evident from Fig. 2.7. Using Algorithm 2.1 to evaluate p3(x) at 1.5, we get

With e3(x) - f(x) - p3(X) the error, we get from (2.37) and Theorem 2.5(i) the estimate

Figure 2.7 Osculatory interpolation.

Since 1n 1.5 = 0.405465, the error is actually only 0.00361. This shows once again that the uncertainty about the location of makes error estimates based on (2.18) rather conservative-to put it nicely.

We conclude this section with a FORTRAN program which calculates the coefficients for the Newton form of pn(x) and then evaluates pn(x) at a given set of equally spaced points.

C CONSTRUCTION OF THE NEWTON FORM FOR THE POLYNOMIAL OF DEGREE C .LE. N , WHICH AGREES WITH F(X) AT Y(I), I=l,...,NPl.

C SOME OR ALL OF THE INTERPOLATION POINTS MAY COINCIDE, SUBJECT C ONLY TO THE FOLLOWING RESTRICTIONS.

C (1) IF Y(I) = Y(I+K), THEN Y(I) = Y(I+1) = . . . = Y(I+K) .

*2.7 CONTINUITY OF DIVIDED DIFFERENCES AND OSCULATORY INTERPOLATION 69 F(NP1-K+1) = FLAST

10 CONTINUE

C CALCULATE PN(X) FOR VARIOUS VALUES OF X.

READ 501,NPOINT,X,DX 501 FORMAT(I3/2Fl0.3)

DO 30 J=l,NPOINT PNOFX = F(1) DO 29 I=2,NP1

PNOFX = F(I) + (X - Y(I))*PNOFX 29 CONTINUE

PRINT 629,J,X,PNOFX 629 FORMAT(Il0,2E20.7)

X = X + DX 30 CONTINUE

STOP END

The calculation of divided differences corresponds to Algorithm 2.3 if all interpolation points are distinct. If some interpolation points coincide, the input must contain values of derivatives of the interpolant. Specifically, the input is assumed to consist of the array of interpolation points Y(I), I = 1,. . . , NP1 = n + 1, together with an array of numbers F(I), I = 1, . . . , NP1. For simplicity of programming, the sequence of interpolation points is assumed to satisfy the restriction that

i.e., all repeated interpolation points appear together. With this restriction, it is further assumed that, for each I,

Thus, with f(x) = l/x, n = 6, the following input would be correct, in the sense that it would produce the polynomial of degree < 6, which inter-polates f(x) = l/x at the given Y(I), I = 1, . . . , 7.

The student is encouraged to take an example like this and trace through the calculations in the FORTRAN program. The following flow chart describing the calculations of the divided differences might help in this endeavor.

EXERCISES

2.7-1 For f(x) = excalculate f(0.5), using quadratic interpolation, given that f(0) = 1, f’(0) = 1, f(1) = 2.7183. Compare with the correctly rounded result f(0.5) = 1.6487.

2.7-3 For f(x) = sinh x we are given that

Form a divided-difference table and calculate f(0.5) using cubic interpolation. Compare the result with sinh 0.5 = 0.5211.

2.7-3 A function f(x) has a double zero at z1 and a triple zero at z2. Determine the form of the polynomial of degree < 5 which interpolates f(x) twice at z1, three times at z2, and once at some point z3.

2.7-4 Find the coefficients a0, al, a2, a3 for the cubic polynomial p3(x) = a0 + a1(x - y) + a2(x - y)2 + a3(x - y)3, so that

*2.7 CONTINUITY OF DMDED DIFFERENCES AND OSCULATORY INTERPOLATION 71 2 . 7 - 5 Get a simple expression for p3[(y + z ) / 2 ] in terms of the given numbers

where p3(x) is the polynomial determined in Exercise 2.7-4.

2.7-6 Let f(x) and g(x) be smooth functions. Prove that f(x) agrees with g(x) k -fold at the

point x = c if and only if for x near c.

2.7-7 Let g(x) = f[x0, . . . , xk, x]. Prove that

(use induction).

2.7-8 Use Exercise 2.7-7 to prove that if g(x) = f[x0, . . . , xk, x], then

2.7-9 Let f(x) - g(x)h(x). Prove that

(use induction; else identify the right side as the leading coefficient of a polynomial of degree

< k which interpolates g(x)h(x) at x0, . . . , xk). What well known calculus formula do you obtain from this in case x0 = . . . = xk?

CHAPTER

THREE