{VERSION 6 0 "IBM INTEL LINUX" "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 }{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 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }2 0 0 -1 -1 -1 0 0 0 0 0 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 }2 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 40 "Click the + below \+ to expand the section." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 27 "Some ve ry basic Maple usage" }}{PARA 0 "" 0 "" {TEXT -1 118 "First off, I don 't know Maple nearly as well as Mathematica. But this is just -- as yo u see above -- very basic usage." }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 43 "End lines with a semicolon, then hit enter." }}{PARA 0 "" 0 "" {TEXT -1 111 "Somewhat nicer than Mathematica, you can just use semico lons and hit enter to get Maple to evaluate your input." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sin(pi/ 2);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 217 " One exception is getting help. Using a question mark and the name of a function pops up some help on that function. Of course, that's not te rribly helpful if you don't know the name of the function in the first place:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "?sin" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 162 "I don't know of a introduction to Maple that's similar to Jon \+ Rogness' Lab 1A for Mathematica. Please email me suggestions if you kn ow of one (drake@math.umn.edu)" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 31 "Lowercase letters. Parentheses." }}{PARA 0 "" 0 "" {TEXT -1 53 "Maple is sortof the anti-Mathematica in this respect." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 26 "factor(x^2 + 2*x*y + y^2);" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "simplify(HermiteH (3,x));" }{TEXT -1 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 27 "Defining your own functions" }}{PARA 0 " " 0 "" {TEXT -1 91 "Of course, this has to be totally different from M athematica. Always use := for assignment:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "a := 12;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "b := x*y;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "st egasaurus := plot(sin(t)*cos(t), t=0..Pi);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 93 "Defining a function is sortof w eird if you're familiar with Mathematica or C/C++/Java syntax:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "f : = (x,y,z) -> x + y + z + Pi;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "asms := n -> product((3*j+1)!/(n+j)!,j=0. .n-1);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 331 "Maple has two commands for product: the one above, and \"mul\". T he \"mul\" command is treated in a less sophisticated way: Maple reall y just multiplies all the values together. Apparently \"product\" trie s to apply basic transformations to see if the given function reduces \+ to something known. I'm not entirely clear on the distinction." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 19 "Recursive functions" }}{PARA 0 " " 0 "" {TEXT -1 99 "The Recursive Function Pedagogy Police will undoub tedly arrest me if I don't start with factorials:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "zoog := n -> n * zo og(n-1); zoog(0) := 1; zoog(1) := 1;" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 264 "Note I've put several commands on a \+ single line. The semicolons make it unambiguous that I have three comm ands in mind. If you want linebreaks, you can hit Shift-Enter. The mea nings of \"Enter\" and \"Shift-Enter\" are precisely switched between \+ Mathematica and Maple." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "zoog(6);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 37 "Let's also do orthogonal polynomials." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "p : = (n,x) -> (x-b(n-1))*p(n-1,x) + l(n-1)*p(n-2,x); p(0,x) := 1; p(-1,x ) := 0;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 158 "As long as you define your base cases, everything will work fine. Note that if you ask for, say p(1.5, x), it will complain because it \+ never hits a base case." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 181 "As in Mathematica, if we define the b and l functio ns, we'll get a particular sequence of polynomials. Until then, Maple \+ just says \"b(5)\", etc, because it doesn't know what that is." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 22 "Other useful functions" }}{PARA 0 "" 0 "" {TEXT -1 148 "factor, expand, and simplify are basically the same as in Mathematica, but I'm not aware of a version of the \"//\" \+ notation. Also collect and expand:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "collect(expand(JacobiP(3,a,b ,x)),a);" }{TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 98 "Oops, we still have a and b defined and it gets co nfused. We'll use unassign (more on this later):" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "unassign('a'); unas sign('b');" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "Try it again and it will work now." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 111 "We also have the series function. Its parameters are: thing to be expanded, x=expand_about_this_point, order." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "series((1-sqrt(1-4*x))/(2*x), x=0, 8);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 29 "Everybody loves coef ficients." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "5!*coeff(series(exp(x*t+t^2/2),t=0,6),t^5);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 225 "Note that Mapl e expands a series to one less than the given order; in the above seri es, the last term is \"O(t^6)\" when we say \"to order 6\". In Mathema tica, it would find the first 6 coefficients and say \"O(t^7)\" for th e rest." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 169 "Instead of Table, we can use \"seq\" which generates a sequence. \+ There's a \"table\" function in Maple but I think it works a bit diffe rently. seq does what we want, though:" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 167 "hermitematching := (n,x ) -> sum('binomial(n,2*k)*doublefactorial(2*k-1)*x^(n-2*k)','k'=0..flo or(n/2));\n\nhermitematching2 := (n,x) -> 2^(-n/2)*HermiteH(n,x*sqrt(- 1/2));" }{TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 46 "Let's see if these polynomials still match up:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "seq (simplify(hermitematching(n,x)/hermitematching2(n,x)),n=0..10);" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 24 "Making notes to yourself" }} {PARA 0 "" 0 "" {TEXT -1 191 "While in a cell, hit Ctrl-T to turn it i nto text. When you want to go back to a math cell, hit Ctrl-M. There's also buttons at the top you can use: the \"T\" for text, and \"[ >\" \+ for math input." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 "Insert -> Section, Subsection make these nifty collapsibl e sections." }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 " " {TEXT -1 59 "Jane, stop this crazy thing (dealing with the Maple ker nel)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 74 "Y ou can reset all your variables and definitions with the command resta rt:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 152 "If you want to stop Maple's evaluation, hit the button on the \+ toolbar marked with a stop sign. That's probably the most intuitive bu tton on the toolbar." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 65 "There's also \"unassign\" which corresponds to Mathemat ica's Clear:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "a := Pi/2;" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "unassign(a);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 84 "Oops, it evaluated \+ \"a\". Use single quotes to prevent Maple from turning a into Pi/2:" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "unassign('a');" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "The value of a has been forgotton:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "a;" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 163 "The analogue o f Delete All Output is in the Edit menu: Edit -> Remove Output. You ca n select some cells and remove the output from that, or do the whole w orksheet." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 12 "Getting help" }}{PARA 0 "" 0 "" {TEXT -1 359 "To look up a certain topic or function, use He lp -> Topic Search (or Full Text Search). The help browser isn't very \+ good; you can't look up another function without going through the men us again. It also doesn't respect any window resizing if you minimize \+ the window and bring it back up. It's generally pretty easy to figure \+ out how the syntax works, though." }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 9 "Dan Drak e" }}{PARA 257 "" 0 "" {TEXT -1 18 "drake@math.umn.edu" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "1" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }