{VERSION 6 0 "IBM INTEL NT" "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 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 56 "Systems of linear equat ions and Gauss elimination method" }}{PARA 0 "" 0 "" {TEXT -1 108 "In \+ this worksheet you will see some example of how to write and solve lin ear systems with the Maple package." }}{PARA 0 "" 0 "" {TEXT 257 9 "Ex ample 1" }{TEXT -1 53 ". We solve the following system of linear equat ions: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "solve(\{3*x+y-z=1 ,2*x+5*y+2*z=3\},\{x,y,z\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "L et us try another example:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "solve(\{x+y=1,2*x+2*y=3\},\{x,y\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 375 "It looks like Maple does not want to solve it. Does that mean anything? It is a simple system: we can see that the two equatio ns have proportional coefficients, however, the right hand side of the equations are not proportional with the same constant, so the system \+ is inconsistent. Let's see what we get if we use the elimnation mehod. We will use matrix notation this time." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "with(LinearAlgebra);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "A:=<<1,2>|<1,2>>;# the coefficient matrix" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "b:=<<1,3>>;# the right hand side of the equations" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ReducedRo wEchelonForm();" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "Now, if \+ we look at the reduced row echaon form of the augmented matrix () we see that the second row corresponds to an equation of the form " } {XPPEDIT 18 0 "0*x+0*y = 1;" "6#/,&*&\"\"!\"\"\"%\"xGF'F'*&F&F'%\"yGF' F'F'" }{TEXT -1 52 " which is impossible, so the system is inconsisten t." }}}{EXCHG {PARA 0 "" 0 "" {TEXT 258 9 "Example 2" }{TEXT -1 179 ". Here is another matrix representing the coefficients of a linear syst em. Write the system corresponding to it and solve the system correspo nding to the augmented matrix ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "A1:=<<3,1>|<1,5>|<-1,1>>;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 10 "b1:=<1,3>;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ReducedRowEchelonForm();" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 259 9 "Example 3" }{TEXT -1 143 ". This example is showing anoth er way of definig matrices in Maple. However, this format is not appro priate for defininig the augmented matrix." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 46 "A2:=Matrix([[2,1,0,3],[-1,0,2,4],[4,-2,7,0]]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "b2:=Matrix([[1],[2],[1]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "ReducedRowEchelonForm(A2) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "Same matrix as above defined as in Examples 1 and 2." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "A3:=<<2,-1,4>|<1,0,-2>|<0,2,7>|<3,4,0>>;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 14 "b3:=<<1,2,1>>;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ReducedRowEchelonForm();" }}}{EXCHG {PARA 0 " " 0 "" {TEXT 260 9 "Example 4" }{TEXT -1 92 ". Let us look at an exerc ise 8(d) section 1.2 (Anton&Rorres). We define te matrix as before:" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "A4:=<<0,1,3,-2,1>|<10,4,2, -8,-6>|<-4,-1,1,2,3>|<1,1,2,-2,0>>;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "b4:=<1,2,5,-4,1>;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ReducedRowEchelonForm();" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 15 "If we want the " }{TEXT 261 8 "solution" }{TEXT -1 53 " to the above system we need to call a Maple package:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "linsolve(A4,b4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "30" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }