メモ

A:matrix([0,0,0,-(L+2*M),0],[0,0,0,-L,0],[0,0,0,0,-M],[-1/P,0,0,0,0],[0,0,-1/P,0,0]);
B:matrix([0,0,0,0,-L],[0,0,0,0,-(L+2*M)],[0,0,0,-M,0],[0,0,-1/P,0,0],[0,-1/P,0,0,0]);
C:A*cos(x)+B*sin(x);
[vals,vecs]:trigsimp(eigenvectors(C));
vals;
                M        M          2 M + L        2 M + L
(%o) [[- sqrt(-), sqrt(-), - sqrt(-------), sqrt(-------), 0], 
                P        P             P              P
                                                               [1, 1, 1, 1, 1]]
a2:-vecs[1][1]*cos(x)*sin(x)*M*2;
a4:-vecs[2][1]*cos(x)*sin(x)*M*2;
a1:trigsimp(vecs[3][1]*(2*cos(x)^2*M+L));
a5:trigsimp(vecs[4][1]*(2*cos(x)^2*M+L));
a3:ratsubst(-cos(x)^2,cos(x)^2*sin(x)^2/(cos(x)^2-1),vecs[5][1]*sin(x)^2);
R:transpose(matrix(a1,a2,a3,a4,a5));
load("diag");
D:diag([-sqrt(L+2*M)/sqrt(P),-sqrt(M)/sqrt(P),0,sqrt(M)/sqrt(P),sqrt(L+2*M)/sqrt(P)]);
Dm:diag([-sqrt(L+2*M)/sqrt(P),-sqrt(M)/sqrt(P),0,0,0]);
Dp:diag([0,0,0,sqrt(M)/sqrt(P),sqrt(L+2*M)/sqrt(P)]);
fullratsimp(trigsimp(R^^(-1).C.R),M);
fullratsimp(trigsimp(R.D.R^^(-1)),M);
Cp:fullratsimp(trigsimp(R.Dp.R^^(-1)),M);
Cm:fullratsimp(trigsimp(R.Dm.R^^(-1)),M);
load(f90)
f90(Cp);
f90(Cm);
  • ratsubst(a,b,c)は表現cの中のbをaに変えるコマンド
  • f90は自由形式で吐き出す.
  • texはtex形式で吐き出す.
  • [vals,vecs]:trigsimp(eigenvectors(C));固有値をvalsに固有ベクトルをvecsに入れる.
  • 固有ベクトルの取り出し方はvecs[*][1].
  • trigsimpは三角関数をキレイにする.あまり頑張れない.
maxima.txt · 最終更新: 2011/12/26 19:12 by saito
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0