1 Maxima 5.9.3 http://maxima.sourceforge.net
2 Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
3 Distributed under the GNU Public License. See the file COPYING.
4 Dedicated to the memory of William Schelter.
5 This is a development version of Maxima. The function bug_report()
6 provides bug reporting information.
7 (%i1) batch("new_cartan_test4.mac");
9 batching #p/home/furuya/sagyo/new_cartan_test4.mac
10 (%i2) load(cartan_new.lisp)
14 (%i6) coords : read(Input new coordinate)
17 (%i7) dim : extdim : length(coords)
18 (%i8) basis : VR : extsub : extsubb : []
20 (%i9) for i thru dim do basis : endcons(concat(D, coords ), basis)
22 (%i10) for i thru dim do (extsub : cons(basis = - basis , extsub ),
24 extsubb : cons(basis = 0, extsub ), ci : concat(v, i), VR : endcons(ci, VR))
27 (%o11) [Dx, Dy, Dz, Dt]
28 (%i12) cliffordtype : read(please input metric type,for example [1,1,1],if E3)
29 please input metric type,for example [1,1,1],if E3
32 (%i13) translist : read(represent the standard coordinates with new one)
33 represent the standard coordinates with new one
35 (%o13) [x, y, z, %i c t]
36 (%i14) norm_table : []
37 (%i15) scale_factor : []
39 (%i17) for i thru dim do (_l : map(lambda([x], diff(x, coords )), translist),
42 _l : map(lambda([x], x ), _l), _p : ratsimp(trigsimp(apply(+, _l))),
45 norm_table : endcons(-------------, norm_table))
54 (%i19) for i thru dim do extsubb2 : cons(basis = -----------, extsub )
58 (%i20) for i thru dim do (a_ : solve(x_ - -----------, [x_]),
61 scale_factor : cons(rhs(a_ ), scale_factor))
63 (%i21) scale_factor : reverse(scale_factor)
66 (%i23) nest2(_f, _x) := block([_a : [_x], i],
67 if listp(_f) then (_f : reverse(_f), for i thru length(_f)
68 do _a : map(_f , _a)) else _a : map(_f, _a), _a )
70 (%i24) nest3(_f, _x, _n) := block([_a, i], _a : [_x],
71 for i thru _n do _a : map(_f, _a), _a)
73 (%i25) aa_ : solve(x_ - apply(*, norm_table), [x_])
74 (%i26) volume : rhs(aa_ )
77 (%i27) volume : ------
79 (%i28) matrix_element_mult : lambda([x, y], x @ y)
80 (%i29) load(hodge_test3.mac)
81 (%i30) load(f_star_test4.mac)
82 (%i31) load(helpfunc.mac)
83 (%i32) load(coeflist.lisp)
84 (%i33) load(format.lisp)
86 (%i35) load(poisson.mac)
87 (%i36) load(frobenius.mac)
88 (%i37) load(curvture2.mac)
89 (%o38) new_cartan_test4.bat
103 /* [e1,e2,e3] is electric field,[b1,b2,b3]is magnetic field
104 in free space Maxwell equation d(F)=0 and d(h_st(F))=0 */
106 (%i44) depends([e1,e2,e3],[x,y,z,t]);
107 (%o44) [e1(x, y, z, t), e2(x, y, z, t), e3(x, y, z, t)]
108 (%i45) depends([b1,b2,b3],[x,y,z,t]);
109 (%o45) [b1(x, y, z, t), b2(x, y, z, t), b3(x, y, z, t)]
110 (%i46) F:(e1*Dx+e2*Dy+e3*Dz)@(c*Dt)+(b1*Dy@Dz+b2*Dz@Dx+b3*Dx@Dy);
111 (%o46) c Dt Dz e3 + c Dt Dy e2 + c Dt Dx e1 + b1 Dy Dz - b2 Dx Dz + b3 Dx Dy
114 (%i48) format(%o47,%poly(Dx,Dy,Dz),factor);
115 de3 de2 db1 de3 de1 db2
116 (%o48) Dt Dy Dz (c --- - c --- + ---) + Dt Dx Dz (c --- - c --- - ---)
118 de2 de1 db3 db3 db2 db1
119 + Dt Dx Dy (c --- - c --- + ---) + (--- + --- + ---) Dx Dy Dz
122 /*to translate this relation to vector ,we introduce d_2 operator which is exterior
123 derivative with space variables only. it is easy to define this.
124 or like as %i152,can use local d operator,maybe this is more comfortable */
126 (%i49) d_2(_pform):=sum(basis[i]@(diff(_pform,coords[i])),i,1,dim-1);
127 (%o49) d_2(_pform) := sum(basis @ diff(_pform, coords ), i, 1, dim - 1)
129 (%i50) d_2(e1*Dx+e2*Dy+e3*Dz);
130 de3 de3 de2 de2 de1 de1
131 (%o50) Dy Dz --- + Dx Dz --- - Dy Dz --- + Dx Dy --- - Dx Dz --- - Dx Dy ---
133 (%i51) format(%,%poly(Dx,Dy,Dz),factor);
134 de3 de2 de3 de1 de2 de1
135 (%o51) Dy Dz (--- - ---) + Dx Dz (--- - ---) + Dx Dy (--- - ---)
139 /* rot(E) <---->h_st(d(E)),div(B) <----> d(h_st(B))
140 and X=0 <--->h_st(X)=0 */
142 (%i52) fstar_with_clf([x,y,z],[x,y,z],d(e1*Dx+e2*Dy+e3*Dz));
143 de3 de3 de2 de2 de1 de1
144 (%o52) Dy Dz --- + Dx Dz --- - Dy Dz --- + Dx Dy --- - Dx Dz --- - Dx Dy ---
146 (%i53) fstar_with_clf([x,y,z],[x,y,z],h_st(d(e1*Dx+e2*Dy+e3*Dz)))$
148 (%i54) format(%,%poly(Dx,Dy,Dz),factor);
149 de3 de2 de3 de1 de2 de1
150 (%o54) Dx (--- - ---) - Dy (--- - ---) + Dz (--- - ---)
154 (%o55) c Dt Dy Dz --- + c Dt Dx Dz --- - c Dt Dy Dz --- + c Dt Dx Dy ---
157 - c Dt Dx Dz --- - c Dt Dx Dy ---
159 (%i56) format(%,%poly(Dx,Dy,Dz),factor);
160 de3 de2 de3 de1 de2 de1
161 (%o56) c Dt Dy Dz (--- - ---) + c Dt Dx Dz (--- - ---) + c Dt Dx Dy (--- - ---)
163 (%i57) diff(b1*Dx+b2*Dy+b3*Dz,t);
165 (%o57) --- Dz + --- Dy + --- Dx
169 (%o58) --- c Dt Dy Dz - --- c Dt Dx Dz + --- c Dt Dx Dy
172 /* from d(F)=0,See %o48,and we find two part
173 1/c*%o58+%o56 ,div(B).each of them is zero. 1/c*%o58+%o56 is equal
174 rot(E)+1/c*d(B)/dt (Faraday's law),%o60 is equal div(B) (=0,nonexistence magnetism) */
176 (%i59) %o48 -(1/c*%o58+%o56)$
178 (%i60) format(%,%poly(Dx,Dy,Dz),factor);
180 (%o60) (--- + --- + ---) Dx Dy Dz
182 (%i61) fstar_with_clf([x,y,z],[x,y,z],d(h_st(b1*Dx+b2*Dy+b3*Dz)));
184 (%o61) --- Dx Dy Dz + --- Dx Dy Dz + --- Dx Dy Dz
186 /*you may continue d(h_st(F)),see Flanders "Differential Forms with Applications
187 to the Physical Sciences"4.6 Maxwell's Field Equations P45~P47.