{VERSION 2 3 "IBM INTEL NT" "2.3" } {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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 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 }{CSTYLE " " -1 256 "" 0 1 0 0 0 0 0 1 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 "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 0 "" }}{PARA 0 "" 0 "" {TEXT 256 52 "A demonstration of using Maple for LU decomposition" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 37 "Loading Maple l inear algebra package:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(lina lg);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7^r%.BlockDiagonalG%,GramSchmi dtG%,JordanBlockG%)LUdecompG%)QRdecompG%*WronskianG%'addcolG%'addrowG% \$adjG%(adjointG%&angleG%(augmentG%(backsubG%%bandG%&basisG%'bezoutG%,b lockmatrixG%(charmatG%)charpolyG%)choleskyG%\$colG%'coldimG%)colspaceG% (colspanG%*companionG%'concatG%%condG%)copyintoG%*crossprodG%%curlG%)d efiniteG%(delcolsG%(delrowsG%\$detG%%diagG%(divergeG%(dotprodG%*eigenva lsG%,eigenvaluesG%-eigenvectorsG%+eigenvectsG%,entermatrixG%&equalG%,e xponentialG%'extendG%,ffgausselimG%*fibonacciG%+forwardsubG%*frobenius G%*gausselimG%*gaussjordG%(geneqnsG%*genmatrixG%%gradG%)hadamardG%(her miteG%(hessianG%(hilbertG%+htransposeG%)ihermiteG%*indexfuncG%*innerpr odG%)intbasisG%(inverseG%'ismithG%*issimilarG%'iszeroG%)jacobianG%'jor danG%'kernelG%*laplacianG%*leastsqrsG%)linsolveG%'mataddG%'matrixG%&mi norG%(minpolyG%'mulcolG%'mulrowG%)multiplyG%%normG%*normalizeG%*nullsp aceG%'orthogG%*permanentG%&pivotG%*potentialG%+randmatrixG%+randvector G%%rankG%(ratformG%\$rowG%'rowdimG%)rowspaceG%(rowspanG%%rrefG%*scalarm ulG%-singularvalsG%&smithG%&stackG%*submatrixG%*subvectorG%)sumbasisG% (swapcolG%(swaprowG%*sylvesterG%)toeplitzG%&traceG%*transposeG%,vander mondeG%*vecpotentG%(vectdimG%'vectorG%*wronskianG" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 13 "Enter matrix " }{XPPEDIT 18 0 "A" "I\"AG6\"" }{TEXT -1 1 ":" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "A:=matrix([[1,1,1],[1,5,4],[2,3,7]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"AG-%'MATRIXG6#7%7%\"\"\"F*F*7%F*\"\"&\"\"%7%\" \"#\"\"\$\"\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "The first transformation matrix corresponding to the r ow operation:" }}{PARA 0 "" 0 "" {TEXT -1 67 " \+ -1*(Row 1) + (Row 2) ---> (Row 2)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "E:=matrix([[1,0,0 ],[-1,1,0],[0,0,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"EG-%'MATR IXG6#7%7%\"\"\"\"\"!F+7%!\"\"F*F+7%F+F+F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 20 "Check the result of " } {XPPEDIT 18 0 "EA" "I#EAG6\"" }{TEXT -1 12 ". the entry " }{XPPEDIT 18 0 "A[21]" "&%\"AG6#\"#@" }{TEXT -1 14 " is eliminated" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalm(E&*A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7%7%\"\"\"F(F(7%\"\"!\"\"%\"\"\$7%\"\"#F,\" \"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "The transformation matrix intended to kill " }{XPPEDIT 18 0 "A[ 31]" "&%\"AG6#\"#J" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "F:=matrix([[1,0,0],[0,1,0],[-2,0,1]]);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%\"FG-%'MATRIXG6#7%7%\"\"\"\"\"!F+7%F+F*F+7%!\" #F+F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 20 "Check the result of " }{XPPEDIT 18 0 "FEA" "I\$FEAG6\"" } {TEXT -1 1 ":" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalm(F&*E&*A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7%7%\"\"\"F(F(7%\"\"!\"\"%\"\"\$7%F*F(\"\"&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "The trans formation matrix intended to kill " }{XPPEDIT 18 0 "A[32]" "&%\"AG6#\" #K" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "G:=ma trix([[1,0,0],[0,1,0],[0,-1/4,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #>%\"GG-%'MATRIXG6#7%7%\"\"\"\"\"!F+7%F+F*F+7%F+#!\"\"\"\"%F*" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 48 "Now we should have the upper-triangular matrix " }{XPPEDIT 18 0 "U=GFEA" "/%\"UG%%GFEAG" }{TEXT -1 1 ":" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "U:=evalm(G&*F&*E&*A);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"UG-%'MATRIXG6#7%7%\"\"\"F*F*7%\"\" !\"\"%\"\"\$7%F,F,#\"# " 0 "" {MPLTEXT 1 0 39 "L:=matrix([[1,0,0],[1,1 ,0],[2,1/4,1]]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"LG-%'MATRIXG6# 7%7%\"\"\"\"\"!F+7%F*F*F+7%\"\"##F*\"\"%F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "Check " }{XPPEDIT 18 0 "A=LU" "/%\"AG%#LUG" }{TEXT -1 1 ": " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "evalm(L&*U);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7%7%\"\"\"F(F(7%F(\"\"&\"\"%7%\" \"#\"\"\$\"\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 23 "To solve \+ " }{XPPEDIT 18 0 "u+v+w=1" "/,(%\"uG\"\"\"%\"vGF%%\"wGF%F%" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 28 " " } {XPPEDIT 18 0 "u+5v+4w=0" "/,(%\"uG\"\"\"*&\"\"&F%%\"vGF%F%*&\"\"%F%% \"wGF%F%\"\"!" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 27 " \+ " }{XPPEDIT 18 0 "2u+3v+7w=6" "/,(*&\"\"#\"\"\"%\"uG F&F&*&\"\"\$F&%\"vGF&F&*&\"\"(F&%\"wGF&F&\"\"'" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 9 "i.e. " }{XPPEDIT 18 0 "Ax=b" "/%#AxG%\"bG" } {TEXT -1 7 " with " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "b:=v ector([1,0,6]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG-%'VECTORG6#7 %\"\"\"\"\"!\"\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 13 "First, solve " }{XPPEDIT 18 0 "Lc=b" "/%#LcG%\"bG " }{TEXT -1 5 " for " }{XPPEDIT 18 0 "c" "I\"cG6\"" }{TEXT -1 27 " wit h forward substitution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 " c:=forwardsub(L,b);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"cG-%'VECTOR G6#7%\"\"\"!\"\"#\"#<\"\"%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 12 "The n, solve " }{XPPEDIT 18 0 "Ux=c" "/%#UxG%\"cG" }{TEXT -1 5 " for " } {XPPEDIT 18 0 "x" "I\"xG6\"" }{TEXT -1 28 " with backward substitution :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "x:=backsub(U,c);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"xG-%'VECTORG6#7%\"\"\"!\"\"F)" }}} }{MARK "0 1 0" 25 }{VIEWOPTS 1 1 0 1 1 1803 }