4 in this package, a vector shoud be transformed to a form.
5 for example,[a,b,c]<---->a*Dx+b*Dy+c*Dz (so called work form)
6 [a,b,c]<---->a*Dy@Dz+b*Dz@Dx+c*Dx@Dy (so called fluid form)
7 vtof1,vtof2 need the scale_factor,so not to use f_star(),to use fstar_with_clf()
8 or under global environment ( see lorentz_example.txt)
10 (%i17) fstar_with_clf([x,y,z],[x,y,z],vtof1([a,b,c]));
11 (%o17) c Dz + b Dy + a Dx
12 (%i18) fstar_with_clf([x,y,z],[x,y,z],vtof2([a,b,c]));
13 (%o18) a Dy Dz - b Dx Dz + c Dx Dy
14 (%i19) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
16 (%o19) b Dth sin(phi) r + c Dphi r + a Dr
17 (%i20) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
20 (%o20) a Dphi Dth sin(phi) r + c Dr Dth sin(phi) - ---------
22 (%i21) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
24 (%o21) [1, sin(phi) r, r]
26 A2. grad,rot or curle,div,laplacian
27 grad(f) is d(f),if A is vector,a:vtof1(A) then rot(A) is h_st(d(a)),or nest2([h_st,d],a)
28 h_st() is hodge star operator,div(f) is h_st(d(h_st(f))),laplacian(f) is d(h_st(d(f)))
29 or-1(d(antid(a))+antid(d(a)))s ok generally
32 (%i22) fstar_with_clf([x,y,z],[x,y,z],(depends(f,[x,y,z]),d(f)));
34 (%o22) Dz -- + Dy -- + Dx --
36 (%i23) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)]
37 ,(depends(f,[r,th,phi]),d(f)));
39 (%o23) Dth --- + Dr -- + Dphi ----
43 (%i24) fstar_with_clf([x,y,z],[x,y,z],(depends([a,b,c],[x,y,z]),aa:vtof1([a,b,c]),
46 (%o24) -- Dz - -- Dz - -- Dy + -- Dy + -- Dx - -- Dx
48 (%i25) format(%,%poly(Dx,Dy,Dz),factor);
50 (%o25) (-- - --) Dz - (-- - --) Dy + (-- - --) Dx
52 (%i29) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
53 (depends([a,b,c],[r,th,phi]),aa:vtof1([a,b,c]),h_st(d(aa))))$
55 (%i30) format(%,%poly(Dr,Dth,Dphi),factor);
57 Dphi (-- sin(phi) r + b sin(phi) - ---)
59 (%o30) --------------------------------------- - Dth sin(phi) (-- r + c - ----)
62 Dr (---- sin(phi) + b cos(phi) - ---)
64 - -------------------------------------
68 (%i31) fstar_with_clf([x,y,z],[x,y,z],(depends([a,b,c],[x,y,z]),aa:vtof1([a,b,c]),
71 (%o31) -- Dx Dy Dz + -- Dx Dy Dz + -- Dx Dy Dz
73 (%i32) fstar_with_clf([x,y,z],[x,y,z],(depends([a,b,c],[x,y,z]),aa:vtof1([a,b,c]),
74 nest2([h_st,d,h_st],aa)));
79 (%i33) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
80 (depends([a,b,c],[r,th,phi]),aa:vtof1([a,b,c]),nest2([h_st,d,h_st],aa)));
83 c cos(phi) dth dphi 2 a da
84 (%o33) ---------- + ---------- + ---- + --- + --
85 sin(phi) r sin(phi) r r r dr
88 (%i34) fstar_with_clf([x,y,z],[x,y,z],(depends(f,[x,y,z]),nest2([d,h_st,d],f)));
91 (%o34) Dx Dy Dz --- + Dx Dy Dz --- + Dx Dy Dz ---
94 (%i36) fstar_with_clf([x,y,z],[x,y,z],(depends(f,[x,y,z]),nest2([h_st,d,h_st,d],f)));
97 (%o36) --- + --- + ---
100 (%i37) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
101 (depends(f,[r,th,phi]),nest2([h_st,d,h_st,d],f)));
105 2 -- ---- cos(phi) 2 2 2
107 (%o37) ---- + ------------- + ------------ + ----- + ---
109 sin(phi) r sin (phi) r r dr
110 (%i38) fstar_with_clf([r,th,phi],[r*sin(phi)*cos(th),r*sin(phi)*sin(th),r*cos(phi)],
111 (depends(f,[r,th,phi]),nest2([d,h_st,d],f)));
114 (%o38) Dphi Dr Dth --- sin(phi) r + 2 Dphi Dr Dth -- sin(phi) r
122 + Dphi Dr Dth ----- sin(phi) + ---------------- + Dphi Dr Dth ---- cos(phi)
125 A3. Example for vorticity
126 problem: in R3 we think velocity field v=rot(A),div(A)=0,so A is vector potential.
127 prove voricity w=rot(v) satisfy ¦¤A= -w
128 a solution: as restricted 2 spaces,A can be posed,a1*Dx+a2*Dy.
130 (%i40) fstar_with_clf([x,y,z],[x,y,z],(depends([a1,a2],[x,y]),A:a1*Dx+a2*Dy,
131 nest2([h_st,d,h_st,d],A)));
134 (%o40) - ---- Dy + ----- Dy + ----- Dx - ---- Dx
138 from condition ,div(A)=0
139 (%i41) fstar_with_clf([x,y,z],[x,y,z],(depends([a1,a2],[x,y]),A:a1*Dx+a2*Dy,d(h_st(A))));
141 (%o78) --- Dx Dy Dz + --- Dx Dy Dz
143 d(a2)/dy+d(a1)/dx=0 ,then d^2(a1)/dxdy= -d^2(a2)/dx^2,d^2(a2)/dxdy=-d^2(a1)/dy^2
145 ¦¤A is -(d(antid(A))+antid(d(A))
146 (%i42) fstar_with_clf([x,y,z],[x,y,z],(depends([a1,a2],[x,y]),A:a1*Dx+a2*Dy,-(nest2([d,antid],A)+nest2([antid,d],A))));
149 (%o42) ---- Dy + ---- Dy + ---- Dx + ---- Dx
154 but in this case,old fashion style is good with ¦¤A=grad(div(A)-rot(rot(A))
156 B.Changing integral variable more than two variables
158 B1.this is from ¦£(z)*¦£(1-z)
159 changing integral variable more than two variables,such like
160 (%i55) f_star([u,v],(s:u/(v+1),t:u*v/(v+1),exp(-(s+t))*s^(-z)*t^(z-1)*d(s)@d(t)))$
161 (%i57) format(%o55,%poly(u,v),factor);
166 (%o57) ------------------------------
168 this integral,v,[0,inf],u,[0,inf] is %pi/sin(%pi) (=beta(z,1-z))
170 B2. from entrance exam. of graduate course in japan
171 (1)integrate x+y+z=u,y+z=u*v,z=u*v*w,on 0<u<1,0<v<1,0<w<1 by pullback (x^2+y^2+z^2)dxdydz
173 (%i43) solve([x+y+z=u,y+z=u*v,z=u*v*w],[x,y,z]);
174 (%o43) [[x = u (1 - v), y = u v (1 - w), z = u v w]]
175 (%i45) f_star([u,v,w],(x:u*(1-v),y:u*v*(1-w),z:u*v*w,(x^2+y^2+z^2)*d(x)@d(y)@d(z)));
177 (%o45) Du Dv Dw u v (u v w + u v (1 - w) + u (1 - v) )
179 (%i46) defint(defint(defint(u^2*v*(u^2*v^2*w^2+u^2*v^2*(1-w)^2+u^2*(1-v)^2),w,0,1)
184 slightly easy problem
185 (2) (d^2/dx^2+d^2/dy^2)(log(sqrt(x^2+y^2)))
187 (%i38) fstar_with_clf([x,y],[x,y],(d(h_st(d(log(sqrt(x^2+y^2)))))))$
188 (%i39) format(%,%poly(Dx,Dy),factor);
191 (3) Integrate (x*Dx@Dy) on x^2/a^2+y^2/b^2<=1,x>=0,y>=0
193 (%i40) fstar_with_clf([x,y],[x,y],(depends([a1,a2],[x,y]),d(a1*d(x)+a2*d(y))));
195 (%o40) --- Dx Dy - --- Dx Dy
197 (%i41) fstar_with_clf([x,y],[x,y],(d(1/2*x^2*Dy)));
199 1/2*x^2*Dy x=a*cos(th),y=b*sin(th) on boundary you may use line integrate.
203 we must pay attention to effects of some singularity and of topology (De Rham cohomology )
204 this points is most difficult to calculate multivariable integral in CAS,I think.
205 see Frankel book "The Geometry of PHYSICS" p162 5.5 Finding Potential.
208 (%i74) f_star([phi,theta],(pu1:sin(phi)*cos(theta),pu2:sin(phi)*sin(theta),pu3:cos(phi),
209 pu1*d(pu2)@d(pu3)+pu2*d(pu3)@d(pu1)+pu3*d(pu1)@d(pu2)))$
210 (%i76) trigsimp(%o74);
211 (%o76) Dphi Dtheta sin(phi)
212 So this map induce (x,y)-->(pu1,pu2,pu3) IxI--->S2,boundary 1X1 -->one point.
213 %o76 is volume form in S2,if we can pull back IxI,we integrate this and say
214 this integral value is n*4pai. n is a integer.
215 (%i79) f_star([x,y],(depends([p1,p2,p3],[x,y]),p1*d(p2)@d(p3)+p2*d(p3)@d(p1)+p3*d(p1)@d(p2)));
217 dp2 dp3 dp2 dp3 dp1 dp3 dp1 dp3
218 (%o79) p1 (Dx Dy --- --- - Dx Dy --- ---) + p2 (Dx Dy --- --- - Dx Dy --- ---)
219 dx dy dy dx dy dx dx dy
221 + (Dx Dy --- --- - Dx Dy --- ---) p3
224 (%o79) is written by using vector,(p1,p2,p3).{(d/dx(p1,p2,p3)Xd/dy(p1,p2,p3))*Dx@Dy}
225 integrate with IxI,this is homotopy invariant.
226 generally speaking,in exchaing coordinates, vector equations are not always invariant but differntial forms are invariant. so we can calculate forms with
227 some suitable or fit coordinate,then by pulling back it with general ones.
229 C.Integral factor (always possible locally,but not global)
231 locally necessary and sufficient condition is d(w)@w=0. so if f^-1 is integral factor
232 ,d(w)=d(log|f|)@w . usually we use frobenius method(or theorem) but I propose a new method
235 (%i72) fstar_with_clf([x,y,z],[x,y,z],trans_toexact(y*z*d(x)+x*z*d(y)+d(z)));
237 Dz u1 y z + Dz u2 x z - Dx u3 y - Dy u3 x
238 (%o72) -------------------------------------------
241 u1,u2,u3 is scale factor.
242 integral factor do'nt depends on metric,so u1->0,u2->0. or u2->0,u3->0 so on.
243 this is a quantization from clifford algebra to grassmann algebra.
245 (%i74) limit(limit(%o72,u1,0),u2,0);
247 (%i75) limit(limit(%o72,u3,0),u2,0);
251 now w is y*z*d(x)+x*z*d(y)+d(z),by %o74 d(w)=(- Dx y - Dy x)@w,
252 d(log|f|)=-( Dx y + Dy x)=-d(x*y),f^(-1)=%e^(x*y) is integral factor.
253 by %o75 d(w)=Dz/z @w,d(log|f|)=Dz/z,f^(-1)=1/z is also integral factor.
254 but %e^(x*y)is better than 1/z. see Flanders P92,93.
256 D. Poission bracket (symplectic form,symplectic manifold)
258 for example symplectic manifold dim 6,it has 2form named to symplectic forms.
259 1. w is closed form 2. w^3==w@w@w is not 0 everywhere .
260 (if dim 2*m,w^mis not0)
261 (%i39) f_star([p1,q1,p2,q2,p3,q3],(omega:Dp1@Dq1+Dp2@Dq2+Dp3@Dq3,omega@omega@omega));
262 (%o39) - 6 Dp1 Dp2 Dp3 Dq1 Dq2 Dq3
263 (%i40) f_star([p1,q1,p2,q2,p3,q3],(omega:Dp1@Dq1+Dp2@Dq2+Dp3@Dq3,d(omega)));
265 so this omega is simplectic form.
266 Poission bracket is definded as coordinates free
267 inner(Xf,(inner(Xg,omega))),and inner(Xg,omega) is d(g).
268 (%i42) f_star([p1,p2,p3,q1,q2,q3],(depends([g],[p1,p2,p3,q1,q2,q3]),omega:Dp1@Dq1+Dp2@Dq2
269 +Dp3@Dq3,inner(diff(g,q1)*Dp1-diff(g,p1)*Dq1+diff(g,q2)*Dp2-diff(g,p2)*Dq2+diff(g,q3)*Dp3
270 -diff(g,p3)*Dq3,omega)));
272 (%o42) Dq3 --- + Dq2 --- + Dq1 --- + Dp3 --- + Dp2 --- + Dp1 ---
273 dq3 dq2 dq1 dp3 dp2 dp1
274 because poission bracket is defined
275 by inner(Xf,d(g)) in this package p_braket().
277 (%i55) f_star([p1,q1,p2,q2,p3,q3],(depends([f,g],[p1,q1,p2,q2,p3,q3]),p_braket(f,g)));
278 df dg df dg df dg df dg df dg df dg
279 (%o55) --- --- + --- --- + --- --- - --- --- - --- --- - --- ---
280 dp3 dq3 dp2 dq2 dp1 dq1 dq3 dp3 dq2 dp2 dq1 dp1
284 (%i63) f_star([p1,q1,p2,q2,p3,q3],(depends([f,g,h],[p1,q1,p2,q2,p3,q3]),
285 p_braket(p_braket(f,g),h)+p_braket(p_braket(g,h),f)+p_braket(p_braket(h,f),g)))$
288 (%i67) f_star([p1,q1,p2,q2,p3,q3],(depends([f,g,h],[p1,q1,p2,q2,p3,q3]),
289 p_braket(f,g*h)-g*p_braket(f,h)-h*p_braket(f,g)))$
293 Is canonical? [p,q]--->[P,Q]
294 (%i69) f_star([p,q],(P:q*cot(p),Q:log(sin(p)/q),d(P)@d(Q)))$
297 DP@DQ=Dp@Dq show canonical coordinates each other.
298 if H is hamiltonian, d(q)/dt=p_braket(q,H),d(p)/dt=p_braket(p,H)
299 (%i71) f_star([p1,q1,p2,q2,p3,q3],(depends([f,g,h],[p1,q1,p2,q2,p3,q3]),
300 p_braket(f*g,h)-f*p_braket(g,h)-g*p_braket(f,h)))$ is 0
301 if p_braket(g,H)=0 and p_braket(f,H)=0 (f,g is first integral),then
302 p_braket(f*g,h)=0 so f*g is a first integral too.
303 from jacobi identity p_braket(f,g) is also first integral.