{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 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 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 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 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 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 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 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 } {CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 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 "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "A uthor" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 33 "Gallery of Maple Quirks a nd Traps" }}{PARA 19 "" 0 "" {TEXT -1 30 "Initial Version (items 1-4): " }{TEXT 258 15 "Earl C. Swallow" }{TEXT -1 11 " 10/10/99" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 136 "This wor ksheet is simply a compendium of ways in which you and Maple can fail \+ to communicate, often leaving you confused and frustrated." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "rest art;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT 257 2 "1." }{TEXT -1 76 " Confusing things can happen if you \+ forget a * when you intend to multiply." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "A := 5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "B := 12;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "AB;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "A*B;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "This looks simple enoughh here, but embedded in more mor e complex expressions, it can leave you wondering \"Why doesn't Maple \+ use the values I defined?\" or \"Why does Maple refuse to solve this? \" or ......" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 92 " ------------------------------------------------ -----------------------------" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}} {EXCHG {PARA 0 "" 0 "" {TEXT 256 2 "2." }{TEXT -1 121 " It is essenti al to remember the ; or : at the end of each Maple statement. (At lea st it does tell you about this one!)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A + B" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "A + B;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 15 "ABsum := A + B:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "ABsum;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 87 " ------------------------------- ----------------------------------------------" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 263 2 "3." }{TEXT -1 136 " This one gave me no end of agony in a more complex calculation. Here is the simple calculation I finally did to diagnose the problem ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "assume(x, real, DD > 0 , CC > 0, x0 > 0); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "eq1 := DD*(1.0 - exp(CC*(x-x0))) = 0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "solve(eq1,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 20 "Yes, Maple actually " }{TEXT 259 12 "does nothing" }{TEXT -1 65 " here and simply goes to th e next prompt! In cases like this it " }{TEXT 260 6 "should" }{TEXT -1 401 " give an error message so we have some hint what is wrong, but it doesn't. Note that I went to great lengths to tell Maple that the quantities involved are real (not complex) and positive (just to be d efinite), but it didn't help. (Note the ~ after quantities for which \+ I told Maple to make assumptions.) After trying even simpler similar \+ calculations and scratching my head, I tried the following." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "eq2 := DD*(1 - exp(CC*(x-x0) )) = 0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "solve(eq2,x);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "It works in this form! Apparent ly, using \"" }{TEXT 262 3 "1.0" }{TEXT -1 34 "\" in the original equa tion causes " }{TEXT 261 5 "solve" }{TEXT -1 182 " to seek a floating \+ point (numerical) solution which does not exist in this problem. If w e replace x0 with 0, it works just fine because then there is a numeri cal solution. Try it!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 87 " ------------------------------- ----------------------------------------------" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 265 2 "4." }{TEXT -1 223 " Maple really does need to know what you have in mind. It (almo st) always assumes the most general case for the math you present. We can see this play out when we integrate a decreasing exponential from zero to infinity." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "expr1 := AA*exp(-BB*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "int(e xpr1, x =0..infinity);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 92 "Well, a t least this one got us a fairly clear error message. We need to tell Maple what to " }{TEXT 264 6 "assume" }{TEXT -1 3 ". " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "assume(BB > 0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "expr2 := AA*exp(-BB*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "int(expr2, x = 0..infinity);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 87 " \+ --------------------------------------------------------------------- --------" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "That's all for now. Please help m e add to this Gallery of Quirks and Traps." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 }