Set up a coordinate system to work with - the first one to be set is automatically taken as the differentiation variables for d_, the covariant derivative D_ and the dAlembertian
When Physics is initialized, the default spacetime metric is of Minkowski type. You can see the metric querying Setup, as in Setup(metric);, or directly entering the metric g_ with no indices
For illustration purposes Define an arbitrary spacetime tensor
Check the nonzero components of Christoffel: if, as in the Minkowski case, there are none, then
To set the scenario as an arbitrary non-galilean spacetime set the metric to be arbitrary, that is, depending on 10 arbitrary functions of the spacetime coordinates
Related to displaying the components of Christoffel, it is convenient to have a compact display of the 10 arbitrary functions entering the metric as well as of their derivatives; for that purpose use CompactDisplay.
So from herein, in the display of expressions, derivatives are displayed as indexed and the functionality of the arbitrary functions is suppressed.
Check the value of for = = = 1
So now, for the total differential and the covariant derivative, we have
To express these results using the definition in terms of Christoffel symbols use expand or convert to d_
To compute with a representation for without actually performing the operation, use the inert form %D_. To afterwards perform the operation use value
The covariant derivative of a scalar is always equal to the derivative
To reduce the amount of input notation, a scalar constructed with contracted indices in tensors can be entered with all contracted indices covariant, or as a power in the case of a contracted product of a tensor with itself. For example, use
and as expected in the case of scalars, in the above you see no Christoffel symbols.
Set the spacetime metric g_ by giving the square of the spacetime interval
The generalized divergence of a vector in curvilinear coordinates
Relative scalars, tensors and tensorial expressions
In the context of a curved spacetime, when computing the covariant derivative of a relative scalar, tensor or tensorial expression that has non-zero relative weight , a relative term is added - see Chapter 4 of [2]. That term can be computed using the Physics:-Library:-GetRelativeWeight command.
Consequently, not just in a flat spacetime where is a constant, but also in a curved spacetime,
To understand this zero value on the right-hand side, express the left-hand side in terms of d_
evaluate the inert %d_
The factor in parentheses is equal to , the covariant derivative of the metric, equal to zero, so
Set the Schwarzschild metric and consider the covariant derivative of two tensors and , defined such that the former has zero relative weight and the latter has relative weight equal to 1. To define them use the Define command
Hence
The corresponding covariant derivatives
where in the above we see the additional (relative) term