SpaceTimeVector - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : SpaceTimeVector

Physics[SpaceTimeVector] - a representation for spacetime indexed vectors

Calling Sequence

SpaceTimeVector[mu](X)

Parameters

mu

-

a spacetime index

X

-

a sequence of spacetime symbol parameters, as many as the dimension of spacetime, typically defined by Coordinates

Description

• 

The SpaceTimeVector command is a representation for spacetime indexed vectors. Note that having defined X as a label representing a sequence of spacetime coordinates using Coordinates or Setup, the Physics commands already understand Xμ as a representation for a spacetime vector.

• 

In a galilean system (Euclidean or Minkowski), both Xμ and the differential of the coordinates dXμ are vectors (tensors with 1 index), and so both Aμ and μ are vectors, the latter representing

μ=Xμ

  

where Xμ=gμ,νXν is the covariant spacetime vector. However, unlike the galilean case, in a curvilinear system of coordinates, Xμ is not a vector, only dXμ is and the formula above for μ loses its meaning; instead, the convention used in the Physics package (it becomes the one above only in the galilean case) is

μ=gμ,νν

  

Likely, from Xν=gα,νXα, in a galilean spacetime μXν=gμ,ν while this is not correct in a nongalilean spacetime, where the metric depends on the coordinates, and the correct formula is μXν=μgα,νXα+gμ,ν

• 

Remark: in tensor computations, the distinction between covariant and contravariant indices is important when the spacetime is not Euclidean and the indices assume numerical values. The label of a system of coordinates set with Coordinates represent the contravariant components of the corresponding SpaceTimeVector. To indicate than an index is contravariant you prefix it with ~. On the other hand, in Maple, the selection operation is also performed through indexation. Hence, if X is a label for a system of coordinates, entering X[1] returns x1, the contravariant component of the corresponding SpaceTimeVector, even when the index used is the number 1, the covariant version of the contravariant ~1. So in a context where covariant and contravariant indexation is relevant and where you are going to assign numerical values to the indices, it is recommended to represent the spacetime vector with the SpaceTimeVector function, as in SpaceTimeVector[mu](X), instead of directly using X[mu]. In all other cases it is safe and simpler to use X[mu] and all the Physics commands understand both representations as equivalent.

Examples

withPhysics:

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

Set first two sets of coordinates:

CoordinatesX,Y

Default differentiation variables for d_, D_ and dAlembertian are:X=x1,x2,x3,x4

Systems of spacetime coordinates are:X=x1,x2,x3,x4,Y=y1,y2,y3,y4

X,Y

(2)

Setupdiff=X,dimension=4

Default differentiation variables for d_, D_ and dAlembertian are:X=x1,x2,x3,x4

_______________________________________________________

differentiationvariables=X,dimension=4

(3)

You can now represent the 4-vectors Yμ and Xμ by using - say for X -  either Xμ or SpaceTimeVector[mu](X).

SpaceTimeVectorμX

Xμ

(4)

diffFX,Xμ

μμFX

(5)

diffFX,SpaceTimeVectorμX

μμFX

(6)

In the output above, note that the default differentiation variables are omitted in the display of d_, as well as that of dAlembertian.

Use the inert %diff notation so the derivative is not performed until you activate it by using the value command.

g_μ,ν%diffFX,Xμ,Xν

gμ,ν2XμXνFX

(7)

value

gμ,νμμννFX

(8)

Simplify

FX

(9)

Only the default differentiation variables are omitted in the display of d_ and dAlembertian, so in the following example, Y is displayed.

diffFY,Yμ,Yμ

FY,Y

(10)

diffFYX,Xμ,Yν

μμννFy1x1,y2x2,y3x3,y4x4,Y

(11)

Independently of using SpaceTimeVector[mu](X) or the equivalent X[mu] to indicate the dependency of some functions or as differentiation variables, these objects can enter any algebraic computations to representing tensors with 1 index). For example:

X~alphaX~beta

XααXββ

(12)

d_μ

Xααδμβμβ+δμαμαXββ

(13)

dAlembertian

2gα,βα,β

(14)

LeviCivitaα,β,μ,ν

εα,β,μ,νXααXββ

(15)

Simplify

0

(16)

The 1st contravariant and covariant components are respectively represented by indexing SpaceTimeVector with the numbers ~1 and 1

SpaceTimeVector~1X

x1

(17)

SpaceTimeVector1X=g_1,μXμ

x1=Xμδ1μ1μ

(18)

Simplify

x1=x1

(19)

To understand the result above, display the current spacetime metric g_ matrix

g_

gμ,ν=

(20)

Compute the derivative with respect to the 1st contravariant component of X, that is x1. Recalling, contravariant differentiation coordinates are the ones entering the covariant differentiation operator μ=xμ. For illustration purposes use the inert form of d_ and diff, prefixing the commands with % and perform the computation using value

SpaceTimeVector~muX

Xμμ

(21)

%d_1=%diff,x1

1Xμμ=x1Xμμ

(22)

value

δ1μ1μ=δ1μ1μ

(23)

You can also represent x1 with SpaceTimeVector[~1](X), and when differentiating with respect to contravariant components of the spacetime vector you can represent them directly with X[~mu] because ~1, ~2, etc. are viewed by the system as symbols (in this context, contravariant indices) not selecting numbers

%diff,%SpaceTimeVector~1X=%diff,X~1

X11Xμμ=X11Xμμ

(24)

value

δ1μ1μ=δ1μ1μ

(25)

See Also

Coordinates, d_, dAlembertian, g_, Physics conventions, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Setup, Simplify