On March 25, 2007 9:55 AM Ondrej Certik wrote: > > I am new to Axiom, I am studying theoretical physics (4th grade) > in Prague and I want to use the computer algebra system as a > physicist and I understand that mathematicians are looking at > the mathematics from a completely different angle than physicists.
I have some doubts about that claim. But I guess this is not really the issue you want to discuss. :-) > But anyway, I want this: > > I have a diagonal matrix: > > gdd=Matrix(( > (-exp(nu(r)),0,0,0), > (0, exp(lam(r)), 0, 0), > (0, 0, r**2, 0), > (0, 0, 0, r**2*sin(theta)**2) > )) > > that is a metric tensor on a 4 dimensional manifold with signature > (-,+,+,+), this corresponds to g_\mu_\nu (i.e. the indices are > lowered). No I want to calculate the Christoffel symbols -> riemann > tensor -> ricci tensor. > > the x^\mu vector are variables (t, r, theta, phi). The nu(r) and > lam(r) are unknown functions of "r". I am interested in the > (differential) equations for the unknown functions nu(r) and lam(r) > that I get by setting: > > R_\mu_\nu = 0 > > If you need some more explanation, I'll be glad to explain > the details. > > In maple I can use the grtensor > > http://grtensor.org/ > > package, but I find the maple not suitable for me, as I want to > use the symbolic manipulation in my programs and I don't want to > use the ugly maple language. > If you could suppress your revulsion of the Maple language, then I could send you information about a package I wrote a few years ago called TensorLite. I used it to do symbolic manipulation of tensors in Maple V release 5 for calculations similar to that which you describe. If you have Maple, you should be able to read this: http://synthesis.anikast.ca/maple/mathematics/tensor5c.mws If you have any interest, just let me know. With a little effort I could probably remember what I was doing at that time... > I found all the other symbolic packages unsuitable for me, so > I wrote my own: > > http://code.google.com/p/sympy/ > Yes, isn't that the way things go in computer algebra - everyone seems to write their own? :-( That's a pity. If what you really want to do is physics, then it's a trap that many people have fallen into. It took me a long time to get over that stage. > And in SymPy I can now do it quite easily: > > http://sympy.googlecode.com/svn/trunk/examples/relativity.py > > SymPy is just a general package and all I am using from it > are just symbolic matrices. (I am lowering and raising indices > by myself in the relativity.py example). Actually I looked at SumPy a while back on Google Code. I think its pretty cool. Do you know anything about Sage? Sage is another computer algebra system that is written in Python, but they incorporate a lot of other open source math software packages such as Maxima, Gap, gmp, mpfr, etc. to do things not implemented in native Python. Perhaps they would be interested in SymPy for it's symbolic capabilities. > > I was curious - how could I do the same in Axiom? > I would recommend that you consult the Axiom book: http://wiki.axiom-developer.org/Mirrors?go=/public/book2.pdf&it=Axiom+Book section 9.7 CartesianTensor for some examples of how tensors are currently implemented in Axiom. In some respects the support is rather primitive but on the other hand one can take advantage of the symbolic capabilities of the rest of the Axiom system. You will also need: section 1.13 Differential Equations (introduction) and section 8.10 Solution of Differential Equations Using these two parts of Axiom in principle it should not be too difficult to do the calculations you want to do. On the other hand if I ever somehow find some more time, I would really like to implement much better support for tensors, differential forms and abstract multilinear operators on vector spaces in general (see for example related sections 9.14 DeRhamComplex, and 9.10 CliffordAlgebra). But that might be me just falling into the same old trap again. Maybe it would be better to wait for someone else to come along and do it for me. ;) > ... Kind Regards, Bill Page. _______________________________________________ Axiom-mail mailing list Axiomemail@example.com http://lists.nongnu.org/mailman/listinfo/axiom-mail