CHAPTER 7d. DIFFERENTIATION AND INTEGRATION A. J. Clark School o Engnrng Dpartmnt o Cvl and Envronmntal Engnrng by Dr. Ibrahm A. Assakka Sprng ENCE - Computaton Mthods n Cvl Engnrng II Dpartmnt o Cvl and Envronmntal Engnrng Unvrsty o Maryland, Collg Park Eampl Evaluat th ollowng ntgral usng th trapzodal rul. Us ntrval wdths o,.5, and.5, and compar your rsults wth th tru valu o I -.4678: cos + d ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4
Eampl (cont d For ntrval wdth o, n + + Th ollowng tabl can b constructd: cos + ( (.45 -.9844 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 Eampl (cont d n cos d + n ( d ( ( ( + ( ( + ( ( (.9844 +.45 ( (.456+ (.9844 - + -.6557 + (-.495 -.7495 (.45 -.9844 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 6
Eampl (cont d For ntrval wdth o.5, n + 4 +.5 Th ollowng tabl can b constructd: cos + ( 5.5.5 (.45.95 -.9844 -.798 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 7 n n Eampl (cont d ( d ( 5 cos d + ( ( + ( ( + ( ( (.95 +.45 ( (.9844 +.95.5 - +.5 ( (.798.9844 ( (.456.798.5 - + -.5 +.45867 -.447 -.44564 -.5986 -.494.5.5 (.45.95 -.9844 -.798 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 8
Eampl (cont d For ntrval wdth o.5, n + 8.5 Th ollowng tabl can b constructd: cos + ( + 9.5.5.75.5.5.75 (.45.97.95 -.886 -.9844 -.4 -.798 -.48 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 9 9 cos d + Eampl (cont d ( ( + ( ( (.97 +.45 ( (.95+.97.5- +.5.5 ( (.886.95 ( (.9844.886.75-.5 + -.75 + + K+.879+.745-.647-.495+ K+ -.4554 n n ( d ( ( + (.5.5.75.5.5.75 (.45.97.95 -.886 -.9844 -.4 -.798 -.48 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4
Eampl (cont d ( Trapzdal Rul..45.5.97.879.5.95.745.75 -.886 -.647. -.9844 -.495.5 -.4 -.676.5 -.798 -.858.75 -.48 -.9998. -.456 -.5 Σ -.4554 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. Eampl (cont d Comparson: Trapzodal Rul n n 5 n 9 Tru I -.749 -.494 -.4554 -.4678 % rror.6.6.5. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5
Smpson s Ruls It was notcd that th trapzodal rul s basd on a lnar ntrpolatng polynomal o th typ ( b + b ( Th accuracy n an stmat o an ntgral can usually b mprovd by usng a hghrordr polynomal as th ntrpolaton ormula. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. Smpson s Ruls Smpson s ruls ar numrcal ormulas or stmatng th valu o an ntgral whn a scond-ordr polynomal or thrd-ordr polynomal s usd as th ntrpolatng ormula, that s (4 ( b + b + b ( b + b + b b + (5 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4 6
Smpson s Ruls A Smpson s rul that s basd on a scond-ordr polynomal s rrrd to as th Smpson s / Rul. A Smpson s rul that s basd on a thrdordr polynomal s rrrd to as th Smpson s /8 Rul. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 Smpson s / Rul Drvaton Smpson s / mthod o ntgraton s mor accurat than th trapzodal rul n that t assums a scond-ordr ntrpolatng polynomal to appromat a gvn uncton. Th valu o th ntgral or - to,as shown n th gur, s appromatd as I ( d (6 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 6 7
Orgnal Functon Smpson s / Rul Drvaton ( ( ( ( nd -ordr Poly. b + b + ( b - ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 7 Smpson s / Rul Drvaton Th thr data ponts consdrd n th prvous gur ar tabulatd as ollows Tabl ( ( ( ( ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 8 8
Smpson s / Rul Drvaton ( b + b + b Whr Intgratng th rght-hand sd o Eq. 4, gvs I ( b + b + b b b + b ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION b + + b d (7 Sld No. 9 Smpson s / Rul Drvaton Eq. 7 can b rwrttn n matr orm as b b b I (8 Or n compact matr orm [][] k b ( I (9 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 9
Smpson s / Rul Drvaton Th vctor [b] can b dtrmnd by usng th thr data ponts o Tabl (also shown n th gur. That s, ( ( b b + ( ( ( b + ( b + ( b ( ( b + b + ( b b ( ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. Smpson s / Rul Drvaton Eq can asly b put n matr orm to gv ( b ( b ( b ( ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No.
Sld No. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Smpson s / Rul Drvaton Solvng Eq. or th vctor [b], rsults n or ( ( ( ( b h b b ( ( ( (.5.5.5.5 b h b b ( Sld No. 4 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Smpson s / Rul Drvaton Substtutng Eq. nto Eq. 8, th ollowng rsult can b obtand: ( ( ( (.5 -.5.5 -.5 I b b b I (
Smpson s / Rul Drvaton Prormng th matr multplcaton on Eq., ylds Smpson s / Rul as ollows: r I I 4 ( ( ( [ ( + 4 ( + ( ] (4 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 Smpson s / Rul Drvaton Equaton 4 s th basc Smpson s / rul ormula, whch s basd on scond-ordr ntrpolatng polynomal. Changng th notaton or,, and to,, and, rspctvly, Eq. 4 bcoms I [ ( + 4 ( + ( ] (5 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 6
Smpson s / Rul For n ntrvals o qual sz, th Smpson s / Rul can b prssd as n n ( d [ ( + 4 ( + ( ],,5, K (6 Not: Smpson s / Rul can only b appld whn thr ar an vn numbr o subntrvals, or an odd numbr o data pars and (. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 7 Smpson s /8 Rul In a smlar mannr to th drvaton o th Smpson s / Rul, a thrd-ordr polynomal (Eq. 5 can b t to our ponts and ntgratd to yld I [ ( + ( + ( + ( 4 ] (7 8 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 8
Smpson s /8 Rul For n ntrvals o qual sz, th Smpson s /6 Rul can b prssd as n ( d n ( [ ( + ( + ( + ( ] K 8 (8,4,7, Not: Smpson s /8 Rul can only b appld whn thr ar an odd numbr o subntrvals. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 9 Eampl 4 Smpson s / Rul Evaluat th ollowng ntgral usng th Smpson s / rul. Us ntrval wdths o,.5, and.5, and compar your rsults wth th tru valu o I -.4678: cos + d ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4 4
Eampl 4 (cont d -Smpson s / Rul For ntrval wdth o, n + + Th ollowng tabl can b constructd: cos + ( (.45 -.9844 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4 Eampl 4 (cont d - Smpson s / Rul n n ( d [ ( + 4 ( + ( + ],,5, K cos d + ( [ ( + 4 ( + ( ] ( - [.45 + 4(.9844.456] -.5698 (.45 -.9844 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4 5
Eampl 4 (cont d - Smpson s / Rul For ntrval wdth o.5, n + 4 +.5 Th ollowng tabl can b constructd: cos + ( 5.5.5 (.45.95 -.9844 -.798 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 4 Eampl 4 (cont d - Smpson s / Rul n n ( d [ ( + 4 ( + ( ],,5, K 5 cos d +, ( [ ( + 4 ( + ( + ( + 4 ( + ( ] (.5 -.45 + 4(.95.9844.9844 4(.798.456 + -.465 4 5.5.5 (.45.95 -.9844 -.798 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 44 6
Eampl 4 (cont d - Smpson s / Rul For ntrval wdth o.5, n + 8 + 9.5 Th ollowng tabl can b constructd: cos + (.5.5.75.5.5.75 (.45.97.95 -.886 -.9844 -.4 -.798 -.48 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 45 Eampl 4 (cont d - Smpson s / Rul n n ( d [ ( + 4 ( + ( ],,5, K ( ( 4 ( ( ( 4 ( ( + + + + 4 + 5 ( + 4 ( + ( + ( + 4 ( + ( 9 cos d +,,5,7 5 6 7 7.45 + 4(.97 +.95 (.5 -.95 4(.886.9844 + +.9844 + 4(.4.798.798 + 4(.48.456 -.468 8 9.5.5.75.5.5.75 (.45.97.95 -.886 -.9844 -.4 -.798 -.48 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 46 7
Eampl 4 (cont d - Smpson s / Rul Comparson: I % rror Smpson s / Rul n n 5 n 9 -.5698 -.465 -.468.5.4. Tru -.4678. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 47 Eampl 4 (cont d - Smpson s / Rul Comparson Eampl Trapzodal Rul n n 5 n 9 Tru I -.749 -.494 -.4554 -.4678 % rror.6.6.5. I % rror Smpson s / Rul n n 5 n 9 -.5698 -.465 -.468.5.4. Tru -.4678. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 48 8
Eampl 5 Smpson s /8 Rul Rpat Eampl 4 or valuatng th ollowng ntgral usng th Smpson s /8 rul. In ths cas, us and 6 qual sz ntrvals, and compar your rsults wth th tru valu o I -.4678: cos + d ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 49 n 4 Eampl 5 (cont d -Smpson s /8 Rul For ntrvals o wdth qual to, w.6667 ( Th ollowng tabl can b constructd: cos +.6667. (.45 -.44 -.45 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 9
Eampl 5 (cont d - Smpson s /8 Rul n ( d 4 cos d + n,4,7, K ( [ ( + ( + ( + ( ] 8 ( [.45+ (.44 + (.45.456].6667-8 -.55 ( [ ( + ( + ( + ( ] 8 4.6667. (.45 -.44 -.45 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 n 7 Eampl 5 (cont d -Smpson s /8 Rul For 6 ntrvals o wdth qual to, w. 6 Th ollowng tabl can b constructd: cos + (..666667..666667 (.45.874 -.44 -.9844 -.45 -.487 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5
n Eampl 5 (cont d - Smpson s /8 Rul ( d 7 cos d + n,4,7, K ( [ ( + ( + ( + ( ] 8 ( ( ( ( ( + + + 4,4 8 ( 4 ( 5 ( 6 ( 7 + + + (.45+ (.874 + (.44.-.9844 8.9844 (.45 (.487.456 + + -.465..666667..666667 (.45.874 -.44 -.9844 -.45 -.487 -.456 ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 5 Eampl 5 (cont d - Smpson s /8 Rul Comparson Eampl Trapzodal Rul n n 5 n 9 Tru I -.749 -.494 -.4554 -.4678 % rror.6.6.5. Smpson s /8 Rul n 4 n 7 Tru Smpson s / Rul n n 5 n 9 Tru I % rror -.55. -.465.6 -.4678. I % rror -.5698.5 -.465.4 -.468. -.4678. ENCE CHAPTER 7d. DIFFERENTIATION AND INTEGRATION Sld No. 54