Physics[TransformCoordinates]  transform the coordinates in a tensorial expression

Calling Sequence


TransformCoordinates(tr, expression, X_new, X_old, ...)


Parameters


tr



the transformation equations with the old variables on the lefthandsides and algebraic expressions involving the new variables X_new on the righthandsides, or the other way around

expression



any algebraic expression that is also tensorial, typically having free indices

X_new



optional, an ordered list with the new coordinates, it is however required when they are not related to a system of coordinates set with Coordinates or there is ambiguity regarding the transformation being from old to new or the other way around

X_old



optional, same as X_new; if given, then X_new must also be given before

output = line_element



optional, to request the output to be the spacetime line element when expression is the spacetime metric

performsumoverrepeatedindices



optional, can be true (default) or false, to perform the sum over repeated tensor indices in the returned result

simplifier = ...



optional  indicates the simplifier to be used instead of the default





Description


•

The TransformCoordinates, performs a transformation of coordinates in an algebraic expression that is also tensorial, i.e. one that has free and/or repeated spacetime indices that are either covariant or contravariant (see Check to determine the indices).

•

The transformation performed with TransformCoordinates is the standard one for tensors. Consider for instance a transformation from one coordinate system, to another


and every covariant vector transforms according to


and in the case of more than one index, for each contravariant or covariant index there is a factor as in the corresponding righthandsides of these formulas.

•

CAVEAT: in curvilinear coordinates, none of the Christoffel symbols, the noncovariant d_ operator and the SpaceTimeVector are tensors, even when the algebraic manipulation of their indices is done as if they were. This version of TransformCoordinates does not transform coordinates on these objects.

1.

in the given tensorial expression, change variables from the old ones to the new ones;

2.

use the formulas of the previous item to transform the tensorial expression regarding each of its free indices


The result represents the tensorial expression in the new coordinate system, expressed in terms of the new coordinates.

•

It frequently happens, however, that the transformation can only be expressed in simple form if it is from the new variables on the lefthandsides to the old variables in the righthandsides. You can pass the transformation tr in this way too, in which case you need to also pass the two lists X_new and X_old respectively as third and fourth arguments. The result will then be the tensor in the new coordinate system, entirely expressed in terms of the coordinates of the old system, .

•

The output of TransformCoordinates is an Array with dimension equal to the number of free indices of expression. In the special cases where the number of indices is 2 or 1, instead of an Array, the result is respectively expressed as a Matrix or a column Vector. In all cases, giving values to these indices you retrieve each of the components of the tensorial expression in the new coordinate system, entirely expressed in terms of the new coordinates X_new whenever the given transformation is from the old to the new variables (see the two previous paragraphs).

•

The transformation can be given as an equation or a set or list of them, and does not need to include equations for all the coordinates  for instance: some may not be changing. Also, because the transformation of coordinates is equivalent to a change of the system of reference, it is possible to continue using the same geometrical coordinates (same names representing the coordinates in both systems) so that the righthandsides of the transformation equations can involve the list of X_new variables, even if they are the same as the old ones, for instance as in transforming [t = t], performed by TransformCoordinates in two steps: transform then evaluate at .

•

You can retrieve all the nonzero components of the transformed expression at once by passing the output of TransformCoordinates to the ArrayElems command.

•

When expression is the spacetime metric g_[mu,nu], you can optionally request the output to be the corresponding line element passing output = line_element instead of a Matrix.

•

By default, in the returned result, summation is explicitly performed over all the repeated indices found in expression, taking into account the covariant/contravariant character of each index. To avoid performing this summation and keep repeated indices not summed pass the optional argument performsumoverrepeatedindices = false.

•

By default, all the components of the returned result are simplified as in u > simplify(simplify(u), size). This frequently results in a desired form. You can change the simplifier to be any other one by indicating it on the righthandside of the optional argument simplifier = ....



Compatibility


•

The Physics[TransformCoordinates] command was introduced in Maple 16.



Examples


>


>


 (1) 
Consider the general form of a transformation of coordinates tr, from to , and its inverse itr from to , expressed in terms of 8 arbitrary functions
>


 (2) 
>


 (3) 
>


 (4) 
For readability, suppress the display of functionality in these 8 functions
>


>


The covariant components of a vector transform according to
>


 (5) 
>


 (6) 
>


 (7) 
For the contravariant components of one can replace A[mu] by A[~mu] in the above. In that way, however, the new components will involve the inverse of the Jacobian of the transformation, resulting in a correct but rather large algebraic expression, due to the generality of the transformation tr. In such a case it is more convenient to use a transformation from the new to the old variables, as itr:
>


 (8) 
>


 (9) 
Verify that the transformation
>


 (10) 
transforms the line element of the Schwarzschild metric into one where the line element of spatial distance has conformal euclidean form, i.e.: it is proportional to the euclidean spatial line element in spherical coordinates, .
Set first the metric to be the Schwarzschild metric and the coordinates to be spherical. For that purpose you can use Setup, Coordinates or because Schwarzschild's metric is known to the system you can directly pass the keyword or an abbreviation of it to the metric g_ itself to do all in one step
>


 (11) 
Transform the coordinates in this metric using the transformation TR. Because the new variables were not set using Coordinates, indicate them as ; request the output to be the corresponding line element:
>


 (12) 
By inspection, the spatial part of this result is proportional to the euclidean spatial line element mentioned. Compare with the line element of the Schwarzschild metric,
>


 (13) 
Transform the Schwarzschild metric to Kruskal coordinates. The new coordinates are
>


 (14) 
The transformation is
>


 (15) 
>


 (16) 
>


 (17) 
Note this is a transformation from new to old variables. The line element of the transformed metric is
>


 (18) 
>


 (19) 
By default, repeated indices in expression are returned explicitly summed. For example, consider this expression with free indices and
>


 (20) 
To perceive the difference with and without the option performsumoverrepeatedindices, perform an identity transformation on (20)
>


 (21) 
In the above, the sum over is performed. With performsumoverrepeatedindices = false the sum is not performed:
>


 (22) 
Note that the Matrix assigned in (21) can effectively be used to retrieve the value of (20) for given values of its free indices and . Similar functionality is available using TensorArray.
>


 (23) 
>


 (24) 
>


You can as well transform tensorial expressions that have no free indices; in that case only a change of variables in the scalar expression using PDEtools:dchange is performed, although in the returned result the repeated indices will appear explicitly summed. To perform only the summation use SumOverRepeatedIndices.


See Also


Array, ArrayElems, Check, Coordinates, d_, Define, DifferentialGeometry[Tensor][PushPullTensor], g_, Matrix, PDEtools:dchange, Physics, Physics conventions, Physics examples, Setup, SumOverRepeatedIndices, TensorArray


References



Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.


