{VERSION 3 0 "SUN SPARC SOLARIS" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "# RightSum and LeftS um programs for Maple" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "# \+ Provided by the good doctor" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "# Both of these procedures assume that the function to integrate \+ is defined as f like we have done here:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "f:=x->x^3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGR 6#%\"xG6\"6$%)operatorG%&arrowGF(*$9$\"\"$F(F(6\"" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 219 "RightSum:=proc( a, b, n ) #a=lower limit, b =upper limit, n=number of divisions\nlocal i, sum, deltax; global f;\n deltax := (b-a)/n;\nsum := 0;\nfor i from 1 to n do\n sum := sum + f (a+i*deltax)*deltax;\nod;\nevalf(sum);\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "RightSum(1,3,100);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+++3E?!\")" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 222 "Lef tSum:=proc( a, b, n ) #a=lower limit, b=upper limit, n=number of divis ions\nlocal i, sum, deltax; global f;\ndeltax := (b-a)/n;\nsum := 0;\n for i from 0 to n - 1 do\n sum := sum + f(a+i*deltax)*deltax;\nod;\n evalf(sum);\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "LeftSu m(1,3,100);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+WhT> " 0 "" {MPLTEXT 1 0 48 "f:=x->exp(x);LeftSum(0,1,100 );RightSum(0,1,100);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG%$expG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+SZq4 " 0 "" {MPLTEXT 1 0 26 "evalf(int(exp(x),x=0..1));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# $\"+G=G= " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "10 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }