Qudrture Methods for Numericl Itegrtio Toy Sd Istitute for Cle d Secure Eergy Uiversity of Uth April 11, 2011 1 The Need for Numericl Itegrtio Nuemricl itegrtio ims t pproximtig defiite itegrls usig umericl techiques. There re my situtios where umericl itegrtio is eeded. For exmple, severl well defied fuctios do ot hve ti-derivtive, i.e. their ti-derivtive cot be expressed i terms of primitive fuctio. A populr exmple is the fuctio e x2 whose ti-derivtive does ot exist. This fuctio rises i vriety of pplictios such s those relted to propbility d sttistics lyses. Furthermore, my pplictios i sciece d egieerig re represeted by itegrodifferetil equtios tht require specil tretmet for the itegrl terms (e.g. expsio, lierliztio, closure...). Therefore, umericl itegrtio does ot oly provide mes for evlutig itegrls umericlly, but lso grts us the bility to pproximte specil fuctios tht re defied i terms of itegrls. Without loss of geerlity, there re two clsses of problems where umericl itegrtio is eeded. I the first clss, oe wishes to evlute the itegrl of well defied fuctio. I this cse, the itegrd c be evluted vrious poits becuse d umericl itegrtio techiques help defie the optimum umber of these poits s well s their loctios. The secod clss of problems for pplyig umericl itegrtio is foud i differetil equtios the most commo of which re those tht express coservtio priciples. For exmple, the popultio blce equtio, well kow prtil differetil equtio ecoutered i process modelig d biologicl systems, exhibits source terms tht re represeted s itegrls of the solutio vrible (e.g. the umber desity fuctio). The most commo techique for umericl itegrtio is clled qudrture. The recipe for qudrture cosists of three steps 1. Approximte the itegrd by iterpoltig polyomil usig specified umber of poits or odes 2. Substitute the iterpoltig polyomil ito the itegrl 3. Itegrte The resultig qudrture pproximtes the itegrl s summtio of the form f (x)dx = Postdoctorl Fellow. web:http://www.tsd.et. emil:sdtoy@gmil.com. w i f (x i ). (1) 1
Furthermore, if the odes re selected i specific mer usig orthogol polyomils, the ccurcy of the qudrture formul is substtilly improved s will be show i subsequet sectios. I will begi our study of qudrture methods by reviewig the theory of iterpoltig polyomils. The, I will itroduce qudrture pproximtios for eqully spced odes. This is followed by discussio of the theory of orthogol polyomils. Filly, I will show you how orthogol polyomils c help i improvig the degree of exctess of qudrture pproximtios. 2 Iterpoltig Polyomils Iterpoltig polyomils re used to pproximte rel vlued fuctio f (x) o rel itervl [,b] by polyomil p(x) tht ccurtely represets the fuctio over tht itervl. 2.1 Lgrge Iterpoltio The most commoly used iterpoltig polyomils re kow s Lgrge polyomils. Cosider rel, cotiuous fuctio f (x) o rel itervl [,b]. Also, ssume tht the vlues of this fuctio re kow t fiite umber of poits x i [,b], the, the Lgrge iterpoltig polyomil p (x) of order is the lowest degree polyomil such tht p (x i ) = f (x i ). Assumig tht the itervl is subdivided ito ( + 1) poits (x 0 < x 1 < < x [,b]), the p (x) is give by p (x) = i=0 where L i (x) is the i-th Lgrge iterpoltig polyomil defied s The first three Lgrge polyomils re give by f (x i )L i (x), (2) L i (x) = j=0, j i (x x j) j=0, j i (x i x j ). (3) L 0 (x) = x x 1 x 0 x 1 x x 2 x 0 x 2 x x 3 x 0 x 3 L 1 (x) = x x 0 x 1 x 0 x x 2 x 1 x 2 x x 3 x 1 x 3 (4) L 2 (x) = x x 0 x 2 x 0 x x 1 x 2 x 1 x x 3 x 2 x 3. 2.2 Exmple Fid the iterpoltig polyomil for the followig set of poits The fudmetl lgrgi polyomils re x 1.5 f (x 0 ) = 14.1014 x 1 = 0.75 f (x 1 ) = 0.931596 x 2 = 0 f (x 2 ) = 0 x 3 = 0.75 f (x 3 ) = 0.931596 x 4 = 1.5 f (x 4 ) = 14.1014. (5) 2
L 0 (x) = x x 1 x x 2 x x 3 x x 4 = 1 x(2x 3)(4x 3)(4x + 3), (6) x 0 x 1 x 0 x 2 x 0 x 3 x 0 x 4 243 L 1 (x) = x x 0 x x 2 x x 3 x x 4 = 8 x(2x 3)(2x + 3)(4x 3), (7) x 1 x 0 x 1 x 2 x 1 x 3 x 1 x 4 243 L 2 (x) = x x 0 x x 1 x x 3 x x 4 = 3 (2x + 3)(4x + 3)(4x 3)(2x 3), (8) x 2 x 0 x 2 x 1 x 2 x 3 x 2 x 4 243 2.3 Iterpoltio Error. (9) The remider or iterpoltio error for usig the Lgrge iterpoltig polyomils is give by where ξ (,b). R (x) = f (x) P (x) = f +1 +1 (ξ ) ( + 1)! j=0 (x x j ); ξ ξ (x), (10) 3 Qudrture Numericl itegrtio is bsed o the ide of first pproximtig the itegrd usig iterpoltig polyomil d the itegrtig the resultig polyomil. Assume tht we wish to clculte the followig itegrl Let f (x)dx. (11) f (x) p 1 (x) = f (x i )L i (x), (12) deote the Lgrge iterpoltig polyomil for f (x). This is polyomil of order ( 1) give the ode pproximtio. Note tht L i (x) is give by We ow substitute the iterpoltig polyomil ito the itegrl where f (x)dx L i (x) = j=1, j i (x x j) j=1, j i (x i x j ). (13) f (x i )L i (x)dx = w i f (x i ) L i (x)dx = w i f (x i ), (14) L i (x)dx. (15) This formul is kow s qudrture pproximtio for itegrl. The poits x i re referred to s the bscisse or odes while w i re clled the weights. 3
3.1 Degree of Exctess A qudrture pproximtio is sid to hve degree of exctess m if it is exct whe f (x) is polyomil of degree less th or equl to m, while it is ot exct for polyomil of order m + 1. As rule of thumb, y iterpoltory qudrture formul tht uses distict odes hs degree of exctess of t lest 1. 3.2 Gussi Qudrture Gussi qudrture ims t improvig the degree of exctess of the qudrture pproximtio by crefully selectig the bscisse of the qudrture formul. It lso geerlizes the cocept of qudrture to itegrls of the form f (x)w(x)dx, (16) where w(x) is weight fuctio. A weight fuctio w(x) is positive mesurble fuctio o domi Ω such tht It lso hs the followig property Usig poit qudrture rule for Eq. (16), we hve f (x)dx = w i f (x i ); w(x) : Ω R +. (17) x w(x)dx < ; = 0,1,2,... (18) w i L i (x)w(x)dx; x 1 < x 2 < < x b. (19) Regrdless of how we choose the bscisse, this qudrture pproximtio hs degree of exctess t lest equl to ( 1). With Gussi qudrture, oe c chieve degree of exctess of more th twice! Before we see how how this is possible, we ll hve to go through some spects of the theory of orthogol polyomils. 4 Orthogolity Two rel fuctio f (x) d g(x) re sid to be orthogol if their ier product is zero. The ier product of two fuctios, o itervl [,b], is defied by the followig itegrl The, f (x) d g(x)re orthogol if The bove covolutio is lso kow s ier product. f,g f (x)g(x)dx. (20) f,g = 0. (21) 4
4.1 Orthogol Polyomils The ides of orthogol fuctios c be used to costruct set of polyomils tht c be used s bsis spig spce of rel fuctios. As result, every fuctio i tht spce c be writte s lier combitio of the orthogol bsis. But we will ot be cocered with group theory t this poit, d we c proceed to developig orthogol polyomils. Cosider sequece of polyomils p k (x) such tht For exmple, p k (x) = k i=0 α k,i x i ; α k,k = 1, k = 0,1,2, (22) p 0 (x) = α 0, 1, (23) p 1 (x) = α 1,0 + α 1,1 x = x + α 1,0, (24) p 2 (x) = x 2 + α 2,1 x + α 2,0. (25) By settig α k,k = 1, the polyomils re sid to be moic, i.e. the coefficiet of the term with highest order is oe. A sequece of polyomils P = {p m (x); m = 0,1,..., } is sid to be orthogol if { p, p m = 0 m p, p m = 0 = m, (26) or, i compct form p, p m = δ m M, (27) where δ m is the Kroecker delt d M = p, p. If, i dditio, p, p = 1, the the polyomils re sid to be orthoorml. Therefore, orthoorml set of polyomils is ormlized set of orthogol polyomils. Orthoorml polyomils re defied usig the followig compct ottio p, p m = δ m. (28) Oe c defie sequece of orthoorml polyomils q k (x) by ormlizig the orthogol oes s You c immeditely verify tht q k (x) = p k(x) pk, p k. (29) p (x) q,q m = p, p, p m (x) pm, p m = 1 p, p p m, p m p, p m = δ m. (30) hece, q k (x) re orthoorml. 5
4.2 Coctructig Orthogol Polyomils O c costruct sequece of orthogol polyomils usig the followig three-term recurrece reltio (TTRR) p 1 (x) = 0, p 0 (x) = 1, (31) p +1 (x) = (x α )p (x) β p 1 (x). The coefficiets c be clculted by usig orthogolity. First, for α, we multiply Eq. (31) by p p p +1 = (x α )p p β p p 1. (32) Next, we itegrte over [,b] p p +1 dx = But, by virtue of orthogolity, we set (x α )p p dx β p p 1 dx. (33) or filly (x α )p p dx 0, (34) xp p dx α p p dx, (35) α = For β, we multiply Eq. (31) by p 1 Agi, by itegrtig over [,b], we hve xp p dx p p dx = xp, p p, p. (36) p 1 p +1 = (x α )p 1 p β p 1 p 1. (37) p 1 p +1 dx = Usig orthogolity, we write (x α )p 1 p dx β p 1 p 1 dx. (38) filly xp 1 p dx β p 1 p 1 dx, (39) β = xp 1p dx p 1p 1 dx = xp 1, p p 1, p 1. (40) 6
At this poit, it would be esier to fid simpler form for the term xp 1 tht ppers i the umertor of Eq. (40). First, we observe tht xp 1 is polyomil of order. Also, becuse the polyomils re moic, we hve 1 p xp 1 = i=0 d,i p i (x) q(x) P 1. (41) I other wods, the differece p xp 1 is polyomil of order ( 1) d c be writte s lier combitio of ll the lower order orthogol polyomils. I fct, oe c determie the coefficiets of this lier combitio very esily by usig orthogolity. For exmple, for m 1, we form the followig ier products or 1 p, p m xp 1, p m = i=0 d,i p i, p m, (42) 0 xp 1, p m = d,m p m, p m, (43) so tht At the outset, we c write the followig the, by tkig the ier product, we recover d,m = xp 1, p m p m, p m. (44) xp 1 = p + q(x); q(x) P 1, (45) xp 1, p = p, p + q, p = p, p. (46) By substitutig Eq. (46) ito Eq. (31), the formul for clcultig β is t hd 4.3 Geerliztio β = p, p p 1, p 1. (47) Orthogol polyomils c lso be defied with respect to weight fuctio w(x). Two polyomils re sid to be orthogol with respect to weight fuctio w(x) if ˆ { b 0 m p (x)p m (x)w(x)dx = δ m M = M = m. (48) I similr fshio, the orthogol polyomils c be determied usig the TTRR give i Eq. (31). To clculte the coefficiets α d β, we impose orthogolity with respect to w(x). Strtig with α, we multiply Eq. (31) by p (x) Itegrtig over [,b], we hve p p +1 w = (x α )p p w β p p 1 w. (49) 7
p p +1 wdx = d, by virtue of orthogolity, we recover (x α )p p wdx β p p 1 wdx, (50) or filly (x α )p p wdx 0, (51) xp p wdx α p p wdx, (52) α = For β, we multiply Eq. (31) by p 1 xp p wdx p p wdx = xwp, p wp, p. (53) wp 1 p +1 = (x α )wp 1 p β wp 1 p 1, (54) or the filly wp 1 p +1 dx = w(x α )p 1 p dx β wp 1 p 1 dx, (55) xwp 1 p dx β wp 1 p 1 dx, (56) β = xwp 1p dx wp 1p 1 dx = xwp 1, p wp 1, p 1. (57) As we did for the o-weighted cse, we c simplify the umerictor for β by writig We ow form the ier product xw(x)p 1 (x) = w(x)xp 1 (x) = w(x)[p + q]; q P 1. (58) xwp 1, p = wp, p + wp 1, p = wp, p. (59) Upo substitutio ito Eq. (57), we recover the formul for clcultig β s β = wp, p wp 1, p 1. (60) Orthogol fuctios hve my other properties tht re outside the scope of this review. I ll get bck to those t lter occsio, but for ow, we hve eough iformtio to go hed d discuss how orthogol polyomils c be used to improve the degree of exctess of the qudrture pproximtio. 8
5 Gussi Qudrture Bck to Gussi qudrture, we sid tht it ims t improvig the degree of exctess of the qudrture pproximtio by crefully selectig the odes of the qudrture formul. For poit qudrture, if the bscisse re selected such tht they coicide with the roots of the correspodig orthogol polyomil p 1 (x), the the qudrture pproximtio hs degree of exctess of (2 1). Let us see how this is possible. Suppose tht f (x) is polyomil of degree m 2 1. The, oe c write f (x) = p (x)q(x) + r(x), (61) where q d r re polyomils of degree 1. By virtue of orthogolity, we hve f (x)w(x)dx = p (x)q(x)w(x)dx + Now the qudrture formul is f (x)w(x)dx = r(x)w(x)dx = r(x)w(x)dx. (62) w i f (x i ). (63) Now, suppose tht the odes re selected such tht they coicide with the roots of p (x), i.e. p (x i ) = 0, i = 1,2,...,. The, d our iterpoltory rule becomes f (x i ) = p (x i )q(x i ) + r(x i ) = 0 + r(x i ) (64) f (x)w(x)dx = w i f (x i ) = w i r(x i ) (65) d thus the pproximtio is exct becuse r(x) is polyomil of degree 1 (remember, -poit qudrture rule is exct for polyomil of degree ( 1)). As you c see, by usig oly odes, d by specificlly choosig those odes s the roots of the th order orthogol polyomil, the the qudrture pproximtio hs degree of exctess of (2 1). 9