Closed Newto-Cotes Itegrtio Jmes Keeslig This documet will discuss Newto-Cotes Itegrtio. Other methods of umericl itegrtio will be discussed i other posts. The other methods will iclude the Trpezoidl Rule, Romberg Itegrtio, d Gussi Itegrtio. 1 Priciple of Newto-Cotes Itegrtio We oly cover the Newto-Cotes closed formuls. The itervl of itegrtio [, b] is prtitioed by the poits. {, + b, + 2 b },..., b We estimte the itegrl of f(x) o this itervl by usig the Lgrge iterpoltig polyomil through the followig poits. { ( (, f()), + b (, f + b )) },..., (b, f(b)) The formul for the itegrl of this Lgrge polyomil simplifies to lier combitio of the vlues of f(x) t the poits { x i = + i b } i = 0, 1, 2,...,. I the ext sectio we give method for clcultig the coefficiets for this lier combitio. 2 The Newto-Cotes Closed Formul We wish to estimte the followig itegrl. b f(x)dx 1
We use the vlue of the fuctio t the followig poits { + i b i = 0, 1, 2,..., }. Our estimte will hve the followig form. b f(x)dx = A 0 f() + A 1 f ( + b ) ( + A 2 f + 2 b ) + + A f(b) So, wht vlues should we use for the coefficiets d how c we clculte them? There re severl pproches to this. It turs out tht these {A 0, A 1,..., A } coefficiets will be proportiol to the legth of the itervl, b. We use the itervl [0, ] d the poits {0, 1, 2,..., } d ormlize the coefficiets we get by dividig by the legth of the itervl,. By this mes we get ormlized set of coefficiets { 0, 1,..., }. We would the hve A i = (b ) i s our coefficiets for prticulr itervl [, b]. Our estimte of the itegrl will the be give by the followig. b f(x) dx (b ) i f i=0 ( + i b ) We ow compute the ormlized coefficiets { 0, 1,..., }. Let M be ( + 1) ( + 1) Vdermode mtrix. 1 0 0 0 1 1 1 1 M = Vdermode([0, 1, 2,..., ]) = 1 2 2 2 2.... 1 2 Let M T be the trspose of M. Let A be colum vector with etries i. Let B be colum vector with etries b i = The we get the mtrix equtio Solvig for A we get the followig. Our ormlized coefficiets re 1 A. 0 x i dx = i+1 i + 1. M T A = B. A = ( M T ) 1 B 2
Exmple 2.1. Let = 5. Determie { 0, 1, 2, 3, 4, 5 }. The Vdermode mtrix tht ws used i the bove lysis is the followig for = 5. 1 0 0 0 0 0 1 1 1 1 1 1 Vdermode([0, 1, 2, 3, 4, 5]) = 1 2 4 8 16 32 1 3 9 27 81 243 1 4 16 64 256 1024 1 5 25 125 625 3125 The ormlized coefficiets re the followig. { 19 288, 25 96, 25 144, 25 144, 25 96, 19 } 288 3 Altertive Method for Determiig the Normlized Coefficiets As stted t the begiig of this sectio, the Newto-Cotes estimte uses the itegrl of the Lgrge iterpoltig polyomil through the followig poits. ( {(, f()), + b (, f + b )),..., (b, f(b))} Cosider the poits { 0, 1, 2,..., 1}. The the ormlized coefficiet i is give by the followig itegrl formul. i = 1 0 L i (x)dx You c esily verify the umbers i Exmple 2.1 usig the progrm for the Lgrge iterpoltig polyomil d itegrtig. lgrge([0,1/5,2/5,3/5,4/5,1], [0,0,1,0,0,0]) The polyomil p give by the progrm is the Lgrge polyomil tht is oe t 2 5 d zero t the other poits. The coefficiet 2 is give by itegrtig p. We get the correct umber. 2 = 1 0 p dx = 25 144 3
4 TN-Ispire CX CAS Progrm for Closed Newto-Cotes Here is TN-Ispire CX CAS progrm for the closed Newto-Cotes ormlized coefficiets. The iput vrible is the umber i the bove lysis. The output is the colum vector coef whose compoets re the + 1 ormlized coefficiets. Figure 1: Screeshot of the progrm Newto-Cotes closed coefficiets with exmple 5 Progrm for the Newto-Cotes Itegrl Here is progrm tht computes the Newto-Cotes estimte of the itegrl b f(x) dx usig + 1 eqully spced poits i the itervl [, b]. The vrible f is the give fuctio with x s the ssumed vrible. The vribles d b re the edpoits of the itervl of itegrtio. The vrible is the umber of itervls ito which [, b] is subdivided. The output vrible cot is the estimte of the itegrl. 4
Figure 2: Screeshot of the progrm Newto-Cotes evlutio of the itegrl 6 Error Alysis of Newto-Cotes Oe would expect tht the error would grow smller s we use lrger i the Newto- Cotes method. It turs out tht this is ot correct. The reso is tht usig eqully spced poits, the Lgrge iterpoltig polyomil my give very bd pproximtio of the fuctio wy from the iterpoltio poits. It c be so bd tht the itegrls of these polyomils do ot coverge to the itegrl of the fuctio f(x) s. The clssic exmple is the followig fuctio over the itervl [ 4, 4]. f(x) = 1 1 + x 2 Here is exmple of how diverget the Lgrge polyomil c be i this cse. The 1 grph plots d the Lgrge polyomil for twety-oe eqully spced poits o the 1+x 2 itervl [ 4, 4]. 5
Figure 3: Plot of 1 1+x 2 d Divergig Lgrge Polyomil 6