 tensor(deprecated)/entermetric - Maple Help

tensor

 entermetric
 facility for user input of coordinate variables and covariant metric tensor components. Calling Sequence entermetric( 'g', 'coords' ) Parameters

 g - covariant metric tensor (symmetric rank 2 tensor_type) coords - list of coordinate variables Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 • The function entermetric( g, coords ) prompts the user for the dimension of the manifold, the coordinate variables, and the components of the covariant metric tensor with respect to the natural basis (that is, the line element), and produces the coordinates list and covariant metric tensor.
 • The coordinate variables are returned as a list of names through the output parameter coords.  The covariant metric tensor is returned as a rank 2 symmetric tensor_type through the output parameter g. The parameters g and coords must be unassigned names.
 • Since diagonal metrics are common, the user is asked to specify if the metric is diagonal or not.  If the metric is diagonal, only the diagonal entries are required to be input.  If the metric is not diagonal, the entries in the "upper triangle" of the metric components array are required to be input.  In both cases, the returned metric components make use of Maple's symmetric indexing function.
 • The user is required to end each line of input with a semicolon (";") since each input value is read in as a Maple statement.  Long expressions may be broken over more than one line provided the expression contains only one semicolon located at the end of the expression (like regular maple statements).
 • After the user has finished inputting the dimension, coordinates, and metric components, entermetric will display them back to the user for confirmation. Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$

Use entermetric to input the Schwarzschild metric.

 > $\mathrm{entermetric}\left(g,\mathrm{coord}\right)$
 ${\mathrm{The coordinate variables are :}}$
 ${\mathrm{x1}}{=}{t}$
 ${\mathrm{x2}}{=}{r}$
 ${\mathrm{x3}}{=}{\mathrm{\theta }}$
 ${\mathrm{x4}}{=}{\mathrm{\phi }}$
 ${}$
 ${\mathrm{The Covariant Metric}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{cov_g11}}{=}{1}{-}\frac{{2}{}{M}}{{r}}$
 ${\mathrm{cov_g22}}{=}{-}\frac{{1}}{{1}{-}\frac{{2}{}{M}}{{r}}}$
 ${\mathrm{cov_g33}}{=}{-}{{r}}^{{2}}$
 ${\mathrm{cov_g44}}{=}{-}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$ (1)

Confirm the results once again:

 > $\mathrm{coord}$
 $\left[{t}{,}{r}{,}{\mathrm{\theta }}{,}{\mathrm{\phi }}\right]$ (2)
 > $\mathrm{eval}\left(g\right)$
 ${\mathrm{table}}{}\left(\left[{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]{,}{\mathrm{compts}}{=}\left[\begin{array}{cccc}{1}{-}\frac{{2}{}{M}}{{r}}& {0}& {0}& {0}\\ {0}& {-}\frac{{1}}{{1}{-}\frac{{2}{}{M}}{{r}}}& {0}& {0}\\ {0}& {0}& {-}{{r}}^{{2}}& {0}\\ {0}& {0}& {0}& {-}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}\end{array}\right]\right]\right)$ (3)