lastgunslinger

25 Reputation

One Badge

0 years, 43 days

MaplePrimes Activity


These are questions asked by lastgunslinger

I need to take the inverse of a tensor which I have denoted as e[~mu,nu] which is defined by a rather larger Matrix. I had computed this matrix using Mathematica and then simply transferred the resulting matrix by using the calling sequence 

with(MmaTranslator):

which worked swell for transferring said matrix in to Maple. Then using the Physics package I was able to define it as a tensor, with a contravariant and covariant index, respectively. Now, when trying to transfer the inverse of said matrix into Maple to define as a new tensor which I intend to call f[mu,~nu], I get an error saying that the number of free indices on the left hand side does not coincide with the number of free indices on the right hand side. Since, this "new" tensor will really just be the inverse of the matrix which I used to define e[~mu,nu], I was wondering if there was any way in which I can simply compute the inverse of the matrix defining e[~mu,nu] in Maple and then let it be equivalent to f[mu,~nu], afterwhich I would then define it as a new tensor itself. 

 

Research_project.mw

Any help would be greatly appreciated.

I am trying to write a metric in Maple 2019, using the Physics package in Cartesian coordinates. I know that there is already a pre-installed way in which to set the coordinates to Cartesian, namely, if we have something like 

Setup(coordinates=cartesian);

or similarly, using the Coordiantes calling sequence, such that we may define something like

Coordinates(A=cartesian);Setup(coordinates=A);

yet, if I am not mistaken, this gives the coordinates in the following form: {x,y,z,t}, yet I seek to define the metric in the following, perhaps more arbitrary coordinate system, {x1,x2,x3,t}. Is there any way to setup the coordinate system to read like the set I just described, such that I can then take a norm of these three spatial coordaintes to be |x|? Any help would be greatly appreciated. 

I'm fairly new to using Maple and am having a bit of a hard time calculating the following inner product. Firstly, I define the tensors (which to this end I'm not certain they are correctly defined), 

with(Physics):

Setup(mathematicalnotation=true)

Setup(coordinatesystems=spherical):

ds2 := - dt^2 + a(t)^2 /( 1-k*r^2)*dr^2 + a(t)^2*r^2*dtheta^2 + a(t)^2*r^2*sin(theta)^2*dphi^2;
Setup(coordinates = spherical, metric = ds2);

e[mu, `~nu`] = Matrix(4, {(1,1)= a(t)/sqrt(1-k*r^2), (2,2)=a(t)*r, (3,3)=a(t)*r*sin(theta), (4,4)=1}, fill=0); (15) 
Define((15))
f[`~mu`, nu] = Matrix(4, {(1,1)=sqrt(1-k*r^2)/(a(t)), (2,2)= 1/(a(t)*r), (3,3)=1/(a(t)*r*sin(theta)), (4,4)=1}, fill=0); (28)
Define((28))

Thus, I defined two mixed tensors e[mu, `~nu`] (one covariant and one contravariant index ) and f[`~mu`, nu] (one contravariant and one covariant index).

Then, I try to take the following inner product between the two mixed tensors and the Christoffel symbols of the second kind, namely,

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel [`~nu`, sigma, mu];

where I used the Physics['.'] command . However, when I try taking this inner product, it returns unevaluated.

 

Did I define the mixed tensors incorrectly? Does it matter how you define the indices when you're gonna take the inner product? Because taking the inner product of simply e[mu, `~nu`].f[`~mu`, nu] also returns unevaluated. Also, I should mention that  e[mu, `~nu`] and f[`~mu`, nu] are inverses of each other, is there any way to define one and get the other, since, simply changing the way in which the indices are raised and lowered doesn't take the reciprocal of the components. 

Page 1 of 1