-------------------------------------------------------------------------------------- # Math 2270 Sec. 2 MAPLE Assignment #1. --------------------------------------------------------------------------------------- #Here are some commands which you might need for this project. >with(linalg): # Loads the linear algebra routines. >with(plots): #Loads packages to plot graphs of functions >A:=matrix([[1,2,6],[3,4,5],[7,9,11]]); [ 1 2 6 ] A:= [ 3 4 5 ] [ 7 9 11 ] >A[2,3]; # Gives the entry for row 2 and column 3. 5 >rref(A); # Computes the reduced row eachlon form of A. >det(A); # Computes the determinant. -3 >transpose(A); # computes the transpose [ 1 3 7 ] [ 2 4 9 ] [ 6 5 11 ] >det(%); # The % sign is shorthand for the # immediately preceding display. # (determinant of A in this case.) -3 ># Here are some more instructions >band(V,n); # Makes an n x n banded matrix from the # values given for the left and top by the # 2n-1 dimensional vector V. Try # >band([0,1,2,3,4,5,6,7,8,9,10],6); >inverse(A); # computes the inverse. Same as >evalm(A^(-1)); >evalm(A+B); # Adds two matrices. >multiply(A,B); # Multiplies two matrices. Same as # >evalm(A &* B); >minor(A,i,j); # Gives the (n-1) x (n-1) submatrix obtained # by removing the i-th row and j-th column >adj(A); # Computes the transpose of the cofactor matrix. >mulrow(A,i,c); # Creates a new matrix by multiplying the i-th # row of A by the expression c. >addrow(A,i,j,c); # Creates a new matrix by replacing row j of # matrix A with the row formed by # c * row i + row j. >swaprow(A,i,j); # Exchanges row i and row j of matrix A. #PROBLEMS: # (This project was inspired by problems of Multivariable Mathematics with MAPLE, # by J. Carlson & J. Johnson, p.27) #You are to create a document in which you answer the following questions, using a mixture #of MAPLE computations and textual insertions (using # to comment or handwritten text.) #Print out a copy and hand it in. Remember to put your name and section number on your #paper. #Define # ( 2 3 4 ) ( 3 2 1 ) # A = ( 5 6 7 ) , B = ( 4 3 2 ) . # ( 8 9 0 ) ( 5 4 3 ) # 1.a Compute AB and BA. Are they the same? # .b Compute A + B and B + A. Are they the same? # .c Define C to be A + B. Compute C^2 and compare it to # A^2 + 2AB + B^2. # Are they the same? Can you think of a small change you could make in the # expression A^2 + 2AB + B^2 in order to make it equal to C^2 ? # .d Compute the transpose of AB and compare it to the product of the transpose of A # and the transpose of B multiplied in the correct order to get equality. # .e Define v = (1,2,3) to be a vector. Compute Av. # What does MAPLE give you when you try vA? # .f Solve Ax = v in three ways where v is the vector in (1.e): by row reducing # the augmented matrix, by using the command linsolve , and by using the inverse # matrix of A. # #2.a Solve Bx = w where B is as above and w=(1,2,3). Verify that your # solution solves Bx = w. # .b Repeat your work in order to solve Bx = z where z = (1,2,4). Explain # your answer. # #3.a Plot the graph of the line x/2 + 3y=7 on the interval x=2..4 # using both plot and implicitplot commands # # .b By plotting lines (anyway you like) determine if the system of # equations # # 3x+2y=5, 2x-y=3 # # has a solution and if the solution is unique