ENGI 443 Numercal Itegrato Page 5-5. Numercal Itegrato I some o our prevous work, (most otaly the evaluato o arc legth), t has ee dcult or mpossle to d the dete tegral. Varous symolc algera ad calculus sotware packages (such as Maple ) may e ale to provde ether a eact aswer or a umercal appromato. I ths re chapter we shall see three umercal schemes or the evaluato o proper dete tegrals ad two methods or dg the zeroes o uctos. I your rst course tegral calculus, the dete tegral ( ) d a as a lmt o the sum o the areas o rectagles tted uder the curve y = ( ) : was costructed a For rectagles o equal wdth h = a + h =,,,, (so that = a ad = ) a appromato s =, ( ) ( ) ( ) d h a = However, uless h s very small (whch requres a very large umer o rectagles), t s clear that ths appromato ca lead to sustatal errors. A etter appromato s to jo the top let corer o each rectagle to the top let corer o the et rectagle, thus replacg the rectagles y trapezods:
ENGI 443 Numercal Itegrato Page 5- Where a curve y s cocave dow, the area o a trapezod wll e a uderestmate o the area uder the curve. Where the curve s cocave up, the area o the trapezod wll e a overestmate o the area uder the curve. The sum o the areas o the trapezods usually provdes a etter estmate o the area uder the curve tha the sum o the areas o the rectagles does. The area o the trapezod wth let edge at Arevate y. It ollows that s A h d a h h 3 h d 3 a whch s the trapezodal rule.
ENGI 443 Numercal Itegrato Page 5-3 Eample 5. Estmate the legth alog the paraola rule wth = 8. y rom = to =, usg the trapezodal dy d y ds dy 4 d d ds L d 4 d d a 8, a, h 8 4 a h 4 d 4.5.5.75.75 4 where Tale o values or the trapezodal rule: ( ) ( )...5.834.3668.5.444.8847 3.75.8776 3.6555 4..3668 4.4736 5.5.6958 5.38565 6.5 3.678 6.34555 7.75 3.6455 7.8 8. 4.36 d Thereore 5.3 3.3 8 d 4.657
ENGI 443 Numercal Itegrato Page 5-4 Eample 5. (cotued) Note: ater more tha oe susttuto, t ca e show that a 4 l 4 4 sh d 4 4 4 a sh 4 Thereore the eact value s L 7 4.647 4 The accuracy o the trapezodal rule does mprove wth larger umers o arrower tervals, ut at the cost o more computatos. I ths eample, the tegrad s cocave up everywhere. Thereore the trapezodal rule wll provde a overestmate that s worse or smaller. a L 8 4.6569 6 4.6493 3 4.6474 64 4.6469 Eact 4.6468 Also see the Ecel le at "www.egr.mu.ca/~ggeorge/443/demos/". The trapezodal rule essetally estmates the curve y straght les etwee pars o adjacet pots. A urther reemet volves ttg a paraola through each set o three cosecutve pots. The resultg algorthm s Smpso s Rule: a h d 3 4 3 4 4 4 where the umer o tervals must e eve. Ths algorthm s attruted to the eghteeth cetury Brtsh mathematca Thomas Smpso, ut t was dscovered a cetury earler y astroomer Johaes Kepler.
ENGI 443 Numercal Itegrato Page 5-5 Eample 5. Estmate the legth alog the paraola wth = 4. y rom = to =, usg Smpso s rule As Eample 5., the arc legth s L 4 d. a 4, a, h 4 ( ) ( ) 4 ( )...5.444 5.656854..3668 4.4736 3.5 3.678.649 4. 4.36 L 3 4 d. 5.656854 4.4736.649 4.36 L 4.65 whch s qute close to the eact aswer o 4.647 (to 3 d.p.), gve the small umer o tervals used. It s a etter appromato tha the trapezodal rule wth twce as may tervals.
ENGI 443 Numercal Itegrato Page 5-6 Graphcal Soluto to () = I cases where t s dcult to d a zero o a ucto (that s, values o or whch ) aalytcally, varous umercal schemes est. The smplest method s graphcal. Usg approprate sotware (eve a smple hadheld graphg calculator), just zoom o the -as tercept repeatedly utl the desred precso s acheved. Eample 5.3 Fd the soluto o e, correct to ve decmal places. From a sketch o the two curves y = ad y e, t s ovous that the oly soluto s somewhere the terval (, ). Graph the curve y e. Clearly () = < ad () = /e > () s cotuous ad chages sg oly oce sde (, ). Zoom to the terval =.5 to.6: Clearly the root o () = s (.565,.57).
ENGI 443 Numercal Itegrato Page 5-7 Eample 5.3 (cotued) Zoomg aga, Now the root s see to e (.567,.5673). The root seems to e (.5673,.5675). decmal place. Oe al zoom wll resolve the th Thereore, correct to ve decmal places, the soluto to.5674 A calculator quckly corms that e.5674. e s =.5674.
ENGI 443 Numercal Itegrato Page 5-8 Numercal Soluto to () = Newto s Method dy From the deto o the dervatve, d dy we ota y or, equvaletly, d y. The taget le to the curve y lm, y at the pot y has slope. P, Follow the taget le dow to ts as tercept. That tercept s the et appromato. y y y y ad I s the th appromato to the equato, the a etter appromato may e whch s Newto s method, (rst developed a work o Sr Isaac Newto, wrtte 669 ut ot pulshed utl 7).
ENGI 443 Numercal Itegrato Page 5-9 Eample 5.4 Fd the soluto o e, correct to 5 decmal places. From a sketch o the two curves y = ad y e, t s ovous that the oly soluto s somewhere the terval (, ). A reasoale rst guess s. e e e Tale o cosecutve values: e e. e.5.653.6653.663.5663.35.56766.83.56743..56743..56743 Correct to ve decmal places, the soluto to e s =.5674. I act, we have the root correct to s decmal places, =.56743. A spreadsheet to demostrate Newto s method or ths eample s avalale rom the course we ste, at "www.egr.mu.ca/~ggeorge/443/demos/". Ths method coverges more rapdly tha the graphcal method, ut requres more computatoal eort. Cauto: Newto s method ca al the eghourhood o the root. A shallow taget le could result a sequece o appromatos that als to coverge to the correct value. Ths method also should ot e used ear ay dscotutes. There s a wealth o other methods or umercal tegrato ad or the umercal soluto o varous equatos, whch we do ot have the tme to eplore ths course.
ENGI 443 Numercal Itegrato Page 5- Eample 5.4 (addtoal ote) Graph o e, Graph o or, y = ad y e are take the other way aroud, e Reversg the order o the two uctos reverses the sgs o all etres the tale or the secod ad thrd colums, ad, ut the etres the rst ad last colums wll e eactly the same. [Ed o Chapter 5]