6 lecture 3: Iterpolatio Error Bouds.6 Covergece Theory for Polyomial Iterpolatio Iterpolatio ca be used to geerate low-degree polyomials that approimate a complicated fuctio over the iterval [a, b]. Oe might assume that the more data poits that are iterpolated (for a fied [a, b]), the more accurate the resultig approimatio. I this lecture, we address the behavior of the maimum error ma f () [a,b] p () as the umber of iterpolatio poits hece, the degree of the iterpolatig polyomial is icreased. We begi with a theoretical result. Theorem 3. (Weierstrass Approimatio Theorem). Suppose f C[a, b]. For ay # > there eists some polyomial p of fiite degree such that ma [a,b] f () p () apple#. Ufortuately, we do ot have time to prove this i class. 7 As stated, this theorem gives o hit about what the approimatig polyomial looks like, whether p iterpolates f at + poits, or merely approimates f well throughout [a, b], or does the Weierstrass theorem describe the accuracy of a polyomial for a specific value of (though oe could gai isight ito such questios by studyig the costructive proof). O the other had, for the iterpolatio problem studied i the precedig lectures, we ca obtai a specific error formula that gives a boud o ma [a,b] f () p (). From this boud, we ca deduce if iterpolatig f at icreasigly may poits will evetually yield a polyomial approimatio to f that is accurate to ay specified precisio. 7 The typical proof is a costructio based o Berstei polyomials; see, e.g., Kicaid ad Cheey, Numerical Aalysis, 3rd editio, pages 3 33. This result ca be geeralized to the Stoe Weierstrass Theorem, itself a special case of Bishops Theorem for approimatio problems i operator algebras; see e.g., 5.6 5.8 of Rudi, Fuctioal Aalysis, d ed. (McGraw Hill, 99). Theorem 3.3 (Iterpolatio Error Formula). Suppose f C + [a, b] ad let p P deote the polyomial that iterpolates {(, f ( )} = with [a, b] for =,...,. The for every [a, b] there eists [a, b] such that f () p () = f (+) () ( + )! = ( ). From this formula follows a boud for the worst error over [a, b]: (.5) ma [a,b] f () p () apple ma [a,b] f (+) () ma ( + )! [a,b] =.
7 We shall carefully prove this essetial result; it will repay the effort, for this theorem becomes the foudatio upo which we shall build the covergece theory for piecewise polyomial approimatio ad iterpolatory quadrature rules for defiite itegrals. Proof. Cosider some arbitrary poit b [a, b]. We seek a descriptive epressio for the error f (b) p (b). If b = for some {,..., }, the f (b) p (b) = ad there is othig to prove. Thus, suppose for the rest of the proof that b is ot oe of the iterpolatio poits. To describe f (b) p (b), we shall build the polyomial of degree + that iterpolates f at,...,, ad also b. Of course, this polyomial will give zero error at b, sice it iterpolates f there. From this polyomial we ca etract a formula for f (b) p (b) by measurig how much the degree + iterpolat improves upo the degree- iterpolat p at b. Sice we wish to uderstad the relatioship of the degree + iterpolat to p, we shall write that degree + iterpolat i a maer that eplicitly icorporates p. Give this settig, use of the Newto form of the iterpolat is atural; i.e., we write the degree + polyomial as p ()+l = ( ) for some costat l chose to make the iterpolat eact at b. For coveiece, we write w() = ( ) ad the deote the error of this degree + iterpolat by f() f () p ()+lw(). To make the polyomial p ()+lw() iterpolate f at b, we shall pick l such that f(b) =. The fact that b 6 { } = esures that w(b) 6=, ad so we ca force f(b) = by settig l = f (b) p (b). w(b) Furthermore, sice f ( )=p ( ) ad w( )=at all the + iterpolatio poits,...,, we also have f( )= f ( ) p ( ) lw( )=. Thus, f is a fuctio with at least + zeros i the iterval [a, b]. Rolles Theorem 8 tells us that betwee every two cosecutive zeros of f, there is some zero of f. Sice f has at least + zeros i [a, b], f has at least + zeros i this same iterval. We ca repeat this argumet with f to see that f must have at least 8 Recall the Mea Value Theorem from calculus: Give d > c, suppose f C[c, d] is differetiable o (c, d). The there eists some h (c, d) such that ( f (d) f (c))/(d c) = f (h). Rolles Theorem is a special case: If f (d) = f (c), the there is some poit h (c, d) such that f (h) =.
8 zeros i [a, b]. Cotiuig i this maer with higher derivatives, we evetually coclude that f (+) must have at least oe zero i [a, b]; we deote this zero as, so that f (+) () =. We ow wat a more cocrete epressio for f (+). Note that f (+) () = f (+) () p (+) () lw (+) (). Sice p is a polyomial of degree or less, p (+). Now observe that w is a polyomial of degree +. We could write out all the coefficiets of this polyomial eplicitly, but that is a bit tedious, ad we do ot eed all of them. Simply observe that we ca write w() = + + q(), for some q P, ad this polyomial q will vaish whe we take + derivatives: w (+) d + () = + d+ + q (+) () =( + )! +. Assemblig the pieces, f (+) () = f (+) () f (+) () =, we coclude that l ( + )!. Sice l = f (+) () ( + )!. Substitutig this epressio ito = f(b) = f (b) p (b) lw(b), we obtai f (b) p (b) = f (+) () ( + )! = (b ). This error boud has strog parallels to the remaider term i Taylors formula. Recall that for sufficietly smooth h, the Taylor epasio of f about the poit is give by f () = f ( )+( ) f ( )+ + ( ) k f (k) ( )+remaider. k! Igorig the remaider term at the ed, ote that the Taylor epasio gives a polyomial model of f, but oe based o local iformatio about f ad its derivatives, as opposed to the polyomial iterpolat, which is based o global iformatio, but oly about f, ot its derivatives. A iterestig feature of the iterpolatio boud is the polyomial w() = = ( ). This quatity plays a essetial role i approimatio theory, ad also a closely allied subdisciplie of comple aalysis called potetial theory. Naturally, oe might woder what choice of poits { } miimizes w() : We will revisit this questio whe we study approimatio theory i the ear future. For ow, we simply ote that the poits that miimize w() over [a, b] are called Chebyshev poits, which are clustered more desely at the eds of the iterval [a, b].
9 Eample 3. ( f () = si()). We shall apply the iterpolatio boud to f () =si() o [ 5, 5]. Sice f (+) () =± si() or ± cos(), we have ma [ 5,5] f (+) () = for all. The iterpolatio result we ust proved the implies that for ay choice of distict iterpolatio poits i [ 5, 5], = < +, the worst case comig if all the iterpolatio poits are clustered at a ed of the iterval [ 5, 5]. Now our theorem esures that ma si() p () apple + [ 5,5] ( + )!. For small values of, this boud will be very large, but evetually ( + )! grows much faster tha +, so we coclude that our error must go to zero as! regardless of where i [ 5, 5] we place our iterpolatio poits! The error boud is show i the first plot below. Cosider the followig specific eample: Iterpolate si() at poits uiformly selected i [, ]. At first glace, you might thik there is o reaso that we should epect our iterpolats p to coverge to si() for all [ 5, 5], sice we are oly usig data from the subiterval [, ], which is oly % of the total iterval ad does ot eve iclude oe etire period of the sie fuctio. (I fact, si() attais either its maimum or miimum o [, ].) Yet the error boud we proved above esures that the polyomial iterpolat must coverge throughout [ 5, 5]. This is illustrated i the first plot below. The et plots show the iterpolats p 4 () ad p () geerated from these iterpolatio poits. Not surprisigly, these iterpolats are most accurate ear [, ], the locatio of the iterpolatio poits (show as circles), but we still see covergece well beyod [, ], i the same way that the Taylor epasio for si() at = will coverge everywhere. Eample 3. (Ruges Eample). The error boud (.5) suggests those fuctios for which iterpolats might fail to coverge as! : beware if higher derivatives of f are large i magitude over the iterpolatio iterval. The most famous eample of such behavior is due to Carl Ruge, who studied covergece of iterpolats for f () =/( + ) o the iterval [ 5, 5]. This fuctio looks beautiful: it resembles a bell curve, with o sigularities i sight o IR, as Figure.8 shows. However, the iterpolats to f at uiformly spaced poits over [ 5, 5] do ot seem to coverge eve for [ 5, 5].
5 error boud + /( + )! -5 - -5 - ma si() p () [ 5,5] Figure.7: Iterpolatio of si() at poits,..., uiformly distributed o [, ]. We develop a error boud from Theorem 3.3 for the iterval [a, b] =[ 5, 5]. The boud proves that eve though the iterpolatio poits oly fall i [, ], the iterpolat will still coverge throughout [ 5, 5]. The top plot shows this covergece for =,..., 4; the bottom plots show the polyomials p 4 ad p, alog with the iterpolatio poits that determie these polyomials (black circles). -5 5 5 5 3 35 4 3 3 p 4 () f () f () p () - - - - -3-5 - 5-3 -5-5 Look at successive derivatives of f ; they epose its crucial flaw: f () = ( + ) f () = 8 ( + ) 3 ( + ) f () = 48 3 ( + ) 4 + 4 ( + ) 3 f (iv) () = 3484 88 ( + ) 5 ( + ) 4 + 4 ( + ) 3 f (vi) () = 4686 ( + ) 7 576 4 ( + ) 6 + 78 ( + ) 5 7 ( + ) 4. At certai poits o [ 5, 5], f (+) blows up more rapidly tha ( + )!, ad the iterpolatio boud (.5) suggests that p will ot coverge to f o [ 5, 5] as gets large. Not oly does p fail to coverge to f ; the error betwee certai iterpolatio poits gets eormous as icreases.
3 ma [ 5,5] /( + ) p () Figure.8: Iterpolatio of Ruges fuctio /( + ) at poits,..., uiformly distributed o [ 5, 5]. The top plot shows this covergece for =,..., 5; the bottom plots show the iterpolatig polyomials p 4, p 8, p 6, ad p 4, alog with the iterpolatio poits that determie these polyomials (black circles). These iterpolats do ot coverge to f as!. This is ot a umerical istability, but a fatal flaw that arises whe iterpolatig with large degree polyomials at uiformly spaced poits. - 5 5 5..5.8.6.5.4. -. f () p 4 () -.5 - p 8 () -.4-5 -4-3 - - 3 4 5 -.5-5 -4-3 - - 3 4 5 4-5 -5-4 -6-8 p 6 () - -5 p 4 () - - - -4-5 -6-5 -4-3 - - 3 4 5-3 -5-4 -3 - - 3 4 5 The followig code uses MATLABs Symbolic Toolbo to compute higher derivatives of the Ruge fuctio. Several of the resultig plots follow. 9 Note how the scale o the vertical ais chages from plot to plot! % rugederiv.m % routie to plot derivatives of Ruges eample, % f() = /(+^) o [-5,5] 9 Not all versios of MATLAB have the Symbolic Toolbo, but you should be able to ru this code o ay Studet Editio or o copies o Virgiia Tech etwork.
.5 -.5 - - - f () -5-4 -3 - - 3 4 5-5 -4-3 - - 3 4 5 3 #8 - - f (4) () f () () -3-5 -4-3 - - 3 4 5.8.6.4. -. -.4 -.6 f () -.8-5 -4-3 - - 3 4 5 4 3 - - -3-4.5.5 -.5 - -.5 # 6 f () () -5-4 -3 - - 3 4 5 # 5 f (5) () -5-4 -3 - - 3 4 5 Figure.9: Ruges fuctio f () = + ad a few of its derivatives o [ 5, 5]. Notice how large the derivatives grow i magitude: the vertical scale o the plot for f (5) (bottom-right) is 5. figure(), clf, set(gca,fotsize,8) for =:5 syms f = vectorize(diff(/(^+),)); % compute derivative (Symbolic Toolbo) = lispace(-5,5,); f = eval(f); % evaluate o a grid of poits plot(,f,b-,liewidth,); % plot derivative title(spritf(ruges Eample: f^{(%d)}(),),fotsize,4) iput( ) ed Some improvemet ca be made by a careful selectio of the iterpolatio poits { }. I fact, if oe iterpolates Ruges eample, f () =/( + ), at the Chebyshev poits for [ 5, 5], p = 5 cos, =,...,,
3 the the iterpolat will coverge! As a geeral rule, iterpolatio at Chebyshev poits is greatly preferred over iterpolatio at uiformly spaced poits for reasos we shall uderstad i a few lectures. However, eve this set is ot perfect: there eist fuctios for which the iterpolats at Chebyshev poits do ot coverge. Eamples to this effect were costructed by Marcikiewicz ad Gruwald i the 93s. We close with two results of a more geeral ature. We require some geeral otatio to describe a family of iterpolatio poits that ca chage as the polyomial degree icreases. Toward this ed, let { [] } = deote the set of iterpolatio poits used to costruct the degree- iterpolat. As we are cocered here with the behavior of iterpolats as!, so we will speak of the system of iterpolatio poits {{ [] } = } =. Our first result is bad ews. Theorem 3.4 (Fabers Theorem). Let {{ [] } = } = be ay system of iterpolatio poits with [] [a, b] ad [] 6= [] for 6= ` (i.e., distict iterpolatio poits for each polyomial degree). The there eists some fuctio f C[a, b] such that the polyomials p that iterpolate f at { []!. } = do ot coverge uiformly to f i [a, b] as ` A ecellet epositio of these poits is give i volume 3 of I. P. Nataso, Costructive Fuctio Theory (Ugar, 965). The good ews is that there always eists a suitable set of iterpolatio poits for ay give f C[a, b]. Theorem 3.5 (Marcikiewiczs Theorem). Give ay f C[a, b], there eist a system of iterpolatio poits with [] [a, b] such that the polyomials p that iterpolate f at { [] } = coverge uiformly to f i [a, b] as!.