RicciScalar - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Tensor[RicciScalar] - calculate the Ricci scalar for a metric

Calling Sequences

RicciScalar(g, R)

Parameters

g    - a metric tensor on the tangent bundle of a manifold

R    - (optional) the curvature tensor of the metric $g$ calculated from the Christoffel symbol of $g$

Description

 • The Ricci scalar $S$ for a metric $g$ is the total contraction of the inverse of $g$ with the Ricci tensor $R$ of $g$. In components, $S={g}^{\mathrm{ab}}{R}_{\mathrm{ab}}.$
 • This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form RicciScalar(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order.  It can always be used in the long form DifferentialGeometry:-Tensor:-RicciScalar.

Examples

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

Example 1.

First create a 3 dimensional manifold $M$ and define a metric $\mathrm{g1}$ on $M$.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.1)
 M > $\mathrm{g1}≔\mathrm{evalDG}\left(\frac{{a}^{2}}{{\left({k}^{2}+{x}^{2}+{y}^{2}+{z}^{2}\right)}^{2}}\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}+\mathrm{dy}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dz}\right)\right)$
 ${\mathrm{g1}}{:=}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{dx}}{}{\mathrm{dx}}{+}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{dy}}{}{\mathrm{dy}}{+}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{dz}}{}{\mathrm{dz}}$ (2.2)
 M > $\mathrm{C1}≔\mathrm{Christoffel}\left(\mathrm{g1}\right):$

Calculate the curvature tensor.

 M > $\mathrm{R1}≔\mathrm{CurvatureTensor}\left(\mathrm{C1}\right)$
 ${\mathrm{R1}}{:=}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dx}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dy}}{+}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}{+}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dz}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{}{\mathrm{dz}}{}{\mathrm{dy}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dx}}{}{\mathrm{dz}}{+}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{}{\mathrm{dy}}{}{\mathrm{dz}}{+}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}$ (2.3)

Calculate the Ricci scalar.

 M > $\mathrm{S1}≔\mathrm{RicciScalar}\left(\mathrm{g1},\mathrm{R1}\right)$
 ${\mathrm{S1}}{:=}\frac{{24}{}{{k}}^{{2}}}{{{a}}^{{2}}}$ (2.4)

Example 2.

We re-work the previous example in an orthonormal frame.

 M > $f≔\frac{a}{{k}^{2}+{x}^{2}+{y}^{2}+{z}^{2}}$
 ${f}{:=}\frac{{a}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}$ (2.5)
 M > $\mathrm{FR}≔\mathrm{FrameData}\left(\left[f\mathrm{dx},f\mathrm{dy},f\mathrm{dz}\right],\mathrm{M1}\right):$
 M > $\mathrm{DGsetup}\left(\mathrm{FR}\right)$
 ${\mathrm{frame name: M1}}$ (2.6)
 M1 > $\mathrm{g3}≔\mathrm{evalDG}\left(\mathrm{Θ1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Θ1}+\mathrm{Θ2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Θ2}+\mathrm{Θ3}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{Θ3}\right)$
 ${\mathrm{g3}}{:=}{\mathrm{Θ1}}{}{\mathrm{Θ1}}{+}{\mathrm{Θ2}}{}{\mathrm{Θ2}}{+}{\mathrm{Θ3}}{}{\mathrm{Θ3}}$ (2.7)

Calculate the Ricci scalar.

 M1 > $\mathrm{S3}≔\mathrm{RicciScalar}\left(\mathrm{g3}\right)$
 ${\mathrm{S3}}{:=}\frac{{24}{}{{k}}^{{2}}}{{{a}}^{{2}}}$ (2.8)