{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 "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 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 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 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 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1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 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 278 27 "Maple Help for Assignme nt 1" }}{PARA 257 "" 0 "" {TEXT -1 32 "Math 152, Spring 2009\nJ. Gerla ch" }{MPLTEXT 1 0 1 "\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT 281 37 "This is not a complete maple tutorial" }{TEXT -1 106 ". Those of you, who have not worked with ma ple before, should carefully study the first four maple files " } {TEXT 282 46 "(Fundamentals, Functions, Limits, Derivatives)" }{TEXT -1 75 " which are posted on http://www.radford.edu/~jgerlach/Maple/Ma plePage.htm." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 36 "This help manual is written for the " }{TEXT 279 23 "Classic Ma ple Worksheet" }{TEXT -1 156 ". Most of the steps will work in the reg ular maple as well, but the drag-and-click environment of the regular \+ maple 11 may lead to unexpected complications." }}{PARA 0 "" 0 "" {TEXT -1 41 "\nGo though this worksheet by pressing the" }{TEXT 283 1 " " }{TEXT 280 5 "enter" }{TEXT -1 5 " key." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Summation" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "The c ommand for summation is " }{TEXT 256 3 "sum" }{TEXT -1 19 ". Its synt ax is s" }{TEXT 257 22 "um( expression, range)" }{TEXT -1 75 ". For example, if you want to add the first 12 integers, you should enter" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "sum( k, k=1..12);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "The disadvantage in this method is that you just see the result (78 in this case). An alternative is to use \+ " }{TEXT 258 3 "Sum" }{TEXT -1 12 " along with " }{TEXT 259 5 "value" }{TEXT -1 34 ". In our example this becomes " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Sum( k , k=1..12); value(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 260 3 "Sum" }{TEXT -1 25 " is the inert version of " } {TEXT 261 3 "sum" }{TEXT -1 74 ". Nothing is being calculated with Su m, it just displays the expression. " }{TEXT 262 8 "value(%)" }{TEXT -1 49 " executes the summation. \nLet's look at another " }{TEXT 264 7 "example" }{TEXT -1 13 ": Evaluate " }{XPPEDIT 18 0 "Sum(1/(k^2),k = 1 .. 100);" "6#-%$SumG6$*&\"\"\"F'*$%\"kG\"\"#!\"\"/F);F'\"$+\"" } {TEXT -1 2 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "Sum(1/k^2,k=1..10 0);\nvalue(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 137 "Maple is a sym bolic algebra system; it finds the common denominator. A floating poi nt representation is much more useful in this example" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 " Another " }{TEXT 263 7 "example" }{TEXT -1 11 ": Compute " }{XPPEDIT 18 0 "1/8+1/16+1/32;" "6#,(*&\"\"\"F%\"\")!\"\"F%*&F%F%\"#;F'F%*&F%F% \"#KF'F%" }{TEXT -1 10 " + .. + " }{XPPEDIT 18 0 "1/1024;" "6#*&\"\" \"F$\"%C5!\"\"" }{TEXT -1 53 " .\nOnce you realize that the terms are of the form " }{XPPEDIT 18 0 "1/(2^k);" "6#*&\"\"\"F$)\"\"#%\"kG!\" \"" }{TEXT -1 63 " , where k ranges from 3 to 10, everything is strai ghtforward:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "Sum( 1/2^k, k=3..10) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "value(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 34 "The answer is fairly close to 1/4." }{MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Riemann Sums" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "I t is " }{TEXT 284 10 "essential " }{TEXT -1 14 "to invoke the " } {TEXT 285 15 "student package" }{TEXT -1 86 " for this part. Commands such as leftsum or leftbox will otherwise not be executable." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "restart; with(student):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "All examples will use the function " } {XPPEDIT 18 0 "f(x) = x^4-7*x^2+8*x+1;" "6#/-%\"fG6#%\"xG,**$F'\"\"%\" \"\"*&\"\"(F+*$F'\"\"#F+!\"\"*&\"\")F+F'F+F+F+F+" }{TEXT -1 73 " on t he interval [0,2]. So, let's define the function once and for all " } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "f := x -> x^4 - 7*x^2 + 8*x +1;" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 2 "A " }{TEXT 265 25 "display of the rectangles" }{TEXT -1 42 " for the Riemann sum can be obtained with \+ " }{TEXT 266 8 "rightbox" }{TEXT -1 2 ", " }{TEXT 267 7 "leftbox" } {TEXT -1 4 " or " }{TEXT 268 9 "middlebox" }{TEXT -1 138 " (select one ). For these commands you need to communicate the function, the main \+ interval and the number of subintervals. The syntax is " }{TEXT 269 53 "xxxbox( expression, interval, number of subintervals)" }{TEXT -1 97 ". For example, if in our case we want to use left endpoints and 10 subintervals, we need to enter" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " leftbox( f(x), x=0..2, 10);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 270 32 "calculation of the combined area" }{TEXT -1 38 " of \+ all green rectangles is done with " }{TEXT 271 8 "rightsum" }{TEXT -1 2 ", " }{TEXT 272 7 "leftsum" }{TEXT -1 4 " or " }{TEXT 273 9 "middles um" }{TEXT -1 24 ". Again, the syntax is " }{TEXT 274 53 "xxxsum( exp ression, interval, number of subintervals)" }{TEXT -1 92 ". Unfortuna tely, these commands just display the sums which need to be evaluated. Example:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "leftsum( f(x), x=0..2 , 10);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "In order to get the act ual sum, you need to follow this with " }{TEXT 275 8 "value(%)" } {TEXT -1 9 " or with " }{TEXT 276 8 "evalf(%)" }{TEXT -1 1 ":" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "value(%); evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "A more direct way to achive the same res ult is to enclose the leftsum command with the evalf command:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "evalf( leftsum( f(x), x=0..2,10)); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT 277 8 "Example:" }{TEXT -1 25 " We \+ study the function " }{XPPEDIT 18 0 "f(x) = 1/x;" "6#/-%\"fG6#%\"xG*& \"\"\"F)F'!\"\"" }{TEXT -1 19 " on the interval " }{XPPEDIT 18 0 "[1 , 5];" "6#7$\"\"\"\"\"&" }{TEXT -1 57 " . We know from class that th e area under the curve is " }{XPPEDIT 18 0 "ln(5);" "6#-%#lnG6#\"\"&" }{TEXT -1 16 ". Question: By " }}{PARA 0 "" 0 "" {TEXT -1 114 "how mu ch is the error reduced when we use left endpoints and when we double \+ the number of intervals from 25 to 50?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "f := x -> 1/x;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "L 25 := evalf( leftsum( f(x), x=1..5,25)); # sum with 25 subintervals" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "L50 := evalf( leftsum( f(x ), x=1..5,50)); # sum with 50 subintervals" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 30 "(L50 - ln(5.0))/(L25-ln(5.0));" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 45 "Result: The error is reduced by a factor of " } {TEXT 286 10 "about 1/2 " }{TEXT -1 155 "when we double the number of \+ intervals (and thus the work required in the computations). The exact value of this factor is not important, just eyeball it." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}}{MARK "0 1 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }