{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 276 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 281 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 282 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 283 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 284 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 285 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 286 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 287 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 288 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 289 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 290 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "_cstyle41" -1 291 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "_cstyle38" -1 292 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 293 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{PSTYLE "Norm al" -1 0 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 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 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 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 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 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Outpu t" -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 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 28 "Romberg Integration - M ethod" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 78 "2004 Autar Kaw, Loubna Guennoun, University of South Florida, kaw@ eng.usf.edu," }}{PARA 257 "" 0 "" {TEXT -1 35 "http://numericalmethods .eng.usf.edu" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 85 "NOTE: This worksheet demonstrates the use of Maple to illustrat e Romberg integration." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 23 "Section I: Introduction" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 223 "Romberg integration is based on the trapezoidal rule, where we use two estimates of an integ ral to compute a third integral that is more accurate than the previou s integrals. This is called Richardson's extrapolation. Thus," }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 13 " \+ " }{XPPEDIT 18 0 "I = I(h)+E(h);" "6#/%\"IG,&-F$6#%\"hG\"\"\"-%\"E G6#F(F)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 13 " " }{TEXT 293 13 "h = (b-a) / n" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 6 "where " }{TEXT 270 1 "I" } {TEXT -1 37 " is the exact value of the integral, " }{TEXT 269 4 "I(h) " }{TEXT -1 61 " is the approximate integral using the trapezoidal rul e with " }{TEXT 272 1 "n" }{TEXT -1 15 " segments, and " }{TEXT 271 4 "E(h)" }{TEXT -1 66 " is the truncation error. A general form of Rombe rg integration is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 " " }{XPPEDIT 18 0 "I[j,k] = (4^(k-1)*I[j+1,k -1]-I[j,k-1])/(4^(k-1)-1);" "6#/&%\"IG6$%\"jG%\"kG*&,&*&)\"\"%,&F(\"\" \"F/!\"\"F/&F%6$,&F'F/F/F/,&F(F/F/F0F/F/&F%6$F',&F(F/F/F0F0F/,&)F-,&F( F/F/F0F/F/F0F0" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 16 "where the index " }{TEXT 285 1 "j" }{TEXT -1 44 " is the \+ order of the estimate integral, and " }{TEXT 286 1 "k" }{TEXT -1 30 " \+ is the level of integration. " }{TEXT 292 7 "[click " }{URLLINK 17 "he re" 4 "numericalmethods.eng.usf.edu/mws/gen/07int/mws_gen_int_txt_romb erg.doc" "" }{TEXT 292 29 " for textbook notes] [ click " }{URLLINK 17 "here" 4 "numericalmethods.eng.usf.edu/mws/gen/07int/mws_gen_int_pp t_romberg.ppt" "" }{TEXT 292 42 " for power point presentation]. \+ " }}{PARA 0 "" 0 "" {TEXT -1 4 " " }}{PARA 0 "" 0 "" {TEXT -1 9 " " }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 16 "Section II: Data " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 174 "The \+ following simulation will illustrate Romberg integration. This section is the only section where the user may interacts with the program. Th e user may enter any function " }{TEXT 261 4 "f(x)" }{TEXT -1 190 ", a nd the lower and upper limit for the function. By entering these data, the program will calculate the exact value of the integral, followed \+ by the results using the trapezoidal rule with " }{TEXT 260 14 "n = 1, 2, 4, 8" }{TEXT -1 57 " segments, and the Romberg integration for eac h segments." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "The user can enter any function " }{TEXT 259 4 "f(x)" }{TEXT -1 1 ":" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 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 0 "" 0 "" {TEXT -1 38 "Here, the user can enter the value of " } {TEXT 257 1 "a" }{TEXT -1 5 " and " }{TEXT 258 1 "b" }{TEXT -1 67 ", w hich is the lower and upper limit of the integral, respectively." } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "a:=0.0; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG$\"\"!F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "b:=10.0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# >%\"bG$\"$+\"!\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 109 "This is th e end of the user's section. All information must be entered before pr oceeding to the next section." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 44 "Section III: The exact value of t he integral" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 92 "In this section, the program will evaluate the exact value for \+ the integral of the function " }{TEXT 262 4 "f(x)" }{TEXT -1 25 " eval uated at the limits " }{TEXT 263 1 "a" }{TEXT -1 5 " and " }{TEXT 264 1 "b" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "s_exact:=int(f(x),x=a..b);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%(s_exactG$\"+NH!fY#!\"(" }}}}{SECT 0 {PARA 3 " " 0 "" {TEXT -1 49 "Section IV: The approximate value of the integral " }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 13 "One segment (" }{TEXT 266 5 " n = 1" }{TEXT -1 1 ")" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "n:=1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %\"nG\"\"\"" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "h[1]:=(b-a)/n;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# >&%\"hG6#\"\"\"$\"$+\"!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "The integral of the functi on " }{TEXT 273 4 "f(x)" }{TEXT -1 6 " from " }{TEXT 274 2 "a " } {TEXT -1 3 "to " }{TEXT 275 1 "b" }{TEXT -1 61 " using the trapezoidal rule with one segment will be equal to" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "i[11]:=(b-a)*(f(a)+f(b))/2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#6$\"+0.o4o!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "NOTE: In the index 11, the first number \"1\" means we ar e integrating with " }{TEXT 287 3 "n=1" }{TEXT -1 118 " segment, and t he second number \"1\" is the first iteration, using the original trap ezoidal rule, which corresponds to " }{XPPEDIT 18 0 "O(h^2);" "6#-%\"O G6#*$%\"hG\"\"#" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 14 "Two segments (" }{TEXT 267 5 "n = 2" }{TEXT -1 1 ")" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "n:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "h[2]:=(b-a)/n;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\"#$ \"+++++]!\"*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "The integral of t he function " }{TEXT 276 4 "f(x)" }{TEXT -1 6 " from " }{TEXT 277 1 "a " }{TEXT -1 4 " to " }{TEXT 278 1 "b" }{TEXT -1 62 " using the trapezo idal rule with two segments will be equal to" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "i[21]:=(b-a)*(f(a)+2*f(a+h[2])+f(b))/(2*n);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#@$\"++mo`]!\")" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "NOTE: In the index 21, the number \"2\" m eans we are integrating with " }{TEXT 288 3 "n=2" }{TEXT -1 119 " segm ents, and the second number \"1\" is the first iteration, using the or iginal trapezoidal rule, which corresponds to " }{XPPEDIT 18 0 "O(h^2) ;" "6#-%\"OG6#*$%\"hG\"\"#" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:=1;k:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"kG \"\"#" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "i[12]:=((4^(k-1))*i[21]-i[11])/((4^(k-1))-1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#7$\"+n)\\br'!\")" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 152 "NOTE: In the index 12, the number \"1\" corresponds to the first result of the second iteration, and th e second number \"2\" (2nd iteration) corresponds to " }{XPPEDIT 18 0 "O(h^4);" "6#-%\"OG6#*$%\"hG\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "The approximate error is" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "E_a[2]: =i[12]-i[11];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\"#$\"+kI XZm!\")" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "The absolute approximate relative percentage error is" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "e_a[2]: =abs(E_a[2]/i[12])*100;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$e_aG6# \"\"#$\"+@$)f)*)*!\")" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 15 "Four s egments (" }{TEXT 268 5 "n = 4" }{TEXT -1 1 ")" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "n:=4;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "h[4]:=(b-a)/n;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\"%$\"+++++D!\"*" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "The integral of the function " } {TEXT 279 4 "f(x)" }{TEXT -1 6 " from " }{TEXT 280 1 "a" }{TEXT -1 4 " to " }{TEXT 281 1 "b" }{TEXT -1 63 " using the trapezoidal rule with \+ four segments will be equal to" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 71 "i[31]:=(b-a)*(f(a)+2*f(a+h[4])+2*f(a+2*h[4]) +2*f(a+3*h[4])+f(b))/(2*n);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG 6#\"#J$\"+0!>hq\"!\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "NOTE: In the index 31, the first number \"3\" corresponds to " }{TEXT 289 3 "n =4" }{TEXT -1 118 " segments, and the second number \"1\" is the first iteration using the original trapezoidal rule, which corresponds to \+ " }{XPPEDIT 18 0 "O(h^2);" "6#-%\"OG6#*$%\"hG\"\"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:= 2;k:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"kG\"\"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "The average value of the integral is" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "i[22]:=((4^(k-1))*i[31]-i[21])/((4^(k-1))-1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#A$\"+?\"pj5#!\"(" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "NOTE: In the index 22, the first \+ number \"2\" corresponds to the second result of the second iteration, and the second number \"2\" (2nd iteration) corresponds to " } {XPPEDIT 18 0 "O(h^4);" "6#-%\"OG6#*$%\"hG\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:=1;k:=3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"kG\"\"$" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "i[13]:=((4^(k-1))*i[22]-i[12])/((4^ (k-1))-1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#8$\"+&RB??#! \"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "NOTE: In the index 13, th e first number \"1\" corresponds to the first result of the third iter ation, and the second number \"3\" (third iteration) corresponds to " }{XPPEDIT 18 0 "O(h^6);" "6#-%\"OG6#*$%\"hG\"\"'" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 24 "The approximate error is" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "E_a[4]:=i[13]-i[12];" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\"%$\"+3%o/`\"!\"(" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "The absolute ap proximate relative percentage error is" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "e_a[4]:=abs(E_a[4]/i[13])*100;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$e_aG6#\"\"%$\"+LAG]p!\")" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 16 " Eight segments (" }{TEXT 265 5 "n = 8" }{TEXT -1 1 ")" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "n:=8;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"nG\"\")" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "h[8]:=(b-a)/n;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"hG6#\"\")$\"++++]7!\"*" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "The integral of the function " } {TEXT 282 4 "f(x)" }{TEXT -1 6 " from " }{TEXT 283 1 "a" }{TEXT -1 4 " to " }{TEXT 284 1 "b" }{TEXT -1 64 " using the trapezoidal rule with \+ eight segments will be equal to" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 127 "i[41]:=(b-a)*(f(a)+2*f(a+h[8])+2*f(a+2*h[8 ])+2*f(a+3*h[8])+2*f(a+4*h[8])+2*f(a+5*h[8])+2*f(a+6*h[8])+2*f(a+7*h[8 ])+f(b))/(2*n);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#T$\"++A WqA!\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "NOTE: In the index 41, the first number \"4\" corresponds to " }{TEXT 290 3 "n=8" }{TEXT -1 118 " segments, and the second number \"1\" is the first iteration usi ng the original trapezoidal rule, which corresponds to " }{XPPEDIT 18 0 "O(h^2);" "6#-%\"OG6#*$%\"hG\"\"#" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:=3;k:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% \"kG\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "i[32]:=((4^(k- 1))*i[41]-i[31])/((4^(k-1))-1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&% \"iG6#\"#K$\"+K*\\&eC!\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 161 "NOT E: In the index 32, the first number \"3\" corresponds to the third re sult of the second iteration, and the second number \"2\" (second iter ation) corresponds to " }{XPPEDIT 18 0 "O(h^4);" "6#-%\"OG6#*$%\"hG\" \"%" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:=2;k:=3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% \"kG\"\"$" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 45 "i[23]:=((4^(k-1))*i[32]-i[22])/((4^(k-1))-1);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#B$\"+`'G?[#!\"(" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 160 "NOTE: In the index 23, the first \+ number \"2\" corresponds to the second result of the third iteration, \+ and the second number \"3\" (third iteration) corresponds to " } {XPPEDIT 18 0 "O(h^6);" "6#-%\"OG6#*$%\"hG\"\"'" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "j:=1;k:=4;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"jG\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"kG\"\"%" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "i[14]:=((4^(k-1))*i[23]-i[13])/((4^ (k-1))-1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"iG6#\"#9$\"+\"=tk[# !\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 161 "NOTE: In the index 14, t he first number \"1\" corresponds to the first result of the fourth it eration, and the second number \"4\" (fourth iteration) corresponds to " }{XPPEDIT 18 0 "O(h^8);" "6#-%\"OG6#*$%\"hG\"\")" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "The approximate error is" }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "E_a[8]:=i[14]-i[13];" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$E_aG6#\"\")$\"*'y\\WG!\"(" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Th e absolute approximate relative percentage error is" }{MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "e_a[8]:=abs(E_a[8]/i[14 ])*100;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%$e_aG6#\"\")$\"+d*))R9\" !\")" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}}}{MARK "1 12 9" 34 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }