hello I add a program for calculate matrix function. mat_function(analytic function,matrix) return f(matrix) this calculation is based on Cauchy integral formular. if f(x) is analytic and mat=diag([JF(m1,n1),,JF(mk,nk)]), then f(mat)=ModeMatrix*diag([f(JF(m1,n1)),,f(JF(mk,nk))])*ModeMatrix^^(-1) this method is only one of them,6~8or more other methods exist. so I cannot insist on this being best.but I think it very useful. please try jordan.dem (C1) batch("jordan.dem"); or usualy load("diag.mc") . After this,I intend to write a program for Clifford Agebra, so I have not Atensor package,and like a CLICAL is more efficent with maxima. please tell me if anyone already wrote this or writting that.any advice is appreciated. thanks. Gosei Furuya (go_furuya@infoseek.jp) > CC: willisb@www.ma.utexas.edu > > Hi happy new year. > > I add Modematrix for jordan form. > please test this. > Maybe,I hope this code is robust. > After test,I hope to add this in share/mat at new version. > > By cauchy integral formula,if f(x) is analytic and > mat=diag([JF(m1,n1),,JF(mk,nk)]),then > f(mat)=(ModeMatrix)^^-1*diag([f(JF(m1,n1)),,f(JF(mk,nk))])*ModeMatrix. > Now,we can allmost calc this way.soon I write a program for(f(JF(m1,n1)). > > (D1) diag.mc > (C2) load("data1.mc"); > > (D2) data1.mc > (C3) a > ; > > [ 2 0 0 0 0 0 0 0 ] > [ ] > [ 1 2 0 0 0 0 0 0 ] > [ ] > [ - 4 1 2 0 0 0 0 0 ] > [ ] > [ 2 0 0 2 0 0 0 0 ] > (D3) [ ] > [ - 7 2 0 0 2 0 0 0 ] > [ ] > [ 9 0 - 2 0 1 2 0 0 ] > [ ] > [ - 34 7 1 - 2 - 1 1 2 0 ] > [ ] > [ 145 - 17 - 16 3 9 - 2 0 3 ] > (C4) jordan(a); > > (D4) [[2, 3, 3, 1], [3, 1]] > (C5) mm:ModeMatrix(a,jordan(a)); > > [ 0 0 1 0 0 0 0 0 ] > [ ] > [ 0 1 0 0 0 1 0 0 ] > [ ] > [ 1 - 4 0 0 1 0 0 0 ] > [ ] > [ 0 2 0 0 0 0 1 0 ] > (D5) [ ] > [ 2 - 7 0 0 2 0 0 0 ] > [ ] > [ 1 9 0 0 0 0 2 0 ] > [ ] > [ 15 - 34 0 - 1 7 0 0 0 ] > [ ] > [ 0 28 - 117 0 - 2 15 1 1 ] > (C6) (mm^^-1).a.mm; > > [ 2 1 0 0 0 0 0 0 ] > [ ] > [ 0 2 1 0 0 0 0 0 ] > [ ] > [ 0 0 2 0 0 0 0 0 ] > [ ] > [ 0 0 0 2 1 0 0 0 ] > (D6) [ ] > [ 0 0 0 0 2 1 0 0 ] > [ ] > [ 0 0 0 0 0 2 0 0 ] > [ ] > [ 0 0 0 0 0 0 2 0 ] > [ ] > [ 0 0 0 0 0 0 0 3 ] > > > Gosei Furuya (go_furuya@infoseek.jp) > > > > > > > > > > > > sample > > > > (C1) load("diag.mc"); > > > > Warning - you are redefining the MACSYMA function EIGENVALUES > > Warning - you are redefining the MACSYMA function EIGENVECTORS > > (D1) diag.mc > > a is above matrix. > > > > (C3) jordan(a); > > > > (D3) [[2, 3, 3, 1], [3, 1]] > > (C4) dispJordan(%); > > > > [ 2 1 0 0 0 0 0 0 ] > > [ ] > > [ 0 2 1 0 0 0 0 0 ] > > [ ] > > [ 0 0 2 0 0 0 0 0 ] > > [ ] > > [ 0 0 0 2 1 0 0 0 ] > > (D4) [ ] > > [ 0 0 0 0 2 1 0 0 ] > > [ ] > > [ 0 0 0 0 0 2 0 0 ] > > [ ] > > [ 0 0 0 0 0 0 2 0 ] > > [ ] > > [ 0 0 0 0 0 0 0 3 ] > > (C5) minimalPoly(d3); > > > > 3 > > (D5) (x - 3) (x - 2) > > (C6) diag([JF(1,7),x,JF(3,2)]); > > > > [ 1 1 0 0 0 0 0 0 0 0 ] > > [ ] > > [ 0 1 1 0 0 0 0 0 0 0 ] > > [ ] > > [ 0 0 1 1 0 0 0 0 0 0 ] > > [ ] > > [ 0 0 0 1 1 0 0 0 0 0 ] > > [ ] > > [ 0 0 0 0 1 1 0 0 0 0 ] > > (D6) [ ] > > [ 0 0 0 0 0 1 1 0 0 0 ] > > [ ] > > [ 0 0 0 0 0 0 1 0 0 0 ] > > [ ] > > [ 0 0 0 0 0 0 0 x 0 0 ] > > [ ] > > [ 0 0 0 0 0 0 0 0 3 1 ] > > [ ] > > [ 0 0 0 0 0 0 0 0 0 3 ] > > > > this program is GPL. > > Gosei Furuya (go_furuya@infoseek.jp) > > > > > > > > > http://toolbar.infoseek.co.jp/?svx=971148 >
Attached file: diag.mc
Attached file: jordan.dem