tensor(deprecated)/Einstein - Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : tensor(deprecated)/Einstein

tensor

 Einstein
 compute the covariant components of the Einstein tensor

 Calling Sequence Einstein(g, Ricci, R)

Parameters

 g - rank two tensor_type of character $\left[1,1\right]$ representing the covariant metric tensor; specifically, ${\left({g}_{\mathrm{compts}}\right)}_{i,j}≔{g}_{\left\{\mathrm{ij}\right\}}$ Ricci - rank two tensor_type of character $\left[-1,-1\right]$ representing the covariant Ricci tensor; specifically, ${\left({\mathrm{Ricci}}_{\mathrm{compts}}\right)}_{i,j}≔{R}_{\left\{\mathrm{ij}\right\}}$ R - rank zero tensor_type of character [], representing the Ricci scalar (note it is recognized as a 0th rank tensor_type in the tensor package).

Description

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][EinsteinTensor] and Physics[Einstein] instead.

 • The resultant tensor_type, Estn say, of this routine is the COVARIANT Einstein tensor, indexed as shown below:

${\left({\mathrm{Estn}}_{\mathrm{compts}}\right)}_{i,j}≔{G}_{i,j}$

 • The component arrays of both g and Ricci should use the Maple symmetric indexing function.  They can be computed using the appropriate routines from the package.  The component array of the result uses Maple's symmetric indexing function.
 • Simplification:  This routine uses the tensor/Einstein/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/Einstein/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/Einstein/simp routine be customized to suit the needs of the particular problem.
 • This function is part of the tensor package, and so can be used in the form Einstein(..) only after performing the command with(tensor) or with(tensor, Einstein).  The function can always be accessed in the long form tensor[Einstein](..).

Examples

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][EinsteinTensor] and Physics[Einstein] instead.

Define the coordinate variables and the covariant Schwarzchild metric tensor components.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $\mathrm{coord}≔\left[t,r,\mathrm{th},\mathrm{ph}\right]:$
 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..4,1..4\right):$
 > $\mathrm{g_compts}\left[1,1\right]≔1-\frac{2m}{r}:$$\mathrm{g_compts}\left[2,2\right]≔-\frac{1}{\mathrm{g_compts}\left[1,1\right]}:$
 > $\mathrm{g_compts}\left[3,3\right]≔-{r}^{2}:$$\mathrm{g_compts}\left[4,4\right]≔-{r}^{2}{\mathrm{sin}\left(\mathrm{th}\right)}^{2}:$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{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{th}}\right)}^{{2}}\end{array}\right]\right]\right)$ (1)

Now compute all of the quantities necessary to compute the Einstein tensor:

 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right):$
 > $\mathrm{D1g}≔\mathrm{d1metric}\left(g,\mathrm{coord}\right):$$\mathrm{D2g}≔\mathrm{d2metric}\left(\mathrm{D1g},\mathrm{coord}\right):$
 > $\mathrm{Cf1}≔\mathrm{Christoffel1}\left(\mathrm{D1g}\right):$
 > $\mathrm{RMN}≔\mathrm{Riemann}\left(\mathrm{ginv},\mathrm{D2g},\mathrm{Cf1}\right):$
 > $\mathrm{RICCI}≔\mathrm{Ricci}\left(\mathrm{ginv},\mathrm{RMN}\right):$
 > $\mathrm{RS}≔\mathrm{Ricciscalar}\left(\mathrm{ginv},\mathrm{RICCI}\right):$

Compute the Einstein tensor:

 > $\mathrm{Estn}≔\mathrm{Einstein}\left(g,\mathrm{RICCI},\mathrm{RS}\right)$
 ${\mathrm{Estn}}{≔}{table}{}\left(\left[{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]{,}{\mathrm{compts}}{=}\left[\begin{array}{cccc}{0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}\end{array}\right]\right]\right)$ (2)

You can also view the result using the function tensor[displayGR].