calculate the Ricci scalar for a metric - Maple Programming Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : Tensor : DifferentialGeometry/Tensor/RicciScalar

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

 > with(DifferentialGeometry): with(Tensor):

Example 1.

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

 > DGsetup([x, y, z], M);
 ${\mathrm{frame name: M}}$ (2.1)
 M > g1 := evalDG(a^2/(k^2 + x^2 + y^2 + z^2)^2*(dx &t dx + dy &t dy + dz &t dz));
 ${\mathrm{g1}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{2}{,}{2}\right]{,}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{3}{,}{3}\right]{,}\frac{{{a}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]\right]\right]\right)$ (2.2)
 M > C1 := Christoffel(g1):

Calculate the curvature tensor.

 M > R1 := CurvatureTensor(C1);
 ${\mathrm{R1}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"cov_bas"}{,}{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}{,}{1}{,}{2}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{1}{,}{2}{,}{2}{,}{1}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{1}{,}{3}{,}{1}{,}{3}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{1}{,}{3}{,}{3}{,}{1}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{2}{,}{1}{,}{1}{,}{2}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{2}{,}{1}{,}{2}{,}{1}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{2}{,}{3}{,}{2}{,}{3}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{2}{,}{3}{,}{3}{,}{2}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{3}{,}{1}{,}{1}{,}{3}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{3}{,}{1}{,}{3}{,}{1}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{3}{,}{2}{,}{2}{,}{3}\right]{,}{-}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]{,}\left[\left[{3}{,}{2}{,}{3}{,}{2}\right]{,}\frac{{4}{}{{k}}^{{2}}}{{\left({{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}\right)}^{{2}}}\right]\right]\right]\right)$ (2.3)

Calculate the Ricci scalar.

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

Example 2.

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

 M > f := a/(k^2 + x^2 + y^2 + z^2);
 ${f}{:=}\frac{{a}}{{{k}}^{{2}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}}$ (2.5)
 M > FR := FrameData([f*dx, f*dy, f*dz], M1):
 M > DGsetup(FR);
 ${\mathrm{frame name: M1}}$ (2.6)
 M1 > g3 := evalDG(Theta1 &t Theta1 + Theta2 &t Theta2 + Theta3 &t Theta3);
 ${\mathrm{g3}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{\mathrm{M1}}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{1}\right]\right]\right]\right)$ (2.7)

Calculate the Ricci scalar.

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