{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{PSTYLE "Normal" -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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "Numerical integrations" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "f:=x->exp(-x^2);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "plot(f(x),x=-1..1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(student):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "trapezoid(f(x), x=-1..1,10);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "evalf(rightsum(f(x),x=-1..1,10));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "evalf(middlesum(f(x),x=-1..1,10)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "simpson(f(x),x=-1..1,10 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "evalf(int(f(x),x=-1..1));" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "Remark: For this problem, the sim pson's rule gives the best approximation when n = 10 is used; middlesu m is second and trapezoid is the worst. Do you know why?" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 217 "Question: For the function g defined below for x in [0.01, 0.1]. Use n=20, and \+ compare the efficiency of using middlesum, trapezoid and Simpson's met hod. Can you conjecture your answer before you run the program? Why?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "g:=x->1/x;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "plot(g(x),x=0.1..1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "15" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }