 tensor(deprecated)/Ricciscalar - Maple Help

tensor

 Ricciscalar
 compute the Ricci scalar Calling Sequence Ricciscalar(ginv, Ricci) Parameters

 ginv - rank two tensor_type of character [-1,-1] representing the contravariant metric tensor; specifically, ${\left({\mathrm{ginv}}_{\mathrm{compts}}\right)}_{i,j}≔{g}^{\left\{\mathrm{ij}\right\}}$ Ricci - rank two tensor_type of character [-1,-1] representing the COVARIANT Ricci tensor; specifically, Ricci[compts][i,j] := R_{ij} Description

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

 • The result of this routine is the Ricci scalar (note it is represented by a rank zero tensor_type).
 • Both ginv and Ricci should use the Maple symmetric indexing function for their components.
 • Simplification:  This routine uses the tensor/Ricciscalar/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/Ricciscalar/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/Ricciscalar/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 Ricciscalar(..) only after performing the command with(tensor) or with(tensor, Ricciscalar).  The function can always be accessed in the long form tensor[Ricciscalar](..). Examples

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

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

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

 > $\mathrm{coord}≔\left[t,r,\mathrm{\theta },\mathrm{\phi }\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{\theta }\right)}^{2}:$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{≔}{table}{}\left(\left[{\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]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (1)

Compute the Ricci scalar.

 > $\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)$
 ${\mathrm{RS}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}{-}\frac{{4}}{{{r}}^{{2}}}{,}{\mathrm{index_char}}{=}\left[\right]\right]\right)$ (2)

You can also view the result using the tensor package function displayGR.