Determinants on Maple Or Matlab

Determinants on Maple Or Matlab

18.06 at ESG Spring, 2000 Determinants on Maple or Matlab As promised, there is much more that can be done with Athena software to avoid long computations. What I'll do is include instructions for both Maple and Matlab in this document, with the assumption that the reader has seen and used some of the previous notes that give the basic instructions for the respective pro- grams. One thing that may be seen is that, as with Guass-Jordan elimination, matrices are easier to enter and manipulate in Matlab than in Maple. It's your choice, of course. Finding inverses and solving systems of equations can be done, as demonstrated in previous notes, by using Gauss-Jordan elimination (row reduction, or reduced rwo-echelon form); however, there are more direct commands on either program. These notes will consider the following examples, all from the Problems Sections of Apostol, Volume II. • Page 80, Problem 4(c), for Maple only, as it requires symbolic manipulation. The problem is, in effect, find the determinant of 2 3 1111 6 abcd7 4 5: a2b2c2d2 a3b3c3d3 •Page 80, Problem 4(e), as an example of a long calculation that reduces to one's ability to type. The problem is, in effect, to find the determinant of 2 3 111111 6 −−−7 6 1111117 6 −− 7 6 1111117: 6 −− − 7 4 1111115 1−11−111 1−1−111−1 •Page 95, Problem 5(a), solving the system x +2y+3z=8 2x−y+4z=7 −y+z=1; 1 rendered in matrix form as 2 323 23 123 x 8 4 1−1454y5=475: 5(a) 0−11 z 1 The ASCII commands that appear here are in the file detcoms and may be cut and pasted into your Maple or Matlab session. It might be easier to do so one command at a time. Maple As in previous notes, the Maple prompt, >, will be given but should not be typed. Also, returns should be made only at the end of a command. As with the previous uses, load the linear algebra package with >with(linalg): and enter the matrix with >A1:=matrix([[1,1,1,1],[a,b,c,d],[a^2,b^2,c^2,d^2], [a^4,b^4,c^4,d^4]]) The determinant is found with >det(A1); While true, this is not the best form, and is not the form in which the answer appears in the text. We can recover this form with >factor(%); where the percent sign, %, tells Maple to apply the command to the previous line. To find the determinant of a larger matrix with numerical entries, enter >A2:=matrix([[1,1,1,1,1,1],[1,1,1,-1,-1,-1],[1,1,-1,-1,1,1], [1,-1,-1,1,-1,1],[1,-1,1,-1,1,1],[1,-1,-1,1,1,-1]]); being very careful with all the commas and brackets. (Remeber, if you want to break a line without entering a command, its Shift-Return.)Then, >det(A2); returns the desired answer. To solve the system given as 5(a) above, enter the matrices >B1:=matrix([[1,2,3],[2,-1,4],[0,-1,1]]); >C1:=matrix([[8],[7],[1]]); Sovling the system by multiplying by an inverse involves typing out the words as >D1:=multiply(inverse(B1),C1); Matlab 2 As before, the Matlab prompt >> will be given here but should not be typed. To enter a matrix with numerical values, the command is >>A=[111111;111-1-1-1;11-1-111; 1,-1-11-11;1-11-111;1-1-111-1] followed by >>det(A) To solve the system 5(a), enter the matrices as >>B=[123;2-14;0-11] >>C = [8;7;1] where in the last command, note that the semicolons mean that a column matrix has been entered. Solving the system is quite easy in Matlab: >D=B\C where the backslash \ means \multiply by the inverse of B on the left". 3.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us