{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 2 2 2 0 0 0 1 }{CSTYLE "2D Output" -1 20 "Times" 0 1 0 0 255 1 0 0 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle1" -1 228 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle2" -1 229 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle3" -1 230 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle4" -1 231 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "_cstyle5" -1 232 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "_cstyle7" -1 234 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 } {CSTYLE "_cstyle8" -1 235 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "_cstyle11" -1 238 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle12" -1 239 "Times" 1 14 0 0 0 1 1 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle13" -1 240 "Courier" 0 1 255 0 0 1 0 1 0 2 1 2 0 0 0 1 }{CSTYLE "_cstyle15" -1 242 "Times" 1 10 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle16" -1 243 "Times" 1 10 0 0 0 1 1 1 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle17" -1 244 "Times" 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "_cstyle41" -1 256 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "Map le Plot" -1 13 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle1" -1 206 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle2" -1 207 1 {CSTYLE "" -1 -1 "Times " 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 2 0 2 0 2 2 0 1 } {PSTYLE "_pstyle3" -1 208 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle4" -1 209 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle5" -1 210 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle6" -1 211 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle9 " -1 214 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 } 1 1 0 0 8 2 2 0 2 0 2 2 0 1 }{PSTYLE "_pstyle11" -1 216 1 {CSTYLE "" -1 -1 "Times" 1 10 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 206 "" 0 "" {TEXT 228 51 "Integration Using the S impson's 1/3rd Rule - Method" }}{PARA 207 "" 0 "" {TEXT 229 79 "2004 A utar Kaw, Loubna Guennoun, University of South Florida, kaw@eng.usf.ed u, " }}{PARA 208 "" 0 "" {TEXT 230 35 "http://numericalmethods.eng.usf .edu" }}{PARA 209 "" 0 "" {TEXT 231 0 "" }}{PARA 209 "" 0 "" {TEXT 231 122 "NOTE: This worksheet demonstrates the use of Maple to illustr ate the multiple segment Simpson's 1/3rd rule of integration." }}} {SECT 0 {PARA 210 "" 0 "" {TEXT 232 23 "Section I: Introduction" }} {PARA 209 "" 0 "" {TEXT 231 421 "Simpson's rule is based on the Newton -Cotes formula that if one approximates the integrand of the integral \+ by an nth order polynomial, then the integral of the function is appro ximated by the integral of that nth order polynomial. Integration of p olynomials is simple and is based on the calculus. Simpson's 1/3rd ru le is the area under the curve where the function is approximated by a second order polynomial. [click " }{URLLINK 17 "here" 4 "numericalme thods.eng.usf.edu/mws/gen/07int/mws_gen_int_txt_simpson13.doc" "" } {TEXT 231 29 " for textbook notes] [ click " }{URLLINK 17 "here" 4 "nu mericalmethods.eng.usf.edu/mws/gen/07int/mws_gen_int_ppt_simpson13.ppt " "" }{TEXT 231 31 " for power point presentation]." }}}{SECT 0 {PARA 210 "" 0 "" {TEXT 232 16 "Section II: Data" }}{PARA 209 "" 0 "" {TEXT 231 183 "The following simulation illustrates the Simpson's 1/3rd rule of integration. This section is the only section where the user inter acts with the program. The user enters any function " }{TEXT 234 4 "f( x)" }{TEXT 231 191 ", the lower and upper limit of the integration. By entering this data, the program will calculate the exact value of the integral, followed by the results using the Simpson's 1/3rd rule with " }{TEXT 234 14 "n = 2, 4, 6, 8" }{TEXT 231 11 " segments. " }} {EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 8 "restart;" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 10 "Integrand " }{TEXT 234 4 "f(x)" } {TEXT 231 0 "" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 23 "f:=x-> 300*x/(1+exp(x));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGj+6#%\"xG6 \"6$%)operatorG%&arrowGF(,$*(\"$+$\"\"\"9$F/,&F/F/-%$expG6#F0F/!\"\"F/ F(F(F(6#\"\"!" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 32 "The lower lim it of the integral " }{TEXT 234 1 "a" }{TEXT 231 0 "" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 7 "a:=0.0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG$\"\"!F&" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 32 "The up per limit of the integral " }{TEXT 234 1 "b" }{TEXT 231 0 "" }}} {EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 8 "b:=10.0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG$\"$+\"!\"\"" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 134 "This is the end of the user's section. All information \+ must be entered before proceeding to the next section. Re-execute the program." }}{PARA 209 "" 0 "" {TEXT 231 0 "" }}}}{SECT 0 {PARA 210 " " 0 "" {TEXT 232 44 "Section III: The exact value of the integral" }} {PARA 209 "" 0 "" {TEXT 231 0 "" }}{PARA 209 "" 0 "" {TEXT 231 92 "In \+ this section, the program will evaluate the exact value for the integr al of the function " }{TEXT 234 4 "f(x)" }{TEXT 231 25 " evaluated at \+ the limits " }{TEXT 234 1 "a" }{TEXT 231 5 " and " }{TEXT 234 1 "b" } {TEXT 231 2 ".\n" }}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 87 "plot (f(x),x=a..b,title=\"f(x) vs x\",thickness=3,color=black);\ns_exact:=i nt(f(x),x=a..b);" }}{PARA 13 "" 1 "" {GLPLOT2D 436 274 274 {PLOTDATA 2 "6(-%'CURVESG6#7ao7$$\"\"!F)F(7$$\"3WmmmT&)G\\a!#>$\"3[l?=:tF^z!#<7$ $\"3GLLL3x&)*3\"!#=$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\\$G^F07$$\"3H++]i_QQgF0$\"3DFs2^ (>4J%F07$$\"3b++D\"y%3TiF0$\"3B6'f#GnrROF07$$\"3+++]P![hY'F0$\"3II*y\" )zq@,$F07$$\"3iKLL$Qx$omF0$\"3@+<^]UMQDF07$$\"3Y+++v.I%)oF0$\"3@Sz(eeT @6#F07$$\"3?mm\"zpe*zqF0$\"3Y(e@aq&['y\"F07$$\"3;,++D\\'QH(F0$\"3%G/sF47$$\"3enmmm*RRL)F0$\"3#)f.Y^te/gF47$$\"3%zmmTvJga)F0$\"3y PJo.**)3)\\F47$$\"3]MLe9tOc()F0$\"3#41$)>#\\cNTF47$$\"31,++]Qk\\*)F0$ \"3'Qia>v#4%[$F47$$\"3![LL3dg6<*F0$\"3%=baU]()4'GF47$$\"3%ymmmw(Gp$*F0 $\"33q#pp67vR#F47$$\"3C++D\"oK0e*F0$\"3)paW%H?w%)>F47$$\"35,+v=5s#y*F0 $\"31aLCxLnb;F47$$\"#5F)$\"3iJI2hg$>O\"F4-%&TITLEG6#Q*f(x)~vs~x6\"-%+A XESLABELSG6$Q\"xF`alQ!F`al-%'COLOURG6&%$RGBGF)F)F)-%*THICKNESSG6#\"\"$ -%%VIEWG6$;F($\"$+\"!\"\"%(DEFAULTG" 1 2 0 1 10 3 2 6 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %(s_exactG$\"+NH!fY#!\"(" }}}}{SECT 0 {PARA 210 "" 0 "" {TEXT 232 62 " Section IV: The value of the integral using the simpson's rule" }} {SECT 0 {PARA 214 "" 0 "" {TEXT 238 14 "Two segments (" }{TEXT 239 5 " n = 2" }{TEXT 238 1 ")" }}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 5 "n:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\"#" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 14 "h[2]:=(b-a)/n;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\"#$\"+++++]!\"*" }}}{EXCHG {PARA 209 " " 0 "" {TEXT 231 29 "The integral of the function " }{TEXT 234 4 "f(x) " }{TEXT 231 6 " from " }{TEXT 234 2 "a " }{TEXT 231 3 "to " }{TEXT 234 1 "b" }{TEXT 231 61 " using the simpson's rule with two segments w ill be equal to:" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 42 "s[2 ]:=(b-a)*(f(a)+4*f(a+h[2])+f(b))/(3*n);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"#$\"+g)\\br'!\")" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 28 "The approximate error (E_a):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 18 "E_a[2]:=undefined;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\"#%*undefinedG" }}}{EXCHG {PARA 209 "" 0 " " {TEXT 231 60 "The absolute approximate percentage relative error (E_ arel):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 21 "E_arel[2]:=un defined;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%'E_arelG6#\"\"#%*undefi nedG" }}}}{SECT 0 {PARA 214 "" 0 "" {TEXT 238 15 "Four segments (" } {TEXT 239 5 "n = 4" }{TEXT 238 1 ")" }}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 5 "n:=4;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\"% " }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 14 "h[4]:=(b-a)/n;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\"%$\"+++++D!\"*" }}} {EXCHG {PARA 209 "" 0 "" {TEXT 231 29 "The integral of the function " }{TEXT 234 4 "f(x)" }{TEXT 231 6 " from " }{TEXT 234 2 "a " }{TEXT 231 3 "to " }{TEXT 234 1 "b" }{TEXT 231 62 " using the simpson's rule \+ with four segments will be equal to:" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 70 "s[4]:=(b-a)*(f(a)+4*(f(a+h[4])+f(a+3*h[4]))+2*f(a+2 *h[4])+f(b))/(3*n);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"%$ \"+=\"pj5#!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 28 "The approxim ate error (E_a):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 18 "E_a [4]:=s[4]-s[2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\"%$\"+ KT\"[V\"!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 60 "The absolute a pproximate percentage relative error (E_arel):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 32 "E_arel[4]:=abs(E_a[4]/s[4]*100);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%'E_arelG6#\"\"%$\"+$o)y6o!\")" }}}}{SECT 0 {PARA 214 "" 0 "" {TEXT 238 14 "Six segments (" }{TEXT 239 5 "n = 6 " }{TEXT 238 1 ")" }}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 5 "n:=6 ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\"'" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 14 "h[6]:=(b-a)/n;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\"'$\"+nmmm;!\"*" }}}{EXCHG {PARA 209 "" 0 " " {TEXT 231 29 "The integral of the function " }{TEXT 234 4 "f(x)" } {TEXT 231 6 " from " }{TEXT 234 2 "a " }{TEXT 231 3 "to " }{TEXT 234 1 "b" }{TEXT 231 61 " using the simpson's rule with six segments will \+ be equal to:" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 96 "s[6]:=( b-a)*(f(a)+4*(f(a+h[6])+f(a+3*h[6])+f(a+5*h[6]))+2*(f(a+2*h[6])+f(a+4* h[6]))+f(b))/(3*n);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"'$ \"+\"z$Q8C!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 28 "The approxim ate error (E_a):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 18 "E_a [6]:=s[6]-s[4];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\"'$\"* tY,2$!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 60 "The absolute appr oximate percentage relative error (E_arel):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 32 "E_arel[6]:=abs(E_a[6]/s[6]*100);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>&%'E_arelG6#\"\"'$\"+]O8s7!\")" }}}}{SECT 0 {PARA 214 "" 0 "" {TEXT 238 16 "Eight segments (" }{TEXT 239 5 "n = 8 " }{TEXT 238 1 ")" }}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 5 "n:=8 ;" }{MPLTEXT 1 240 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\") " }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 14 "h[8]:=(b-a)/n;" } {MPLTEXT 1 240 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\")$ \"++++]7!\"*" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 29 "The integral o f the function " }{TEXT 234 4 "f(x)" }{TEXT 231 6 " from " }{TEXT 234 2 "a " }{TEXT 231 3 "to " }{TEXT 234 1 "b" }{TEXT 231 63 " using the s impson's rule with eight segments will be equal to:" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 120 "s[8]:=(b-a)*(f(a)+4*(f(a+h[8])+f(a+3 *h[8])+f(a+5*h[8])+f(a+7*h[8]))+2*(f(a+2*h[8])+f(a+4*h[8])+f(a+6*h[8]) )+f(b))/(3*n);" }{MPLTEXT 1 240 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #>&%\"sG6#\"\")$\"+K*\\&eC!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 28 "The approximate error (E_a):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 18 "E_a[8]:=s[8]-s[6];" }{MPLTEXT 1 240 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\")$\")Th;X!\"(" }}}{EXCHG {PARA 209 "" 0 "" {TEXT 231 60 "The absolute approximate percentage re lative error (E_arel):" }}}{EXCHG {PARA 211 "> " 0 "" {MPLTEXT 1 235 32 "E_arel[8]:=abs(E_a[8]/s[8]*100);" }{MPLTEXT 1 240 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%'E_arelG6#\"\")$\"+*)[5P=!\"*" }}}}}{SECT 0 {PARA 210 "" 0 "" {TEXT 232 10 "References" }}{PARA 209 "" 0 "" {TEXT 231 154 "[1] Autar Kaw, Michael Keteltas, Holistic Numerical Methods I nstitute, See http://numericalmethods.eng.usf.edu/mws/gen/07int/mws_ge n_int_txt_simpson13.doc" }}}{PARA 216 "" 0 "" {TEXT 242 10 "Disclaimer " }{TEXT 243 1 ":" }{TEXT 244 248 " While every effort has been made t o validate the solutions in this worksheet, University of South Florid a and the contributors are not responsible for any errors contained an d are not liable for any damages resulting from the use of this materi al." }}}{MARK "0 0 0" 39 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }