133 lecture 24: Gussi qudrture rules: fudmetls 3.4 Gussi qudrture It is cler tht the trpezoid rule, b 2 f ()+ f (b), exctly itegrtes lier polyomils, but ot ll qudrtics. I fct, oe c show tht o qudrture rule of the form w f ()+w b f (b) will exctly itegrte ll qudrtics over [, b], regrdless of the choice of costts w d w b. However, otice tht geerl qudrture rule with two poits, w 0 f (x 0 )+w 1 f (x 1 ), hs four prmeters (w 0, x 0, w 1, x 1 ). We might the hope tht we could pick these four prmeters i such fshio tht the qudrture rule is exct for four-dimesiol subspce of fuctios, P 3. This sectio explores geerliztios of this questio. 3.4.1 A specil 2-poit rule Suppose we cosider more geerl clss of 2-poit qudrture rules, where we do ot iitilly fix the poits t which the itegrd f is evluted: I( f )=w 0 f (x 0 )+w 1 f (x 1 ) for ukows odes x 0, x 1 2 [, b] d weights w 0 d w 1. We wish to pick x 0, x 1, w 0, d w 1 so tht the qudrture rule exctly itegrtes ll polyomils of the lrgest degree possible. Sice this qudrture rule is lier, it will suffice to check tht it is exct o moomils. There re four ukows; to get four equtios, we will require I( f ) to exctly itegrte 1, x, x 2, x 3. f (x) =1: f (x) =x : f (x) =x 2 : f (x) =x 3 : 1dx = I(1) =) b = w 0 + w 1 x dx = I(x) =) 1 2 (b2 2 )=w 0 x 0 + w 1 x 1 x 2 dx = I(x 2 ) =) 1 3 (b3 3 )=w 0 x 2 0 + w 1x 2 1 x 3 dx = I(x 3 ) =) 1 4 (b4 4 )=w 0 x 3 0 + w 1x 3 1
134 Three of these costrits re olier equtios of the ukows x 0, x 1, w 0, d w 1 : thus questios of existece d uiqueess of solutios becomes bit more subtle th for the lier equtios we so ofte ecouter. I this cse, solutio does exist: w 0 = w 1 = 1 2 (b ), x 0 = 1 p 2 (b + ) 3 6 (b ), x 1 = 1 p 2 (b + )+ 3 6 (b ). Notice tht x 0, x 1 2 [, b]: If this were ot the cse, we could ot use these poits s qudrture odes, sice f might ot be defied outside [, b]. Whe [, b] = [ 1, 1], the iterpoltio poits re ±1/ p 3, givig the qudrture rule I( f )= f ( 1/ p 3)+ f (1/ p 3). 3.4.2 Geerliztio to higher degrees Emboldeed by the success of this humble 2-poit rule, we cosider geerliztios to higher degrees. If some two-poit rule ( + 1 itegrtio odes, for = 1) will exctly itegrte ll cubics (3 = 2 + 1), oe might ticipte the existece of rules bsed o + 1 poits tht exctly itegrte ll polyomils of degree 2 + 1, for geerl vlues of. Towrd this ed, cosider qudrture rules of the form I ( f )= Â w j f (x j ), for which we will choose the odes {x j } d weights {w j } ( totl of 2 + 2 vribles) to mximize the degree of polyomil tht is itegrted exctly. The primry chllege is to fid stisfctory qudrture odes. Oce these re foud, the weights follow esily: i theory, oe could obti them by itegrtig the polyomil iterpolt t the odes, though better methods re vilble i prctice. I prticulr, this procedure for ssigig weights esures, t miimum, tht I ( f ) will exctly itegrte ll polyomils of degree. This ssumptio will ply key role i the comig developmet. Orthogol polyomils, itroduced i Sectio 2.5, ply cetrl role i this expositio, d they suggest geerliztio of the iterpoltory qudrture procedures we hve studied up to this poit. Let {f j } +1 be system of orthogol polyomils with respect to the ier product h f, gi = f (x)g(x)w(x) dx
135 for some weight fuctio w 2 C(, b) tht is o-egtive over (, b) d tkes the vlue of zero oly o set of mesure zero. Now we wish to costruct iterpoltory qudrture rule for itegrl tht icorportes the weight fuctio w(x) i the itegrd: I ( f )=  w j f (x j ) f (x)w(x) dx. It is our im to mke I (p) exct for ll p 2 P 2+1. First, we will show tht y iterpoltory qudrture rule I will t lest be exct for the weighted itegrl of degree- polyomils. Showig this is simple modifictio of the rgumet mde i Sectio 3.1 for uweighted itegrls. Give set of distict odes x 0,...,x, costruct the polyomil iterpolt to f t those odes: This weight fuctio plys essetil role i the discussio: it defies the ier product, d so it dicttes wht it mes for two fuctios to be orthogol. Chge the weight fuctio, d you will chge the orthogol polyomils. I the Sectio 3.4.4 we shll see some useful exmples of weight fuctios. p (x) =  f (x j )`j(x), where `j(x) is the usul Lgrge bsis fuctio for polyomil iterpoltio. The iterpoltory qudrture rule will exctly itegrte the weighted itegrl of the iterpolt p : f (x)w(x) dx p (x)w(x) dx = =  f (x j )`j(x) w(x) dx  f (x j ) `j(x)w(x) dx. Thus we defie the qudrture weights for the weighted itegrl to be givig the rule w j := `j(x)w(x) dx, I ( f )=  w j f (x j ) f (x)w(x) dx. Apply this rule to degree- polyomil, p. Sice p 2 P, it is its ow degree- polyomil iterpolt, so the itegrl of the iterpolt delivers the exct weighted itegrl of p: p(x)w(x) dx =  w j p(x j )=I (p). Note tht the weight fuctio w(x) c iclude ll sorts of stiess, ll of which is bsorbed i the qudrture weights w 0,...,w. This is the cse regrdless of how the (distict) odes x 0,...,x were chose. Now we seek wy to choose the odes so tht the qudture rule is exctly for higher degree polyomils.
136 To begi, cosider rbitrry p 2 P 2+1. Usig polyomil divisio, we c lwys write p(x) =f +1 (x)q(x)+r(x) for some q, r 2 P tht deped o p. Itegrtig this p, we obti p(x)w(x) dx = f +1 (x)q(x)w(x) dx + r(x)w(x) dx = hf +1, qi + r(x)w(x) dx = r(x)w(x) dx. The lst step is cosequece tht importt bsic fct, proved i Sectio 2.5, tht the orthogol polyomil f +1 is orthogol to ll q 2 P. Now pply the qudrture rule to p, d ttempt to pick the iterpoltio odes {x j } to yield the vlue of the exct itegrl computed bove. I prticulr, I (p) =  w j p(x j )= =  w j f +1 (x j )q(x j )+  w j f +1 (x j )q(x j )+  w j r(x j ) r(x)w(x) dx. This lst sttemet is cosequece of the fct tht I ( ) will exctly itegrte ll r 2 P. This will be true regrdless of our choice for the distict odes {x j } [, b]. (Recll tht the qudrture rule is costructed so tht it exctly itegrtes degree- polyomil iterpolt to the itegrd, d i this cse the itegrd, r, is degree polyomil. Hece I (r) will be exct.) Notice tht we c force greemet betwee I (p) d R b p(x)w(x) dx provided  w j f +1 (x j )q(x j )=0. We cot mke ssumptios bout q 2 P, s this polyomil will vry with the choice of p, but we c exploit properties of f +1. Sice f +1 hs exct degree + 1 (recll this property of ll orthogol polyomils), it must hve + 1 roots. If we choose the iterpoltio odes {x j } to be the roots of f +1, the  w j f +1 (x j )q(x j ) = 0 s required, d we hve qudrture rule tht is exct for ll polyomils of degree 2 + 1. Before we c declre victory, though, we must exercise some cutio. Perhps f +1 hs repeted roots (so tht the odes {x j } re ot distict), or perhps these roots lie t poits i the complex ple
137 where f my ot eve be defied. Sice we re itegrtig f over the itervl [, b], it is crucil tht f +1 hs + 1 distict roots i [, b]. Fortutely, this is oe of the my beutiful properties ejoyed by orthogol polyomils. Theorem 3.6 (Roots of Orthogol Polyomils). Let {f k } +1 k=0 be system of orthogol polyomils o [, b] with respect to the weight fuctio w(x). The f k hs k distict rel roots, {x (k) j } k j=1, with x(k) j 2 [, b] for j = 1,..., k. Proof. The result is trivil for f 0. Fix y k 2{1,..., + 1}. Suppose tht f k, polyomil of exct degree k, chges sig t j < k distict roots {x (k) ` } j`=1, i the itervl [, b]. The defie q(x) =(x x (k) 1 )(x x(k) 2 ) (x x(k) j ) 2 P j. This fuctio chges sig t exctly the sme poits s f k does o [, b]. Thus, the product of these two fuctios, f k (x)q(x), does ot chge sig o [, b]. See the illustrtio i Figure 3.8. f k (x) q(x) 0 0 f k (x)q(x) b b b As the weight fuctio w(x) is oegtive o [, b], it must lso be tht f k qw does ot chge sig o [, b]. However, the fct tht q 2 P j for j < k implies tht f k (x)q(x)w(x) dx = hf k, qi = 0, sice f k is orthogol to ll polyomils of degree k 1 or lower (Lemm 2.3). Thus, we coclude tht the itegrl of some cotiuous ozero fuctio f k qw tht ever chges sig o [, b] must be zero. This is cotrdictio, s the itegrl of such fuctio must lwys be positive. Thus, f k must hve t lest k distict zeros i [, b]. As f k is polyomil of degree k, it c hve o more th k zeros. 0 Figure 3.8: The fuctios f k, q, d f k q from the proof of Theorem 3.9.
138 We hve rrived t Gussi qudrture rules: Itegrte the polyomil tht iterpoltes f t the roots of the orthogol polyomil f +1. Wht re the weights {w j }? Write the iterpolt, p, i the Lgrge bsis, p (x) = Â f (x j )`j(x), where the bsis polyomils `j re defied s usul, (3.2) `j(x) = k=0,k6=j (x x k ) (x j x k ). Itegrtig this iterpolt gives I ( f )= p (x)w(x) dx = Â f (x j )`j(x)w(x) dx = Â f (x j ) `j(x)w(x) dx, revelig formul for the qudrture weights: w j = `j(x)w(x) dx. This costructio proves the followig result. Theorem 3.7. Suppose I ( f ) is the Gussi qudrture rule I ( f )= Â w j f (x j ), where the odes {x j } re the + 1 roots of degree-( + 1) orthogol polyomil o [, b] with weight fuctio w, d w j = R b `j(x)w(x) dx. The I ( f )= for ll polyomils f of degree 2 + 1. f (x)w(x) dx As side-effect of this high-degree exctess, we obti iterestig ew formul for the weights i Gussi qudrture. Sice the Lgrge bsis polyomil `k is the product of lier fctors (see (3.2)), `k 2 P, d (`k) 2 2 P 2 P 2+1. Thus the Gussi qudrture rule exctly itegrtes (`k) 2 w(x). We write (`k(x)) 2 w(x)dx = Â w j (`k(x j )) 2 = w k (`k(x k )) 2 = w k,
139 where we hve used the fct tht `k(x j )=0 if j 6= k, d `k(x k )=1. This leds to other formul for the Gussi qudrture weights: (3.3) w k = `k(x)w(x) dx = (`k(x)) 2 w(x) dx. This ltter formul is more computtiolly ppelig th the former, becuse it is more umericlly relible to itegrte positivevlued itegrds. This is et fct, but, s described i Sectio, there is still-better wy to compute these weights: by computig eigevectors of symmetric tridigol mtrix. Of course, i my circumstces we re ot simply itegrtig polyomils, but more complicted fuctios, so we wt better isight bout the method s performce th Theorem 3.7 provides. Oe voids flotig poit errors tht c be itroduced by ddig qutities tht re similr i mgitude but opposite i sig, kow s ctstrophic ccelltio. Oe c prove the followig error boud. See, e.g., Süli d Myers, pp. 282 283. Theorem 3.8. Suppose f 2 C 2+2 [, b] d let I ( f ) be the usul ( + 1)-poit Gussi qudrture rule o [, b] with weight fuctio w(x) d odes {x j }. The f (x)w(x) dx I ( f )= f (2+2) (x) (2 + 2)! y 2 (x)w(x) dx for some x 2 [, b] d y(x) = (x x j).