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 the enhanced display scheme of the differential equation packages.
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