{VERSION 4 0 "APPLE_PPC_MAC" "4.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 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{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 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{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 0 1 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 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 272 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 273 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 274 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 275 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 276 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 277 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 278 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 279 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 280 "" 1 12 0 0 0 0 1 2 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 281 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 282 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 283 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 284 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 285 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 286 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 287 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 288 "" 1 12 0 0 0 0 1 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 289 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 290 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 291 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 292 "" 1 12 0 0 0 0 0 2 0 0 0 0 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-1 436 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 437 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 438 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 439 "" 1 12 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 440 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 441 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 442 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 443 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 444 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 445 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 446 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 447 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 448 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Tim es" 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 "Author" -1 19 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 8 8 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 }1 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 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 1 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 259 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 "Title" -1 260 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Normal" -1 261 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 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 260 "" 0 "" {TEXT -1 10 "Lecture 1 " }}{PARA 19 " " 0 "" {TEXT -1 40 "[Click on the +'s to open each section.]" }}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 14 "What is Maple?" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 261 5 "Maple" }{TEXT -1 6 " is a " }{TEXT 256 27 "Symbolic Computation System" }{TEXT -1 4 " or " }{TEXT 257 26 "Computer Algebra System. " }{TEXT -1 37 " That \+ is, it manipulates information " }{TEXT 258 12 "symbolically" }{TEXT -1 4 " or " }{TEXT 259 13 "algebraically" }{TEXT -1 122 " as opposed t o just numerically. Nevertheless, it does have numerical manipulation abilities. In this course we will use " }{TEXT 260 9 "Maple 6. " } {TEXT -1 1 " " }{TEXT 384 8 "Maple V " }{TEXT -1 71 " was the previous version of Maple. There are many differences between " }{TEXT 386 7 " Maple V" }{TEXT -1 5 " and " }{TEXT 387 7 "Maple 6" }{TEXT -1 195 ". S o you should be sure of the version you are using. See the Maple Links on the course webpage or my homepage for more information about the h istory of Maple and Maple resources on the internet." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 "For those who are inter ested, the kernel of Maple is written in the " }{TEXT 262 2 "C " } {TEXT -1 151 "language. But most of the functions in Maple are written in Maple and can be viewed and manipulated by the user. We will disc uss how to do this later." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}} }{SECT 1 {PARA 3 "" 0 "" {TEXT -1 21 "Maple as a Calculator" }}{PARA 0 "" 0 "" {TEXT -1 30 "Maple may be used as simply a " }{TEXT 264 10 " calculator" }{TEXT -1 108 " with graphing capabilities: We illustrate this capability first. Later we will show how to use Maple as a " } {TEXT 265 22 "programming language.\n" }}{PARA 0 "" 0 "" {TEXT -1 100 "To start Maple on most platforms just double click on the Maple icon. In unix systems one may type " }{TEXT 388 6 "xmaple" }{TEXT -1 62 " \+ to open Maple. When Maple opens, you are in what is called a " }{TEXT 383 15 "Maple worksheet" }{TEXT -1 44 ". Names of Maple worksheets us ually end in " }{TEXT 385 5 ".mws " }{TEXT -1 53 " . I am now typing t his lecture in a Maple worksheet." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3*4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "2^5; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "12/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "11/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "11.0/2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3 -4;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3+4;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 390 24 "Maple is case sensitive." }{TEXT -1 114 " So, for example, ABC, ABc, AbC, Abc, aBc, Abc, etc, are all differen t so far as Maple is concerned. \n\nMaple uses " }{TEXT 389 2 "Pi" } {TEXT -1 31 " (not pi) to denote the number " }{XPPEDIT 18 0 "pi:" "6# %#piG" }{TEXT -1 44 ". We can get a floating point evaluation of " } {XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT -1 26 " by the command evalf(Pi): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "evalf(Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "evalf(pi); #pi is not equal to Pi" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 108 "\nNote the # may be used for c omments as we just did. However, it looks better to use the text mode. A Maple " }{TEXT 266 9 "worksheet" }{TEXT -1 61 " (where we are now) \+ is divided into three different regions: " }{TEXT 391 12 "input region " }{TEXT -1 2 ", " }{TEXT 392 13 "output region" }{TEXT -1 6 ", and " }{TEXT 393 11 "text region" }{TEXT -1 93 ", in the respective colors r ed, blue, and black. You can enter the text mode by clicking the " } {TEXT 270 1 "T" }{TEXT -1 108 " on the menu at the top. More about th ese matters will be given below. \n\nWe can get 1000 decimal digits of " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT -1 11 " as follows" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalf(Pi,1000);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sin(Pi/3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 285 "Note that Maple does not give a floating point number unless you specifically ask for it. We may get a floating point evalu ation of the previous output as follows. Note that % indicated the pre vious output. %% indicates the output before that. The one before that is indicated by %%%. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "ev alf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "%%;" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sin(Pi/5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "sin(Pi/37);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "sqrt(16);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "sqrt(7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 561 "Maple has very high precision ari thmetic. However, if you push it too far, you will cause Maple to cras h or if you are lucky just to say the object you asked for is too larg e. When I attempted to execute the following commands with Maple 6 on \+ my Power Mac G-4 the first came back with a warning that I had used to o much memory and should quite and restart Maple. The second caused Ma ple to crash. I would have lost everything if I had not saved the work sheet before executing these two commands. I will place # before them \+ to guard against accidental execution." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "# 353^10000000;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "# 353^1000;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT 263 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 32 "Removing Output from a Worksheet" }}{PARA 0 "" 0 "" {TEXT -1 117 "Sometimes one want \+ to clear the output from the worsheet when it becomes too cluttered. T his can be done by going to " }{TEXT 267 4 "Edit" }{TEXT -1 48 " on th e menu at the top. Drag the mouse down to " }{TEXT 268 13 "Remove Outp ut" }{TEXT -1 43 " and with the mouse still held down select " }{TEXT 269 16 "From Worksheet. " }{TEXT -1 68 "When you release the mouse but ton all of the output will be removed." }}}{SECT 1 {PARA 3 "" 0 "" {TEXT 271 31 "More Use of Built-in Functions:" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 50 "The following commands should be self explanato ry." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "diff(sin(x),x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Diff(sin(x),x) = diff(sin(x) ,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "int(x^3,x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "int(x^3,x=1..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "Int(x^3,x=1..2) = int(x^3,x=1..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "solve(2*x^3+x^2+x-1=0,x);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "Here I denotes the complex number \+ " }{XPPEDIT 18 0 "sqrt(-1);" "6#-%%sqrtG6#,$\"\"\"!\"\"" }{TEXT -1 79 ". These three solutions can be converted to floating point numbers a s follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "Next we solve a differential equat ion. First we define the equation. We call it ODE." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "ODE := diff(y(x),x)-y(x) = sin(x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "dsolve(ODE);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 19 "Elementary Plotting" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "First we plot the graph of " }{XPPEDIT 18 0 "y = x^3+x^2+x+1;" "6#/%\"yG,**$%\"xG\"\"$\"\"\"*$F'\"\"#F)F'F)F) F)" }{TEXT -1 3 ". " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "plo t(x^3+x^2+x+1,x=-2..2); \n" }{TEXT -1 55 "(llustrate how to make the p lot smaller to save space.)" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 25 "No w we plot the graph of " }{XPPEDIT 18 0 "z = cos(x^2+y^2);" "6#/%\"zG- %$cosG6#,&*$%\"xG\"\"#\"\"\"*$%\"yGF+F," }{TEXT -1 2 ". " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "plot3d(cos(x^2+y^2), x=-Pi/2..Pi/2, y=-Pi/2..Pi/2);\n" }{TEXT -1 85 "(Illustrate how to use the menu bar a fter selecting the plot to manipulate the plot.)" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 71 "\nLater We will have lots more to say about plotin g curves and surfaces." }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Basic Worksheet Handling" }}{EXCHG {PARA 256 "" 0 "" {TEXT 290 75 "In class I will show how to start a new worksheet, make a title, indicate " } {TEXT 289 102 "author, insert Standard Math (that is, a mathematical \+ formula) in text, and how to save a worksheet. " }{TEXT 291 1 " " } {TEXT -1 2 "\n\n" }{TEXT 283 9 "1. Under " }{TEXT 285 4 "File" }{TEXT 286 20 " on the menu choose " }{TEXT 287 3 "New" }{TEXT 284 17 " or cl ick on the " }{TEXT 288 16 "blank page icon " }{TEXT 292 121 "on the m enu bar. This opens a new page. However the value of variables remain \+ the same. To start fresh one needs to do a " }{MPLTEXT 1 0 8 "restart; " }{TEXT -1 1 " " }{TEXT 397 19 "command.\n\n2. Under " }{TEXT 273 6 " Insert" }{TEXT 293 8 " select " }{TEXT 274 10 "Text Input" }{TEXT 294 17 " or click on the " }{TEXT 275 1 "T" }{TEXT 295 43 " icon on the me nu bar. Then, where it says " }{TEXT 272 8 "P Normal" }{TEXT 296 45 " \+ pull down the menu at that point and select " }{TEXT 276 7 "P Title" } {TEXT 371 2 ". " }{TEXT 297 61 "Type in your title and then hit return . This will put you in " }{TEXT 277 8 "P Author" }{TEXT 298 34 " mode. Type your name and the hit " }{TEXT 398 6 "Return" }{TEXT 399 2 ". " }{TEXT 299 19 "You will now be in " }{TEXT 372 8 "P Normal" }{TEXT 373 13 " text mode. " }}{PARA 256 "" 0 "" {TEXT -1 0 "" }}{PARA 256 " " 0 "" {TEXT 382 47 " 3. You can type more text or you can click on " }{TEXT 278 2 "[>" }{TEXT 374 1 " " }{TEXT 300 10 "or choose " }{TEXT 375 1 "I" }{TEXT 279 5 "nsert" }{TEXT 376 1 " " }{TEXT 301 5 " then" } {TEXT 281 1 " " }{TEXT 377 15 "Execution Group" }{TEXT 378 1 " " } {TEXT 302 4 "then" }{TEXT 282 1 " " }{TEXT 379 12 "After Cursor" } {TEXT 380 2 ". " }{TEXT 303 53 "[Sometimes you may want to insert an e xecution group " }{TEXT 280 6 "before" }{TEXT 381 11 " the cursor" } {TEXT 304 49 "--especially if you are at the top of the page.]\n" }} {PARA 0 "" 0 "" {TEXT -1 39 "4. To insert math in your text use the " }{TEXT 306 7 "Insert " }{TEXT -1 5 "then " }{TEXT 394 13 "Standard Mat h" }{TEXT -1 42 ". This will allow you to type things like " } {XPPEDIT 18 0 "int(x^2,x = 1 .. 2);" "6#-%$intG6$*$%\"xG\"\"#/F';\"\" \"F(" }{TEXT -1 28 ". Note that after selecting " }{TEXT 395 20 "Inser t Standard Math" }{TEXT -1 16 " you will get a " }{TEXT 396 1 "?" } {TEXT -1 93 ". What you type will appear at the top just below the men u bar. After you finish, click the " }{TEXT 305 1 "T" }{TEXT -1 82 " \+ on the menu bar to go back to ordinary text.\n\n5. To save your worksh eet go under " }{TEXT 307 4 "File" }{TEXT -1 12 " and choose " }{TEXT 308 4 "Save" }{TEXT -1 172 " (or click on the icon that looks like a f loppy disk on the menu bar). The first time you will be prompted to gi ve a name. Use a single word with no spaces and end it with " }{TEXT 310 4 ".mws" }{TEXT -1 16 ". For example, " }{TEXT 309 15 "samplefile .mws " }{TEXT -1 116 "would be a possible name for a Maple file. If y ou look at the top of this page you will see the name of this file: " }{TEXT 400 13 "lecture01.mws" }{TEXT -1 258 ". After the worksheet has been named, you should still save it frequently--to guard against los ing work if Maple crashes-- but you will not need to change the name. \+ If you want to start a new worksheet keeping what you already have in \+ a named worksheet use " }{TEXT 311 8 "Save As " }{TEXT -1 12 "instead of " }{TEXT 312 4 "Save" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 3 ". \+ \n" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 21 "Maple's Built-in Help" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 257 "" 0 "" {TEXT 317 13 "Getting Help:" }{TEXT 313 129 " Perhaps the easiest way is to use a question mark as follows: Here we suppose we forgot the command for differentiate. We guess " }{TEXT 319 11 "that it is " }{TEXT 314 5 "dif. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "?dif" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 83 "\nSay you want to know how to factor an i nteger or a polynomial: Then you could try:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "?factor\n" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "Notice that the help page that com es up says that " }{TEXT 315 6 "factor" }{TEXT -1 67 " is used to fact or polynomials and not integers. It tells you that " }{TEXT 316 7 "ifa ctor" }{TEXT -1 29 " is used to factor integers.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "factor(t^2-t-2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "factor(123456789);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "ifactor(123456789);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "You may also do a full text search of the " }{TEXT 326 16 "Maple Help Files" }{TEXT -1 13 " by going to " }{TEXT 320 4 "Help " }{TEXT -1 34 " on the menu bar and pull down to " }{TEXT 318 20 "Ful l Text Search. \n\n" }{TEXT 321 59 "Another way is to select a word of interest and then go to " }{TEXT 322 4 "Help" }{TEXT 323 34 " on the \+ menu bar and pull down to " }{TEXT 324 15 "Help on Context" }{TEXT 325 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 51 "Functions (Procedures) versus Algebraic E xpressions" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Maple has a large number of built-in functions (also know n as " }{TEXT 401 10 "procedures" }{TEXT -1 17 ") . For example: " } {TEXT 327 81 "sin, cos, tan, cotan, sec, csec, arcsin, ln, exp, abs, s qrt, tan, factorial, det" }{TEXT -1 155 " (determinant), and many mo re. These functions behave pretty much as you would expect. You can a lso make your own function as we will illustrate shortly." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 161 "The obvious way t o make a function, however, does not work. Suppose we want to define a new function f satisfying f(x) = x^2 + x + 1 for all x. You might t ry:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f(x):=x^2+x+1;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 402 72 "But this is NOT the way to do \+ it. Note what happens in the next command:" }{TEXT -1 1 "\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(2);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 10 "evalf(%);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 "The object x^2 + x + 1 is what is called an algebraic expressi on. We may plot it, solve it, factor it, and so forth, but it is NOT a function so far as Maple is concerned. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 147 "\nWhat we would like is for f(2) to give us 7. Here's th e correct way to define such a function. Actually there are essentiall y three ways to do it." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 " " 0 "" {TEXT -1 27 "Use of the arrow notation:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "f:=x->x^2+x+1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(a );" }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 17 "\nUse of unapply:\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "restart: " }{TEXT -1 178 "(It is a good idea to restart after finishing one problem and starting o n another. This clears the internal memory. In this case, it let's us \+ clear the above definition of f. )\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "f:=unapply(x^2+x+1,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(a );" }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 22 "Creating a procedure: " }{TEXT 328 62 "(This is very usef ul for creating very complicated functions.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "f:=proc(x)\n x^2+x+1;\nend \+ proc;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(a);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "The Assignm ent Statement" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 67 "Assignment of the value 2 to the variable x is obtained by use of " }{TEXT 336 2 ":=" }{TEXT -1 62 " . This is a colon foll owed by an equal sign. The expression " }{TEXT 337 4 "x:=2" }{TEXT -1 79 " means assign 2 to the variable x. Here is an example: We make tw o assignment:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "x:=2; \ny: =3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "Now let's see what the val ues of x and y are:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "x,y; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "Now x is 2 and y is 3 so far \+ as Maple is concerned. So if you try to solve the equation " } {XPPEDIT 18 0 "x^2+x+1 = 0;" "6#/,(*$%\"xG\"\"#\"\"\"F&F(F(F(\"\"!" } {TEXT -1 20 " Maple is confused:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "solve(x^2+x+1=0,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "Clearing x of the value 2 may be accomplished as follows:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "x:='x';" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "x,y;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "solve(x^2+x+1=0,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 12 "The \+ command " }{TEXT 338 9 "restart; " }{TEXT -1 74 " as noted above, is u seful for clearing all variables and starting afresh." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "x:=2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 " x,y;" }}}{EXCHG {PARA 259 "" 0 "" {TEXT 329 29 "Note that if a line en ds with" }{TEXT 332 3 " : " }{TEXT 335 12 " instead of " }{TEXT 333 3 " ; " }{TEXT 334 12 "the command " }{TEXT 330 39 "is executed, but the output is not show" }{TEXT -1 2 ". " }{TEXT 331 11 "Here is an " } {TEXT -1 8 "example:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "y:=1 4:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "y;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "t:=12;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "See what happens if you forget the ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "t" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 26 "Shift-Return versus Return " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 349 78 "If the cursor is on the same line as a well formed Maple command, \+ hitting the " }{TEXT 351 6 "Return" }{TEXT 352 44 " key will cause the command to be executed. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT 350 210 "Sometimes commands are several lines long and yo u don't want Maple to execute it till you have typed in all the lines. To do this one needs to know how to go to another output line without getting a new prompt." }{TEXT -1 27 " That is, how to suppress " } {TEXT 339 4 ">. " }{TEXT 353 21 "In such cases use of " }{TEXT 340 12 "Shift-Return" }{TEXT -1 16 " (hold down the " }{TEXT 341 5 "Shift " }{TEXT -1 5 " and " }{TEXT 342 6 "Return" }{TEXT -1 85 " keys at the same time) will accomplish this. \n\nIf the above doesn't work look u nder " }{TEXT 344 4 "Edit" }{TEXT -1 16 " and go down to " }{TEXT 343 13 "Preferences. " }{TEXT -1 10 "Make sure " }{TEXT 345 29 "Execute In put with Return Key" }{TEXT -1 24 " is checked. Otherwise " }{TEXT 347 6 "Return" }{TEXT -1 74 " will move one to the next line and exe cution will occur only with the " }{TEXT 346 5 "Enter" }{TEXT -1 5 " \+ key." }{TEXT 348 0 "" }{TEXT -1 105 "\n\nBefore continuing make sure y ou can type in the following without getting more that the initial pro mpt " }{TEXT 354 1 ">" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "for i from 1 to 3 do \n print(\"Hello\");\nend do;\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 " " 0 "" {TEXT -1 20 "for .. do .. end do" }}{EXCHG {PARA 0 "" 0 "" {TEXT 403 5 "Loops" }{TEXT -1 4 " or " }{TEXT 404 8 "do loops" }{TEXT -1 156 " provide a way to repeat operations a specified number of time s--possibly till you find what you may be looking for.) They are best understood by examples:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "for i from 1 to 5 do \n i,i ^2,i^3;\nend do;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 214 "Now we illus trate a common technique for adding a large number of terms. There is \+ nothing special about SUM as a variable. We could use any name for thi s variable. We will find the sum of the integers 1 through 10." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "SUM:=0;" }{TEXT -1 59 " ( Note that we start by setting the variable SUM to 0.)" }{MPLTEXT 1 0 1 " " }{TEXT -1 0 "" }{MPLTEXT 1 0 2 " \n" }{TEXT -1 0 "" }{MPLTEXT 1 0 46 "for i from 1 to 10 do \n SUM:=SUM + i; \nend do;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Note the value of i after the loop has be en executed:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "i;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "The value of SUM after the loop ha s been executed:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "SUM;" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "To suppress the intermediate step s we may do the following:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "SUM:=0:\nfor i from 1 to 10 do \n SUM:= SUM + i; \nend do:\nSUM;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "Now we compute " }{XPPEDIT 18 0 "Sum(1/k,k = 1 .. 100);" "6#-%$SumG6$*&\"\"\"F'%\"kG!\"\"/F(;F'\"$+ \"" }{TEXT -1 63 ": This time we use the variable total to keep track \+ of the sum." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "total:=0:\nf or k from 1 to 100 do \n total:=total+1/k; \nend do:" }{TEXT -1 0 "" } {MPLTEXT 1 0 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "total; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "evalf(total);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 261 "" 0 "" {TEXT -1 23 "if ... then ... end if " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 355 31 "Before giving an example of \+ an " }{TEXT 360 22 "if ... then ... end if" }{TEXT 361 52 " statement \+ we discuss the mod procedure. The command" }{TEXT 359 9 " n mod d " } {TEXT -1 67 "gives the remainder when the integer n is divided by the \+ integer d:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "12 mod 10;" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "12 mod 2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "12 mod 6;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "Note that if " }{TEXT 358 11 "n mod d = 0" }{TEXT -1 13 " then d is a " }{TEXT 356 6 "factor" }{TEXT -1 4 " or " }{TEXT 357 7 " divisor" }{TEXT -1 38 " of n. Let's find all divisors of 126;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "n:=126;\nfor d from 1 to n d o \n if n mod d = 0 then \n print(d); \n end if;\nend do;" } {TEXT -1 0 "" }{MPLTEXT 1 0 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "Another example using the " }{TEXT 362 22 "if ... then ... end if " }{TEXT -1 14 " construction." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "for k from 1 to 100 do\n if k^2 < 100 then \n print(k); \n end if;\nend do;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 50 "Finding the Set of Positive Di visors of an Integer" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "Now we show how to form the " }{TEXT 364 3 "set " }{TEXT -1 34 " of all positive divisors of 126.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "printlevel:=2: " }{TEXT -1 45 "This allow s us to see what's happening below:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "n:=126:\nS:=\{\}; " }{TEXT -1 49 "Start with the empt y set which is denoted by \{ \}." }{MPLTEXT 1 0 81 "\nfor d from 1 to \+ n do\n if n mod d = 0 then \n S:=S union \{d\}; \n end if;\nend do; \n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "d,S;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Note the " }{TEXT 363 22 "if .. then ... e nd if;" }{TEXT -1 15 " construction. " }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 318 "Next we built a procedure \+ to find the set of all positive divisors of any integer n. Notice the warning messages when we execute the statement defining the procedure . Also notice that Maple reprints the procedure if you end the definit ion with ; . We remedy both of these problems in the following correc ted version." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "Divisors:= proc(n)\nS:=\{\}:\nfor d from 1 to n do\n if n mod d = 0 then \n S:= S union \{d\}; \n fi;\nod;\nreturn S;\nend;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "Divisors:=proc(n)\nlocal S,d;\nS:=\{\}:\nfor d \+ from 1 to n do\n if n mod d = 0 then S:=S union \{d\}; fi;\nod;\nretur n S;\nend:\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 284 "Make it a habit \+ to end a procedure with : instead of ; to save output--especially whe n printing your worksheet. Also ALWAYS declare all variables used in a procedure to be local as we do above, unless there is a good reason n ot to do so. Later we will discuss the difference between " }{TEXT 365 5 "local" }{TEXT -1 5 " and " }{TEXT 366 6 "global" }{TEXT -1 98 " variables.\n\nNow lets test the procedure Divisors: Try something fir st that we know the answer to:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "Divisors(1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "Div isors(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "Divisors(6);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "Divisors(126);\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "Divisors(12345);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 14 "More Examples " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Let's loo k again at how to compute a sum " }{XPPEDIT 18 0 "Sum(i^2,i = 1 .. 4); " "6#-%$SumG6$*$%\"iG\"\"#/F';\"\"\"\"\"%" }{TEXT -1 85 ". Let's try t o make it general by introducing a variable n and setting it equal to \+ 4:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "n:=4:\nTotal:=0:\nfor i from 1 to n do\n Total:=Total+i^2:\nend do:\nTotal;\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "Lets make a procedure to compute " } {XPPEDIT 18 0 "Sum(i^2,i = 1 .. n);" "6#-%$SumG6$*$%\"iG\"\"#/F';\"\" \"%\"nG" }{TEXT -1 34 " for any given positive integer n:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 121 "F:=proc(n)\n local i,Total;\n To tal:=0:\n for i from 1 to n do\n Total:=Total+i^2:\n end do;\n r eturn Total;\nend proc:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "F(4);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "F(1000);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "Here is a procedure named H which has the property that H(n) = big if n is greater than 100 and H(n) = little if not." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "H:=proc (n)\nif n > 100 then \n return big; \nfi;\nreturn little;\nend:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 220 "Note that if n > 100 is true then H immediately returns the value big and therefore does not proceed to the next statement. On the other hand, if n > 100 is false then Maple skips down to the last line a returns little. " }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 7 "H(221);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "H(11);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 19 "Cutting and Pasting" }}{PARA 0 " " 0 "" {TEXT -1 180 "One may cut, copy and past text and Maple input a nd output pretty much at will. I will illustrate this in class, by cop ying the above program below and making it into a procedure. " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "n:=4:\nTotal:=0:\nfor i from 1 to n do\n Total:=Total+i^2:\nend do:\nTotal;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 " " 0 "" {TEXT -1 39 "Order of Execution of Commands in Maple" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 372 "In a si ngle execution group Maple executes the commands from top to bottom in order systematically. However, if you go back and change some computa tion in a different execution group then it does not change the follow ing results unless the entire worksheet is executed once more. Here is a simple example. Because of the time factor this can only be illustr ated in class: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "x:=2;" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "y:=3;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 7 "z:=x*y;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "z;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 190 "Now go back and cha nge the 2 in the line x:=2 to a 5 and execute that command. Notice tha t the value of z has not changed. To change the value of z to 15 we m ust re-execute the line z:=x*y." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "z;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 224 "Of course, we would not have this problem if we put all the three commands in a single ex ecution groups as follows: But after changing the 2 to a 5 in x:=2; we must execute the execution group for the changes to take effect." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "x:=2:\ny:=3:\nz:=x*y:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "z;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 37 "Assignme nt 0 (Due Monday, January 15)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 367 10 "P roblem 1." }{TEXT -1 50 " \n\n(a) Start a new worksheet. Make a title \+ called " }{TEXT 370 12 "Assignment 0" }{TEXT -1 11 " using the " } {TEXT 405 1 "P" }{TEXT -1 1 " " }{TEXT 368 11 "Title style" }{TEXT -1 44 ". Follow the heading by your name using the " }{TEXT 369 14 "P Aut hor style" }{TEXT -1 25 ". [See the above section " }{TEXT 406 24 "Bas ic Worksheet Handling" }{TEXT -1 161 " if you don't know how to do thi s.] \n \n(b) Still using the methods described in the above section B asic Worksheet Handling type in the following verbatim using " }{TEXT 407 10 "Inset Text" }{TEXT -1 5 " and " }{TEXT 408 20 "Insert Standard Math" }{TEXT -1 94 " to do the comment containing the integral: [Also execute each of the three Maple commands.]\n\n" }{TEXT 409 1 ">" } {MPLTEXT 1 0 9 " restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "It i s easy to compute " }{MPLTEXT 1 0 0 "" }{XPPEDIT 18 0 "Int(sin(x)*x^2, x = 0 .. 1);" "6#-%$IntG6$*&-%$sinG6#%\"xG\"\"\"*$F*\"\"#F+/F*;\"\"!F+ " }{TEXT -1 42 " using Maple. One simply types the command" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "int(sin(x)*x^2,x=0..1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "To find the approximate floating point va lue of the integral we apply evalf as follows:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 410 11 "\nProblem 2." }{TEXT -1 1 " " }{TEXT 411 3 " \n\n" }{TEXT -1 25 "( a) Show using Maple that" }{TEXT 412 1 " " }{XPPEDIT 18 0 "sqrt(2)+sqr t(3) = pi;" "6#/,&-%%sqrtG6#\"\"#\"\"\"-F&6#\"\"$F)%#piG" }{TEXT -1 38 " is correct to three decimals digits, " }{TEXT 425 33 "but is not \+ correct to more than 3" }{TEXT -1 94 ". [Hint: Use evalf(x,3) to obtai n x to 3 decimal digits.]\n\n(b) Show that you know how to use " } {TEXT 426 12 "Shift-Return" }{TEXT -1 106 " by typing the following M aple input. [You are not doing it correctly if you have more than one \+ prompt ( " }{TEXT 413 1 ">" }{TEXT -1 31 " ).] Also execute the progra m. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "for i from 1 to 3 do \nprint(`Number `|| i ||`.`);\nend do;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 414 9 "Problem 3" }{TEXT -1 63 " . \n\nUse Maple to find the value of each of the following:\n\n(a) " } {XPPEDIT 18 0 "int(sin(x)*cos(x)^2,x);" "6#-%$intG6$*&-%$sinG6#%\"xG\" \"\"*$-%$cosG6#F*\"\"#F+F*" }{TEXT -1 28 " [indefinite integral]\n\n(b ) " }{XPPEDIT 18 0 "int(sin(x)*cos(x)^2,x = 1 .. 3);" "6#-%$intG6$*&-% $sinG6#%\"xG\"\"\"*$-%$cosG6#F*\"\"#F+/F*;F+\"\"$" }{TEXT -1 106 " [de finite integral exact value]\n\n(c) The floating point value of the i ntegral in (b) to 10 digits.\n\n(d) " }{XPPEDIT 18 0 "diff(x*exp(x)*si n(x),x);" "6#-%%diffG6$*(%\"xG\"\"\"-%$expG6#F'F(-%$sinG6#F'F(F'" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 416 10 "Problem \+ 4." }{TEXT -1 46 " \n\nLet f be the function defined by the rule " }} {PARA 0 "" 0 "" {TEXT -1 18 "\n " }{XPPEDIT 18 0 "f(x) = sin(x)*(exp(x)+x^2+x+1);" "6#/-%\"fG6#%\"xG*&-%$sinG6#F'\"\"\",*-%$ expG6#F'F,*$F'\"\"#F,F'F,F,F,F," }{TEXT -1 3 ". \n" }}{PARA 0 "" 0 "" {TEXT -1 54 "Use each of the three methods described in Lecture 1 (" } {TEXT 430 14 "arrow, unapply" }{TEXT -1 5 " and " }{TEXT 431 4 "proc" }{TEXT -1 124 ") to define this function in Maple and find the value o f f(x) to 10 digits for each of the following values of x: 0, 1. \+ " }{TEXT 437 36 "After each case execute the command " }{MPLTEXT 1 0 8 "restart;" }{TEXT 438 27 "before doing the next case." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 415 2 "\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 37 "Assignment \+ 1 (Due Monday, January 22)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 439 275 "From now on: 25% will be deducted from each assignment which does not conform to the format described in Ass ignment 0 Problem 1 (a). Also some points will be deleted for any pro cedure that use local variables that are not declared to be local in t he body of the procedure. " }{TEXT 427 12 "\n\nProblem 1." }{TEXT -1 58 " \n(a) Write a program using a do loop to compute the sum " } {XPPEDIT 18 0 "sum((2/3)^n,n = 2 .. 100);" "6#-%$sumG6$)*&\"\"#\"\"\" \"\"$!\"\"%\"nG/F,;F(\"$+\"" }{TEXT -1 9 ". Apply " }{TEXT 428 5 "eva lf" }{TEXT -1 94 " to obtain a floating point approximation to the sum .\n\n(b) Write a program that will find the " }{TEXT 429 3 "set" } {TEXT -1 107 " S of all positive integers less than 1000 that have 11 \+ as a factor. [n has 11 as a factor if and only if " }{XPPEDIT 18 0 "` mod`(n,11) = 0;" "6#/-%$modG6$%\"nG\"#6\"\"!" }{TEXT -1 2 ".]" }} {PARA 0 "" 0 "" {TEXT 422 12 "\nProblem 2. " }{TEXT -1 20 "\n\nWrite a procedure " }{TEXT 440 7 "ISPRIME" }{TEXT -1 199 " whose input is a p ositive integer n and whose output is true if n is prime and false oth erwise. Test the procedure on the following numbers: 1 (not a prime), 2, 3, 4, 111, 531, 7919, and 262681. " }{TEXT 433 5 "Hint:" }{TEXT -1 36 " Here's a start for the program:\n\n> " }{MPLTEXT 1 0 111 " ISP RIME:=proc(n)\n local d;\n if n < 2 then return false; end if;\n \+ if n = 2 then return true; end if;\n \n" }{TEXT -1 47 "Note that if n < 2 then the third line causes " }{TEXT 441 10 "ISPRIME(n)" } {TEXT -1 55 " to return false. If n = 2 then the fourth line causes " }{TEXT 442 7 "ISPRIME" }{TEXT -1 388 " to return true. If neither is t rue then n is at least 3. So now you only need to handle in the rest \+ of the program the case that n is at least 3. This can be done by usin g a loop to check whether or not n is divisible by an integer d from 2 to n-1. If you find such a value of d you want to return false. If th e loop is completed without finding any such d then you should return \+ true.\n" }}{PARA 0 "" 0 "" {TEXT 432 6 "Remark" }{TEXT -1 48 ". Maple \+ actually has a built-in procedure named " }{TEXT 436 7 "isprime" } {TEXT -1 47 " which performs the same task as the procedure " }{TEXT 443 7 "ISPRIME" }{TEXT -1 15 " in Problem 2. " }}{PARA 0 "" 0 "" {TEXT -1 1 "\n" }{TEXT 423 10 "Problem 3." }{TEXT -1 35 " \n\nWrite a \+ do loop which compares " }{TEXT 444 10 "ISPRIME(n)" }{TEXT -1 33 " wi th Maple's built-in procedure " }{TEXT 418 10 "isprime(n)" }{TEXT -1 50 " for n from 1 to 1000, giving an output only if " }{TEXT 445 10 "ISPRIME(n)" }{TEXT -1 6 " and " }{TEXT 446 10 "isprime(n)" }{TEXT -1 29 " differ. So if your program " }{TEXT 447 7 "ISPRIME" }{TEXT -1 75 " is correct you should get no output for the program. [Note tha t Maple for " }{XPPEDIT 18 0 "x <> y;" "6#0%\"xG%\"yG" }{TEXT -1 4 " i s " }{MPLTEXT 1 0 6 "x <> y" }{TEXT -1 2 ".]" }}{PARA 0 "" 0 "" {TEXT 424 11 "\nProblem 4." }{TEXT -1 27 " \n\n(a) Write a procedure, " } {TEXT 419 8 "primesum" }{TEXT -1 92 ", whose input is a positive integ er n and whose output is the sum of all primes p such that " } {XPPEDIT 18 0 "p <= n;" "6#1%\"pG%\"nG" }{TEXT -1 37 ". You may use ei ther your procedure " }{TEXT 448 7 "ISPRIME" }{TEXT -1 42 " from prob lem 4 or the built-in procedure " }{TEXT 420 9 "isprime. " }{TEXT -1 37 "Test the procedure for n = 2, 4, 100." }}{PARA 0 "" 0 "" {TEXT -1 25 "\n (b) Write a procedure, " }{TEXT 434 8 "primeset" }{TEXT -1 93 " , whose input is a positive integer n and whose output is the set of \+ all primes p such that " }{XPPEDIT 18 0 "p <= n;" "6#1%\"pG%\"nG" } {TEXT -1 86 ". You may use either your procedure ISPRIME from problem 4 or the built-in procedure " }{TEXT 435 9 "isprime. " }{TEXT -1 37 " Test the procedure for n = 2, 4, 100." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT 421 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 417 1 " \+ " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}}{MARK "0 1 0" 16 }{VIEWOPTS 0 0 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }