Trying to learn Tensors and understand how to input tensor equations into Maxima
Subject: Trying to learn Tensors and understand how to input tensor equations into Maxima
From: Viktor T. Toth
Date: Fri, 14 Apr 2006 14:12:19 -0400
Herb,
First of all, Maxima (itensor) is very picky about covariant vs.
contravariant indices. There is no such thing as kdelta_{ij}; there is only
such a thing as kdelta_i^j, and you need to keep this in mind when entering
itensor equations. (I personally quite approve of this, as it emphasises the
fact that covariant vs. contravariant quantities are geometrically quite
different things, even in a rectilinear coordinate system where the
algebraic difference might not be apparent.)
With that in mind, your particular problem can be entered as follows:
(%i1) load(itensor)$
(%i2) defcon(a,b,kdelta);
(%o2) done
(%i3) components(T([-i]),g([r,-i])*a([-r,-s])*y([s]));
(%o3) done
(%i4) components(y([i]),b([i,r])*x([-r]));
(%o4) done
(%i5) ishow(T([-i]))$
%1 %2 i
(%t5) a g y
%1 %2
(%i6) ishow(ev(%,y))$
%1 %2 %3 i
(%t6) a x g b
%1 %2 %3
(%i7) ishow(contract(%))$
%3 i %1
(%t7) x g kdelta
%1 %3
(%i8) ishow(contract(%))$
%1 i
(%t8) x g
%1
By way of explanation, line 2 sets up the contraction rule for ab; line 3
sets up the tensor T; line for sets up the tensor y (I am assuming that you
made a typo below, and y_i=b_{ir}x^r, i.e., the x^r part was omitted by
accident). Line 5 show T^i; line 6 evaluates y within this expression; and
lines 7 and 8 carry out the contractions to arrive at the desired result.
Coordinate transformations and specific metrics are best handled not by
itensor but by ctensor. (Loosely speaking, you can think of itensor as the
"abstract index" package that you use when you don't (yet) care about the
metric; ctensor comes in when you work in a specific metric and start
evaluating the actual components of a tensor.)
Viktor
-----Original Message-----
From: maxima-admin at math.utexas.edu [mailto:maxima-admin at math.utexas.edu] On
Behalf Of Herb Martin
Sent: Friday, April 14, 2006 1:14 PM
To: maxima at math.utexas.edu
Subject: RE: [Maxima] Trying to learn Tensors and understand how to input
tensor equations into Maxima
> I'm not familiar with the books that you listed. Can you give
> some specific
> examples of the types of equations that you'd like to enter
> into Maxima?
>
>
> Viktor
Thank you for help.
I will provide some examples below although I am
a little concerned that my specific examples are
misleading.
My goal is more to learn to do this than to solve
a particular problem, as my idea is to work through
any or all of the typical introduction to Tensors in
the context of GR.
I feel a quite illiterate trying to even figure
out whether to use CTensor, ITensor, or ATensor.
(By the way, I forgot to mention that I have also
been looking at the examples in the tutorial demo
you provided.)
One problem I started with is from Schaum's page 3,
Example 1.7 (and is quite easily done even by me):
Given: T^i = g_r^i a_rs y_s and y_i = b_ir and
further a_ir b_rj = kdelta_ij
Find T^i in terms of X_r
First write y_s - b_st x_t then by subsitution:
T^i = g_r^i a_rs b_st x_t
= g_r^i kdelta_rt x_i
= g_r^i x_r
kdelta = kroniker_delta
After that I just wanted to work through general
coordinate transformations and metrics.
--
Herb Martin
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima