Start Maple from the desktop, Start Menu/Program Files/ or using the icon in f:\"math 1204". Every Maple command must end with a semi-colon ";" for instance > 2+1; The answer will appear in the middle of the line following. Every time I give you a command to use I will give the > symbol. You are free to copy the command from this file and paste into maple, this will ensure you don't make a mistake when typing it in. Multiplication of numbers uses *, division uses / and powers are ^. Pick several integers and combine them using these two symbols and brackets. Don't forget the semi colon! Notice that Maple does not use decimals by default, and neither will I, in class. We can use ":=" to assign a value to a name, usually a letter > a := -5; This is case sensitive, so we can set > A := 4; A common mistake is to forget the : since Maple will still show "A=11" but A will not be assigned the value 11. Verify that a-A and A-a are different. For an unknown variable, Maple will just report that name: > a+b; Now set b to be some randomly chosen integer and note that the line above doesn't change but when you now ask for > a+b; it should give a number now instead. Maple works sequentially so I encourage you to work down the worksheet without editing earlier lines so that the confusion is lessened. ( If you want to you can go back up the worksheet and insert new lines if necessary using control-j or control-k. You can reset a variable's value to unknown using > a:='a'; ) In the other labs I will use capital letters for matrices, sometimes with a number after them, and lower case letters for numbers, but it isn't mandatory. When I introduce a Maple function it is a good idea to read the help page for that function. You can do that for the function sqrt by visiting http://www.maplesoft.com/support/help/Maple/view.aspx?path=sqrt and can search for any other function in that webpage too. You can also do it by using the Maple "Help" menu or by typing > ?sqrt However, ? can be slow to work, and might crash your computer. To recover, press the octagonal red button marked "stop". To exit from the help page, close the subwindow, use alt-tab or the Window menu to move between them. Use sqrt to determine the square roots of A and 10. Notice that, similarly to fractions, square roots are left as is too, unless the number is a perfect square. Maple can also deal with polynomials: > p:=(5-x)*(3*x-1); > q:=x^3-7*x+6; Use the functions expand, factor, solve and int on both p and q and see if the results are as you expected. It is sometimes useful to be able to substitute a value into a polynomial. Use the help menu to find out how to use the function "subs" to find out what value p has when x=-1 and when x=3. We are now ready to do some matrix algebra... Load all of the linear algebra progams with the command: > with(LinearAlgebra); All the new commands listed are now known by Maple, we will use some. We can create a 3x3 matrix by using the following command > B:=<<3,-6,8>|<-1,-6,3>|<2,-5,6>|<0,-4,3>>; It gives the matrix in terms of its rows. Even though we are using this to represent a system of equations Maple doesn't give a dotted line, but we should try to remember it is there. Notice that we again use ":=" to assign a value to B. I recommend using a capital letter for all matrices, but Maple will not insist on that. Recall that Maple is case sensitive, so B is different from b. Note that all of the LinearAlgebra commands also begin with a capital letter, although "matrix" is also defined, it will not always work properly. We can do the three different row operations as follows: > B1:=RowOperation(B,[1,3]); will swap row 1 and row 3 of B and make it into a new matrix B1. > B2:=RowOperation(B1,3,-1); would take this new B1 and multiply row 3 by -1 and make B2 As we talked about in class, these two operations are not usually necessary. The following is the main row operation we will be using: > B3:=RowOperation(B2,[2,1],4); will replace row 2 of B2 by itself plus 4 times row 1 to make B3 I recommend using this scheme of naming each matrix sequentially, and try to not reuse any name, if you don't get the matrix you wanted, just use the next Bnumber matrix with the previous one. Note that the B3 operation will not give you the desired 0 in row 2 of column 2, so change the multiplier used to make a B4 with a 0, then find a new row operation for B4 which will make another 0 in column 2. Note that we have one column with only one 1 and all other elements 0. However, the other two columns do not have a 1 in. Find a series of row operations which creates a new 1 but which does not introduce fractions. Use the 1 created to create two more 0s and hence find the solution to the system of equations represented by B, and check your answer. Note that you can also use the "multiplication of a row" operation to create a 1 immediately, but at the expense of creating fractions. Maple can cope with fractions ok, but I find that it means that more errors will occur if you try them by hand... If you want to practise some more you can create a random matrix as follows: > Seed:=randomize(): C:=RandomMatrix(3,4,generator=rand(-6..5)); Once you are done, call me over and I'll make sure you've got all of your answers correct. You can save your work in your H: drive and it will be available for you to consult in future labs.