{VERSION 3 0 "SGI MIPS UNIX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 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 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Error" 7 8 1 {CSTYLE "" -1 -1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "Assignments in Maple:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A:=3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "B:=4;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"BG\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "B;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "A,B := B,A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>6$%\"AG%\"BG6$\"\"%\"\"$ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "B;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "Not everything needs to be assigned:" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 2 "x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\"xG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "y;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\"yG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "P:= x^3+x^5+12*x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"PG,(*$)%\"xG\"\"$ \"\"\"\"\"\"*$)F(\"\"&F*F+F(\"#7" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 244 "When x is not assigned, you can still use x. Here P is a polynomi al in x. If x had a value, say, an integer, then P wouldn't have becom e a polynomial but it would have been an integer. You can compute valu es of P at x = 1, 2, 3 by substitution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=1,P);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#9 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=2,P);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#k" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=3,P);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"$1$" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "We could do this sequence of subs titutions by the command seq (stands for sequence) as follows. Lets sa y we want to substitute i=1..6 for x:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "seq( subs(x=i,P) ,i=1..6);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6(\"#9\"#k\"$1$\"%O6\"%5L\"%k!)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "seq(i, i=1..6);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6(\"\"\"\"\"#\"\"$\"\"%\"\"&\"\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "Instead of computing the sequence subs(x=1,P), subs(x=2,P), .. we can also compute the sum: subs(x=1,P)+subs(x=2,P)+..." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "add( subs(x=i,P), i=1..6);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"&%*G\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "add(i, i=1..100);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# \"%]]" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "Multiplication:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "mul(i, i=1..30);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"B+++![3jje5>7)fGDl#" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 5 "30! ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"B+++ ![3jje5>7)fGDl#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "ifactor( %);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*6)-%!G6#\"\"#\"#E\"\"\")-F&6# \"\"$\"#9F*)-F&6#\"\"&\"\"(F*)-F&6#F4\"\"%F*)-F&6#\"#6F(F*)-F&6#\"#8F( F*-F&6#\"#<\"\"\"-F&6#\"#>FD-F&6#\"#BFD-F&6#\"#HFD" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 115 "The command ifactor stands for integer factoriza tion. Lets look at two ways you can end a command, with ; or with :" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A:=2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG\"\"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "Vie w the contents of variable A as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Now end the command with a colon i nstead of a semi-colon" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "A: =12^12:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "You see that with a c olon, Maple prints nothing. However, the command (in this case, an ass ignment) did get executed, see:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\".c#[/5;*)" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 85 "Lets look some more at sequences in Maple . The following is an example of a sequence:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "A := 3,4,5,2,3,3,3,1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG6*\"\"$\"\"%\"\"&\"\"#F&F&F&\"\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "Now you can extend the sequence to the le ft, or to the right, or both, as follows:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 11 "A:=A,20,30;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\" AG6,\"\"$\"\"%\"\"&\"\"#F&F&F&\"\"\"\"#?\"#I" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "A:=hello,how,are,you,A,1000;" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%\"AG61%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\" #F*F*F*\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A[1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%&helloG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A[2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% $howG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "A[3];" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%$areG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 101 " There is one special sequence in Maple, namely the empty sequence, den oted by NULL. See what happens:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "A:=NULL,NULL,A,NULL;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG 61%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F*F*F*\"\"\"\"#?\"#I\" %+5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 438 "Maple sequences are very \+ handy. There is one small problem though, and that is if you have a se quence with just 1 element, you can't really tell whether this was jus t an element, or a sequence which happens to have just one element. Be cause of that, it is often more convenient to work with lists in Maple than with sequences. A list in Maple is a sequence with square bracke ts around it. We can make a list of A by the following command:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "A:=[A];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG71%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F *F*F*\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "We c an again look at individual elements, A[1], A[2] and such. The followi ng command tells you the number of elements in the list:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "nops(A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "A[15] ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"%+5" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 11 "A[nops(A)];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"%+ 5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 183 "To get the last element, yo u can do A[nops(A)]; A slightly shorter syntax, but which does exactl y the same, is A[-1], which gives you the last element. A[-2] is the s econd last, etc." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "A[-1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "A[-2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#I" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "A[-3];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "The comma nd seq can be used to do a certain computation on all elements of the \+ list. For example, compute the sequence of squares:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "seq(i^2, i=A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "61*$)%&helloG\"\"#\"\"\"*$)%$howGF&F'*$)%$areGF&F'*$)%$yo uGF&F'\"\"*\"#;\"#D\"\"%F1F1F1\"\"\"\"$+%\"$+*\"(+++\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "Or the list of squares:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "[seq(i^2, i=A)];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71*$)%&helloG\"\"#\"\"\"*$)%$howGF'F(*$)%$areGF'F(*$)%$ youGF'F(\"\"*\"#;\"#D\"\"%F2F2F2\"\"\"\"$+%\"$+*\"(+++\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 266 "Or the set of squares. A set in Maple is a sequence with curly brackets \{\} around it. Of course, if you have elements that appear more than once, the extra ones will be removed, \+ and also the order has no meaning for sets so the ordening of the elem ents could change." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "\{seq (i^2, i=A)\};" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<.\"\"\"\"\"%\"\"*\"# ;\"#D\"$+**$)%&helloG\"\"#\"\"\"*$)%$howGF-F.*$)%$areGF-F.*$)%$youGF-F .\"$+%\"(+++\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "We can use the \+ A[-1], A[-2], construction to reverse the list:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 29 "[ seq(A[-i], i=1..nops(A)) ];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71\"%+5\"#I\"#?\"\"\"\"\"$F(F(\"\"#\"\"&\"\"%F(%$y ouG%$areG%$howG%&helloG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 258 "We ha ve seen how you can convert a sequence to a list, with [ ], or to a se t, with \{\}. The converse is also possible. You can remove the [ ] or the \{ \} brackets by the op command. This is also useful if you want to convert a list to a set or a set to a list." }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71%&hello G%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F(F(F(\"\"\"\"#?\"#I\"%+5" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "B:=op(A);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%\"BG61%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\" #F*F*F*\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "C:=\{op(A)\};" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"CG<.\"\"\"\" \"#\"\"$\"\"%\"\"&\"#?\"#I%$youG%$areG%$howG%&helloG\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "nops(A), nops(C);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$\"#:\"#7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "nops(B);" }}{PARA 8 "" 1 "" {TEXT -1 60 "Error, wrong number (or ty pe) of parameters in function nops" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "nops([B]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#:" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 444 "As you can see, we converted li st A to a sequence B, and to a set C. Since C had fewer elements than \+ A, we can see that A must have elements that appear more than once. No te that nops does not work for a sequence, but it does work for lists \+ and sets. So, to count the number of elements in a sequence, we have t o put brackets [ ] around it before we can count with nops. Given a li st, we can compute sublists as follows, using the double dot .." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "A[1..1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#%&helloG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "A[1..4];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7&%&helloG%$howG%$areG%$y ouG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "A[1..-1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"& \"\"#F(F(F(\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "A[-3..-1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7%\"#?\"#I\"%+5 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "A[13..15];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7%\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "A[13..-1];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7%\"#? \"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "A[-3..15];" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#7%\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 2 "C;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<.\"\"\" \"\"#\"\"$\"\"%\"\"&\"#?\"#I%$youG%$areG%$howG%&helloG\"%+5" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "C[1..4];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<&\"\"\"\"\"#\"\"$\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "C minus C[1..4];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#< *\"\"&\"#?\"#I%$youG%$areG%$howG%&helloG\"%+5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "The commands minus and union can only be used for sets ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "B;" }}{PARA 11 "" 1 "" {XPPMATH 20 "61%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F'F'F'\" \"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "B[4..6] ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%%$youG\"\"$\"\"%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 153 "We have seen before that if you have an \+ expression involving a variable x, you can replace x by something else with a subs. How to do that for sequences?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "P;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*$)%\"xG\" \"$\"\"\"\"\"\"*$)F&\"\"&F(F)F&\"#7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=0,P);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"! " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "subs(x=1,P);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#9" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71%&helloG%$howG%$areG%$y ouG\"\"$\"\"%\"\"&\"\"#F(F(F(\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "subsop(1=Hi,A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71%#HiG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F(F(F(\"\"\"\"#?\"# I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "A;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#71%&helloG%$howG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F( F(F(\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 152 "Note \+ that this subsop command doesn't actually change A, it just returns A \+ with its first entry replaced by Hi. To change A we have to do an assi gnment:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "A := subsop(1=Hi ,A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG71%#HiG%$howG%$areG%$you G\"\"$\"\"%\"\"&\"\"#F*F*F*\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 24 "A := subsop(2=there, A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG71%#HiG%&thereG%$areG%$youG\"\"$\"\"%\"\"&\"\"#F* F*F*\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 " A := subsop(3=fox, A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG71%#Hi G%&thereG%$foxG%$youG\"\"$\"\"%\"\"&\"\"#F*F*F*\"\"\"\"#?\"#I\"%+5" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "A:=subsop(4=NULL, A);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG70%#HiG%&thereG%$foxG\"\"$\"\"% \"\"&\"\"#F)F)F)\"\"\"\"#?\"#I\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "nops(A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#9" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "Here I replaced entry A[4] by the empty sequence NULL, effectively removing one of the 15 entries. For \+ sets there are different ways to do it." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "C;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<.\"\"\"\"\"#\" \"$\"\"%\"\"&\"#?\"#I%$youG%$areG%$howG%&helloG\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "subs(hello=NULL,C);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<-\"\"\"\"\"#\"\"$\"\"%\"\"&\"#?\"#I%$youG%$areG%$howG \"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "C;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<.\"\"\"\"\"#\"\"$\"\"%\"\"&\"#?\"#I%$youG%$areG%$ howG%&helloG\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "C minu s \{hello\};" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<-\"\"\"\"\"#\"\"$\"\" %\"\"&\"#?\"#I%$youG%$areG%$howG\"%+5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "\{hello,Hello\} minus C;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<#%&HelloG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 249 "In \+ Maple, the variable Hello is different from hello, so lower case and u pper case, that makes a difference. As another example of sets, lets c ompute all numbers that are a square of a positive integer <= 100, and that are also a sum of two squares:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "squares:=\{seq(i^2,i=1..100)\}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "sum_squares := \{ seq(seq( i+j ,i=squares), j=squares) \}:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 200 "I used a colon instead of semi-colon to end the command, to prevent Maple from print ing lots of numbers. To find the answer to the question, we will have \+ to compute the intersection of those two sets:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 30 "squares intersect sum_squares;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6# " 0 "" {MPLTEXT 1 0 36 " [op(squares intersect sum_squares)];" }}{PARA 12 "" 1 "" {XPPMATH 20 " 6#7L\"#D\"$+\"\"$p\"\"%D?\"%Dc\"$D#\"$+*\"$+%\"$*G\"$D'\"$w'\"$T)\"&++ \"\"%c6\"%D7\"%p8\"%@:\"%+;\"%\"o\"\"%+D\"%,E\"%/F\"%4G\"%DI\"%kL\"%+O \"%@P\"%DU\"%CY\"%+\\\"%H`\"%wa\"%%3'\"%+k\"%Cn\"%Ds\"%pv\"%@z\"%+\") \"%\"G)\"%D!*\"%4%*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sort ( % );" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7L\"#D\"$+\"\"$p\"\"$D#\"$*G \"$+%\"$D'\"$w'\"$T)\"$+*\"%c6\"%D7\"%p8\"%@:\"%+;\"%\"o\"\"%D?\"%+D\" %,E\"%/F\"%4G\"%DI\"%kL\"%+O\"%@P\"%DU\"%CY\"%+\\\"%H`\"%wa\"%Dc\"%%3' \"%+k\"%Cn\"%Ds\"%pv\"%@z\"%+\")\"%\"G)\"%D!*\"%4%*\"&++\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 166 "The percentage sign % in Maple V release 5 refers to the last thing Maple evaluated. And %% means the one befo re that, and %%% the one before that (there is no %%%%)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "a:=1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "b:=2; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG\"\"#" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 5 "c:=3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"cG \"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "d:=4;" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%\"dG\"\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "%%;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "At this point, the second last is \+ no longer 3, it's 4." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "%%; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"%" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 2 "a;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "b;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "c;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "%%%;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "%%%;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "%%%; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 2 "a;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"\"" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "b;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "c;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "%;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"$" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "%%%;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }}{MARK "128 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }