0% found this document useful (0 votes)
28 views8 pages

Week 11 13 May 2020 12 36 26

Uploaded by

Twinkle Rivas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
28 views8 pages

Week 11 13 May 2020 12 36 26

Uploaded by

Twinkle Rivas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
156 Numerical Methods for Scientists and Engineers n ™ 7.6.2 Simpson's Rules (Composite Forms) In deriving Eq. (7.43), the Simpson's 1/3 rule, we have used two guj, of equal widik i a to get a composite formula, we shall divide yes of integration (a, 5] into an even number of sub-intervals say 2N, each one (6 — aV/2N, thereby we have x = a X1y «+» Xv = 8 and xy = x9 + by, y pe" «+ (2N - 1). Thus, the definite integral J can be written as hy m 1 = [70a ar = [2 son) det [7G de + i +f faa 0 Applying Simpson's 1/3 rule as in Eq. (7.43) to each of the integrals on the tte hand side of Eq. (7.50), we obtain T= too + 4y, +92) + O2 + 493 +4) to N Scie) + Oana + Ayana + dawII~ ggh'yO) That is, 3 h fF) de = yl + 401 +95 + + YW) +2 + 4 + + Yan-2) + Yaw] + Errorterm —(15\) This formula is called composite Simpson's 1/3 rule. The error term E, whichis also called global error, is given by NE s B= — Nysyog = — ey * pry, tO ar an o a3) for some & in (xo, xpy]. Thus, in Simpson's 1/3 rule, the global error is of Ot") Similarly in deriving composite Simpson’s 3/8 rule, we divide the intervd dl integration into n sub-intervals, where 7 is divisible by 3, and applying te integration formula (7.44) to each of the integral given below i fQ) d= R f(x) de + i FQ) dete fe a we obtain the composite form of Simpson’s 3/8 rule as ’ 3 I SC) de = TAI Wa) + 3y, + 3y) + 2yy + 3y, + 3ys + 2% 4 +293 + Wea +3 + 1b) with the global error E given by Ex ~ 22 ~9)4 wy, % "'O fro pe noted 1 Sea 11 or terms, We nO ee For illustration, We sane f the same order. However, if we consider the magnitudes tice that Simpson's 1/3 rule is superior to Simpson's consider few examples, e76 Find the approximate value of Pr ye ie sin x dx ¢p wapezoidal role, (i) Simpson's 1/3 rule by dividing the range of 28 () Bio six equal paris. Calculate the percentage error from its true value oo the cases. soution We shall at first divide the range of integration (0, 7) into ch part is of width 7/6 and write down the table of gx equal values: 3 nia 2nis S216 n x 0 76 Oo” 00 05 «(0.8660 10 0.8660 05 00 parts so that €2\ yzsinx Anping trapezoidal rule, we have : A ffsin x de = 5 Lo +¥6 + 201 t¥2 45 4% +ys)] Hee, h, the width of the interval is 77/6. Therefore, * sin xdx = Zor0+ 20.7329) = 2841S. x 3.732 = 1.9540 Applying Simpson’s 1/3 rule (7.41), we have : [fin se = B Ey 434 +40, +99 +98) + 202 +9401 5 31415 11464 = 2.000 18 : Fl +04 4x2 + (2VL732)) = “the actual value of the integral is Ji sin x de = [cos a5 =2 Hence, +0 the case of trapezoidal rule The Petcentage of error = zat x 100 = 23 m Eqs. (7.52) and (7.54), the global error in Simpson's Methods for Scientists and Engine While in the case of Simpson’s rule the percentage error 's 2 = 2.0008 , 199 = 004 (sign ignored) 2 Example 7.7 From the following data, estimate the value of f log xdx using Simpson's 1/3 rule, Also, obtain the value of h, $0 that the value of, integral will be accurate up to five decimal places. or x 10 95. 20 25 «30 35 40 45 Sy y = logx 0.0000 0.4055 0.6931 0.9163 1.0986 1.2528 1.3863 1.5041 Igy, Solution We have from the data, n = 0, 1, -.-» 8, and A = 0.5. Now wig Simpson's 1/3 rule, o A Stow x ae = 5 190 + ye + AC +99 HY +9) + 202 +4 +0) 9 [(0 + 1.6094) + 4(4.0787) + 2(3.178)] = 05 3 = 4.0467 The error in Simpson’s rule is given by {1.6094 + 16.3148 + 6.356) ee ae ny) (ignoring the sign) Since PCPA EBON AE 2 6 z Jog x, y Feat Vn y 7 yore MAE P= 6, in, 9 = 0.006 ‘Therefore, the error bounds are given by a. “ ‘ (0.0096)(4)h" _ F . OH 180 180 If the result is to be accurate up to five decimal places, then sferentrauion and Int: gration 159 Numeral i so 9.000075 oF h < 0.08. It may be noted that the actual value of as ger 2 ‘ % [flog «x =(x ton # ~ a1 = 5408 5 ~ 4 apie 78 Evaluate the integral ps ax rer cial rule, (i) Simpson's 1/3 rule by taking h= 1/4. Hence, compute wi wi rate vale of ibe opp Sonion At fst, we shall uate the function #8 x 0 v4 12 3/4 1 * a 1 oss. 08000 =—06400-0.5000 + wing wapezoidal rule, and taking h = 1/4 \ bop +ye +204 #9 +9) = gil + 2231001 = 07828) sng Simpson's 1/3 rule, and taking h = 1/4, we have pus + 4(1.512) + 1.6] = 0.7854 (2) a t= sb t+ Ay + ys) + 292] Bu the closed form solution to the given integral is | 1 de el —; + [tan x hey +x lo Equating (2) and (3), we get = 3.1416. Example 7.9 Compute the integral [2 pen & fer? a ‘ing Simpson's 1/3 rule, taking h = 0.125. ES ee At the outset, we shall construct the table of the function as 2) oat i Waal # 0 0.125 0.250 0375 0.5 0.625 0.750 0875 1.0 ye etn E 0.7979 0.7917 0.7733 0.7437 0.7041 0.6563 0.6023 0.5441 0.4839 | Ast ome. aer7 ag, orer, grunt net, 0t2 0a Wie A ae ee ey Wiivagicec ee ear Ree is ‘Numerical Methods for Scientists and Engineers Using Simpson’s 1/3 rule, we have I= Five + y+ 401 +95 495 +97) +202 + +0 27107979 + 0.4839 + 4(0.7917 + 0.7437 + 0.6563 + 0544), + 2(0.7733 + 0.7041 + 0.6023)] e oi «2e18 + 10.9432 + 4.1594) = 0.6827 Hence, J = 0.6827. Example 7.10 A missile is launched from a ground station. The acceleratin, during its first 80 seconds of flight, as recorded, is given in the following table t(s) 0 10 20 30 40 50 60 70 = 80 a (m/s*) 30 31.63 33.34 35.47 37.75 40.33 43.25 46.69 50.67 compute the velocity of the missile when t = 80 s, using Simpson’s 1/3 mile. Solution Since acceleration is defined as the rate of change of velocity, we have ay, =a or v= [ade dt “0 Using Simpson’s 1/3-rule, we have h ve Oo + Ya) + 401 + 5 +5 + Yn) + 20M. +94 + odd 10 =z leo + 50.67) + 4(3163 + 35.47 + 4033 + 46.69) + 2(33.34 + 37.75 + 43.25)] 3086.1 m/s Therefore, the required velocity is given by v = 3.0861 km/s 7.8 DOUBLE INTEGRATION : f the form To evaluate numerically a double integral of af [frana]e n yy the lines x= 4 ¥= BL Y= Gym ayy Simpson’s rule, developed in g,, ction 8 i ta time. Noting that head repeatedly with respect to one variable a > hat, bos, inveadons are fata linear combination of ee oe se given fit different values of the independent variable, we ci e a ike erval (4, ig, equal sub-intervals of size h, such that h = (b — 4) a ae interval (c, M equal sub-intervals of size k, so that k = (d — c)/M. Thus, we have fori=1,2,...,N-] fori=1,2,..., M-1 over a rectangular region bounded b: employ either trapezoidal rule or X=Xytih, x=a, xv= 5, Yi=Yot tk, Youre Yu=4 Thus, we can generate a table of values of the integrand, and the aby Procedure of integration is illustrated by considering a couple of examply, Example 7.12 Evaluate the double integral 2 p2dx dy tlie by using trapezoidal rule, with h = k = 0.25. Solution Taking x = 1, 1.25, 1.50, 1.75, 2.0 and y= 1, 1.25, 1.50, 1.7524 the following table is generated using the integrand 1 Sy) = a rt ee tee msiata Den eS a ea 1.00 125 150 175 2.00 1.00 05 x . 0.4444 04 03636 0.3333 125 04444 (04 03636 03333-03077 150 04 03636 0.3333 93077 «0.2857 1.75 93636 0.3333 93077. 2357—0.2667 2.00 0333303077 0.2857 «02667025 one variable say x fixed and eepind One Werdal rule to each row in the above table g Fras + 210.4444 + 0.4 + 0,3636) + 0.3333] p wee = 0.4062 a f 1128, NY = 2 io.aasa + 2(0.4 + 0.3636 + 0.3333) + 0.3077] h = 0.3682 @ i 928 077) + 0.285 fos. ydy= 50.4 + 2(0:3636 + 03333 + 0.3077) + 0.2857] h = 0.3369 @ i = 177 + 0.2857) + 0.2667] frars.a~ FF 10.3636 + 2(0.3333 + 0.307 2857) + 0. = 0.3105 @ aod a 0.25, sane i = 103333 “+ 2(0.3077 + 0.2857 + 0.2667) + 0.25) o = 0.2879 Therefore, 1 EES Apa 42125, 4105.94 018.91) 6 Sebning Eqs. (1)-(5) into Eq, (6), we get the required result es 025 fe: “y 0-4062 + 2(0.3682 + 0.3369 + 0.3105) + 0.2879] = 0.3407 Rumple 7.13 Evaluate pre in e+ 9) ae dy 4 merical double integration. tone Taking x = y = 0, m/8, n/4, 3/8, /2, we can generate the table of the integrand SG, y) = fain +) at umerical Methods for Scientists and Engineers yet nI8 0.6186 0.8409 0.9612 1.0 0961, nig 0.8409 0.9612 1.0 0.9612 08499 3n/8 0.9612 1.0 0.9612 0.8409 414, | aia 1.0 0.9612 0.8409 0.618609 p20 Keeping one variable say x as fixed and y as variable, and applying tule to each row of the above table, we get "epeai fr, Dae = F000 4+2(0,6186 + 0,8409 + 0.9612) + 1.0]= 11g a2 (Rn ie eager de= © 10.6196 + 2(0.8409 + 0.9612 + 1.0) +09612]~ 1416 Similarly, we get 2 6 22(3n f if y) de 1478, j‘ (% y) ae 106 nia T° i (&. ) d& = 1.1469 Using these results, we finally obtain 12 pn Ce EH tray Flr0.942[ (Ey) + (Bs 3 “EG 3) ® = Fg {1.1469 + 21.4106 + 1.478 + 1.4109 + 1.1469] = 2.1386

You might also like