{VERSION 5 0 "IBM INTEL LINUX" "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 }{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 0 1 1 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 }{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 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 74 " \+ " }{TEXT 256 0 "" } {TEXT 257 29 "Introduction to Amazing MAPLE" }}{PARA 0 "" 0 "" {TEXT -1 2 " " }{TEXT 258 9 "Lab #0: " }{TEXT -1 22 " PLC-2 (Calculus III )" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 2 " " } {TEXT 259 6 "Date: " }{TEXT -1 21 " August 27, 2004" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 12 "Intr oduction" }}{PARA 0 "" 0 "" {TEXT -1 98 "The goal for this MAPLE lab i s simply to get MAPLE running on all laptops and to learn basic MAPLE " }}{PARA 0 "" 0 "" {TEXT -1 51 "syntax and a few of its many powerful capabilities." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "Let's begin with two useful Maple commands." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restar t;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 114 "The first command is just a good \+ habit; it ensures that you start with a clean slate. It makes most sen se when you" }}{PARA 0 "" 0 "" {TEXT -1 111 " have been using Maple fo r a while and want to delete all of your previous values in Maple's me mory. The second" }}{PARA 0 "" 0 "" {TEXT -1 110 " command loads a lib rary containing a bunch of neat commands for making computer graphics. One of Maple's high" }}{PARA 0 "" 0 "" {TEXT -1 81 " points is the si mplicity with which it does graphics and aids our visualization." } {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 10 "Arithmetic " }}{PARA 0 "" 0 "" {TEXT -1 114 "The default precision for numerical \+ calculations in Maple is ten digits past the decimal point. But Maple \+ hates to" }}{PARA 0 "" 0 "" {TEXT -1 111 "make such approximations. So it always gives exact answers, unless (1) you force it to approximate with evalf()" }}{PARA 0 "" 0 "" {TEXT -1 108 "or (2) one of the input s to the calculation is already in floating-point format. Try the foll owing commands:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "3/7;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "3./7;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 5 "x:=5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "y:=3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "x/y;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 112 " Here is how we force Maple to give us a decimal approximation to the previous output (note % means \+ \"ditto\")." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "ev alf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "y/x;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "Pi*x;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 " y/exp(1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 94 " If we require more or less accur ate answers, we may change the global Maple parameter Digits" } {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "Digits := 100; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalf( y/x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evalf(y/exp(1) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "Digits := 10;" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 43 "Two ways to define functions (mathematica l)" }}{PARA 0 "" 0 "" {TEXT -1 125 "When I say \"function\", I am not \+ referring to computer subroutines, which Maple calls functions; I mean functions as in class." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "f := x^2 + 3*x - 1;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Oops! I for got that x already had a value. So I \"undefine\" it:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "x := 'x';" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "f := x^2 + 3*x - 1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=2,f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "diff(f, x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "Second derivative, anyone? " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "diff(f,x,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "Now I will present the more classy way to set u p the same function:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "g := x -> \+ x^2 + 3*x -1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 " With this notation, the differential operator D ret urns another function!" }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "D(g);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "D(D (g));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 " Even this is a function ! Let's plug in x=7 and see what happens:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "%(7);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "Composit ion of functions is achieved via the @ symbol:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := x -> cos(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "f @ g;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "g \+ @ f;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "(g@f)(4);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "h := D(g@f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "h(2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 127 "Okay, so even though the above expression for h(x) = [ 2 cos(x) + 3 ] sin(x) seems strange, it works correctly when we use it. " }{MPLTEXT 1 0 0 "" }}}}}{MARK "5" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }