Schwarzschild Metric

Introduction

This notebook uses the MathTensor package(Parker&Christensen) to determine the geodesic equations and the constants of the motion for the Schwarzchild metric.       MathTensor is used to calculate all relevant tensors, which is included  in the SchwarzschildOut section. William C. Collins, Space Systems, USNRL(retired), bccollins1@comcast.net.

MathTensor package

Unprotect[TensorQ]

Off[General::"spell1"];

Off[General::"spell"];

<< mathtensor.m

<< SchwarzschildOut.m

SchwarzschildOut file

This file is generated by MathTensor given the Schwarzschild metric as input

\(\(\(CompSimp[a_] := 
      Together[Expand[a //. CompSimpRules]]\)\(
\)\(
\)
    \)\)
\(\(\(CompSimpOptions := {SetOptions[Expand, Trig -> False], 
        SetOptions[Together, 
          Trig -> False]}\)\(
\)\(
\)
    \)\)
\(\(\(CompSimpRules = {Cos[theta]^2 -> 1 - Sin[theta]^2, 
        Cos[theta]^4 -> \((1 - 
                Sin[theta]^2)\)^2}\)\(
\)\(
\)
    \)\)
\(\(\(Evaluate[CompSimpOptions]\)\(
\)
    \)\)
\(\(\(Off[MetricgFlag]\)\(
\)
    \)\)
\(\(\(Print["MetricgFlag has been turned off."]\)\(
\)
    \)\)
\(\(\(Rmsign = 1\)\(
\)
    \)\)
\(\(\(Rcsign = 1\)\(
\)
    \)\)
\(\(\(Dimension = 4\)\(
\)
    \)\)
\(\(\(MatrixMetricgLower = {{\((1 - \((2*M)\)/r)\)^\((\(-1\))\), 0, 0, 
          0}, {0, r^2, 0, 0}, {0, 0, r^2*Sin[theta]^2, 0}, {0, 0, 
          0, \(-1\) + \((2*M)\)/r}}\)\(
\)
    \)\)
\(\(\(MatrixMetricgUpper = {{\((\(-2\)*M + r)\)/r, 0, 0, 0}, {0, 
          r^\((\(-2\))\), 0, 0}, {0, 0, Csc[theta]^2/r^2, 0}, {0, 0, 0, 
          r/\((2*M - r)\)}}\)\(
\)
    \)\)
\(\(\(Detg = \(-\((r^4*Sin[theta]^2)\)\)\)\(
\)\(
\)
    \)\)
\(\(\(x[1] = r\)\(
\)
    \)\)
\(\(\(x[2] = theta\)\(
\)
    \)\)
\(\(\(x[3] = phi\)\(
\)
    \)\)
\(\(\(x[4] = t\)\(
\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), \(-4\)] = \(-1\) + \((2*M)\)/r\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), 1] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), 2] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), 3] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-4\), 4] = 1\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), \(-3\)] = r^2*Sin[theta]^2\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), 1] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), 2] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), 3] = 1\)\(
\)
    \)\)
\(\(\(Metricg[\(-3\), 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), \(-2\)] = r^2\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), 1] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), 2] = 1\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), 3] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-2\), 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-1\), \(-1\)] = \((1 - \((2*M)\)/
              r)\)^\((\(-1\))\)\)\(
\)
    \)\)
\(\(\(Metricg[\(-1\), 1] = 1\)\(
\)
    \)\)
\(\(\(Metricg[\(-1\), 2] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-1\), 3] = 0\)\(
\)
    \)\)
\(\(\(Metricg[\(-1\), 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[1, 1] = \((\(-2\)*M + r)\)/r\)\(
\)
    \)\)
\(\(\(Metricg[1, 2] = 0\)\(
\)
    \)\)
\(\(\(Metricg[1, 3] = 0\)\(
\)
    \)\)
\(\(\(Metricg[1, 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[2, 2] = r^\((\(-2\))\)\)\(
\)
    \)\)
\(\(\(Metricg[2, 3] = 0\)\(
\)
    \)\)
\(\(\(Metricg[2, 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[3, 3] = Csc[theta]^2/r^2\)\(
\)
    \)\)
\(\(\(Metricg[3, 4] = 0\)\(
\)
    \)\)
\(\(\(Metricg[4, 4] = r/\((2*M - r)\)\)\(
\)
    \)\)
\(\(\(Metricg[a_, b_] := 
      Metricg[b, a] /; 
        IndicesAndNotOrderedQ[{a, b}]\)\(
\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-4\), \(-4\)] = \((\(-2\)*M^2 + M*r)\)/r^3\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-3\), \(-3\)] = 
      2*M*Sin[theta]^2 - r*Sin[theta]^2\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-2\), \(-2\)] = 2*M - r\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[1, \(-1\), \(-1\)] = M/\((\((2*M - r)\)*r)\)\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-4\), \(-4\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[
        2, \(-3\), \(-3\)] = \(-\((Cos[theta]*Sin[theta])\)\)\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-2\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-2\), \(-1\)] = r^\((\(-1\))\)\)\(
\)
    \)\)
\(\(\(AffineG[2, \(-1\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-4\), \(-4\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-3\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-3\), \(-2\)] = Cot[theta]\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-3\), \(-1\)] = r^\((\(-1\))\)\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-2\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[3, \(-1\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-4\), \(-4\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[
        4, \(-4\), \(-1\)] = \(-\((M/\((\((2*M - r)\)*r)\))\)\)\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-3\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-2\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[4, \(-1\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(AffineG[a_, b_, c_] := 
      AffineG[a, c, b] /; 
        IndicesAndNotOrderedQ[{b, c}]\)\(
\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-4\), \(-3\)] = \(-\((\((M*\((2*M - r)\)*
                Sin[theta]^2)\)/r^2)\)\)\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-3\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-2\), \(-4\), \(-2\)] = \((\(-2\)*M^2 + M*r)\)/
        r^2\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-2\), \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-2\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-2\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-2\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-1\), \(-4\), \(-1\)] = \((\(-2\)*M)\)/
        r^3\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-1\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-1\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-4\), \(-1\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-3\), \(-2\), \(-3\), \(-2\)] = 
      2*M*r*Sin[theta]^2\)\(
\)
    \)\)
\(\(\(RiemannR[\(-3\), \(-2\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-3\), \(-2\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-3\), \(-1\), \(-3\), \(-1\)] = \((M*
            Sin[theta]^2)\)/\((2*M - r)\)\)\(
\)
    \)\)
\(\(\(RiemannR[\(-3\), \(-1\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RiemannR[\(-2\), \(-1\), \(-2\), \(-1\)] = M/\((2*M - r)\)\)\(
\)
    \)\)
\(\(\(RiemannR[i_, j_, k_, l_] := 
      RiemannR[k, l, i, j] /; 
        i == k && IndicesAndNotOrderedQ[{j, l}]\)\(
\)
    \)\)
\(\(\(RiemannR[i_, j_, k_, l_] := 
      0 /; i == j || k == l\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := \(-RiemannR[b, a, c, d]\) /; 
        IndicesAndNotOrderedQ[{a, b}]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := \(-RiemannR[a, b, d, c]\) /; 
        IndicesAndNotOrderedQ[{c, d}]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      RiemannR[c, d, a, b] /; IndicesAndNotOrderedQ[{a, c}]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[d, s199]*RiemannR[a, b, c, \(-s199\)], {s199, 1, 
              Dimension}]] /; 
        NegIntegerQ[a] && NegIntegerQ[b] && NegIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[c, s299]*Metricg[d, s199]*
              RiemannR[a, b, \(-s299\), \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}]] /; 
        NegIntegerQ[a] && NegIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s299]*Metricg[d, s199]*
              RiemannR[a, \(-s299\), c, \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && NegIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s399]*Metricg[c, s299]*Metricg[d, s199]*
              RiemannR[a, \(-s399\), \(-s299\), \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}, {s399, 1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[a, s499]*Metricg[b, s399]*Metricg[c, s299]*
              Metricg[d, s199]*
              RiemannR[\(-s499\), \(-s399\), \(-s299\), \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}, {s399, 1, Dimension}, {s499, 
              1, Dimension}]] /; 
        PosIntegerQ[a] && PosIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(RiemannR[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s199]*RiemannR[a, \(-s199\), c, d], {s199, 1, 
              Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && NegIntegerQ[c] && 
          NegIntegerQ[d]\)\(
\)\(
\)
    \)\)
\(\(\(RicciR[\(-4\), \(-4\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-3\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-2\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[\(-1\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(RicciR[a_, b_] := 
      RicciR[b, a] /; IndicesAndNotOrderedQ[{a, b}]\)\(
\)
    \)\)
\(\(\(RicciR[a_, b_] := 
      CompSimp[Sum[
            Metricg[b, s199]*RicciR[a, \(-s199\)], {s199, 1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b]\)\(
\)
    \)\)
\(\(\(RicciR[a_, b_] := 
      CompSimp[Sum[
            Metricg[a, s299]*Metricg[b, s199]*
              RicciR[\(-s299\), \(-s199\)], {s199, 1, Dimension}, {s299, 1, 
              Dimension}]] /; 
        PosIntegerQ[a] && PosIntegerQ[b]\)\(
\)\(
\)
    \)\)
\(\(\(ScalarR = 0\)\(
\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-4\), \(-4\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-4\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-3\), \(-3\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-2\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[\(-1\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(EinsteinG[i_, j_] := 
      EinsteinG[j, i] /; IndicesAndNotOrderedQ[{i, j}]\)\(
\)
    \)\)
\(\(\(EinsteinG[a_, b_] := 
      CompSimp[Sum[
            Metricg[b, s199]*EinsteinG[a, \(-s199\)], {s199, 1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b]\)\(
\)
    \)\)
\(\(\(EinsteinG[a_, b_] := 
      CompSimp[Sum[
            Metricg[a, s299]*Metricg[b, s199]*
              EinsteinG[\(-s299\), \(-s199\)], {s199, 1, Dimension}, {s299, 
              1, Dimension}]] /; 
        PosIntegerQ[a] && PosIntegerQ[b]\)\(
\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-4\), \(-3\)] = \((\(-2\)*M^2*
              Sin[theta]^2 + M*r*Sin[theta]^2)\)/r^2\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-4\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-3\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-2\), \(-4\), \(-2\)] = \((\(-2\)*M^2 + M*r)\)/
        r^2\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-2\), \(-4\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-2\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-2\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-2\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-1\), \(-4\), \(-1\)] = \((\(-2\)*M)\)/r^3\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-1\), \(-3\), \(-2\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-1\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-4\), \(-1\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-3\), \(-2\), \(-3\), \(-2\)] = 2*M*r*Sin[theta]^2\)\(
\)
    \)\)
\(\(\(WeylC[\(-3\), \(-2\), \(-3\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-3\), \(-2\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-3\), \(-1\), \(-3\), \(-1\)] = \((M*
            Sin[theta]^2)\)/\((2*M - r)\)\)\(
\)
    \)\)
\(\(\(WeylC[\(-3\), \(-1\), \(-2\), \(-1\)] = 0\)\(
\)
    \)\)
\(\(\(WeylC[\(-2\), \(-1\), \(-2\), \(-1\)] = M/\((2*M - r)\)\)\(
\)
    \)\)
\(\(\(WeylC[i_, j_, k_, l_] := 0 /; i == j || k == l\)\(
\)
    \)\)
\(\(\(WeylC[i_, j_, k_, l_] := \(-WeylC[i, j, l, k]\) /; 
        IndicesAndNotOrderedQ[{k, l}]\)\(
\)
    \)\)
\(\(\(WeylC[i_, j_, k_, l_] := \(-WeylC[j, i, k, l]\) /; 
        IndicesAndNotOrderedQ[{i, j}]\)\(
\)
    \)\)
\(\(\(WeylC[i_, j_, k_, l_] := 
      WeylC[k, l, i, j] /; IndicesAndNotOrderedQ[{i, k}]\)\(
\)
    \)\)
\(\(\(WeylC[i_, j_, k_, l_] := 
      WeylC[k, l, i, j] /; 
        i == k && IndicesAndNotOrderedQ[{j, l}]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[d, s199]*WeylC[a, b, c, \(-s199\)], {s199, 1, 
              Dimension}]] /; 
        NegIntegerQ[a] && NegIntegerQ[b] && NegIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[c, s299]*Metricg[d, s199]*
              WeylC[a, b, \(-s299\), \(-s199\)], {s199, 1, Dimension}, {s299, 
              1, Dimension}]] /; 
        NegIntegerQ[a] && NegIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s299]*Metricg[d, s199]*
              WeylC[a, \(-s299\), c, \(-s199\)], {s199, 1, Dimension}, {s299, 
              1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && NegIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s399]*Metricg[c, s299]*Metricg[d, s199]*
              WeylC[a, \(-s399\), \(-s299\), \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}, {s399, 1, Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[a, s499]*Metricg[b, s399]*Metricg[c, s299]*
              Metricg[d, s199]*
              WeylC[\(-s499\), \(-s399\), \(-s299\), \(-s199\)], {s199, 1, 
              Dimension}, {s299, 1, Dimension}, {s399, 1, Dimension}, {s499, 
              1, Dimension}]] /; 
        PosIntegerQ[a] && PosIntegerQ[b] && PosIntegerQ[c] && 
          PosIntegerQ[d]\)\(
\)
    \)\)
\(\(\(WeylC[a_, b_, c_, d_] := 
      CompSimp[Sum[
            Metricg[b, s199]*RiemannR[a, \(-s199\), c, d], {s199, 1, 
              Dimension}]] /; 
        NegIntegerQ[a] && PosIntegerQ[b] && NegIntegerQ[c] && 
          NegIntegerQ[
            d]\)\(
\)\(
\)\(
\)\( (*Done*) \)\(
\)
    \)\)

Coordinates, (x^α); Differentials, (d^α); Four Velocity, (u^α).

Coordinate:  X =  {r, θ, ϕ, t}

DefineTensor[x, {{1}, 1}]; 
    X = Evaluate[Table[x[α], {α, 4}]] = 
        Evaluate[
          ReplaceAll[
            Table[x[α], {α, 4}], {theta -> θ, 
              phi -> ϕ}]];

Differentials: dσ = {dr, dθ, dϕ, dt}

Remove[d, dσ]

DefineTensor[d, {{1}, 1}]; 
    dσ = Evaluate[Table[d[α], {α, 4}]] = {dr, 
          dθ, dϕ, dt};

Four Velocity: U = {r'[τ],θ'[τ],ϕ'[τ],t'[τ]}

DefineTensor[u, {{1}, 1}]; 
    U = Evaluate[
          Table[u[α], {α, 4}]] = {Dt[r[τ], τ], 
          Dt[θ[τ], τ], Dt[ϕ[τ], τ], 
          Dt[t[τ], τ]};

Schwarzschild Metric Tensor: MetricS  =  (Subscript[g, α])β = Metricg[-α,-β]

Schwarzschild Metric Tensor

Geometrized units: M->G M/(c^2)  which defines M in terms of a distance in meters

PhysicalConstants package

Get["Miscellaneous`PhysicalConstants`"];

Go from kilogram to Meter

SpeedOfLight

MassL = (GravitationalConstant/(SpeedOfLight^2)) // N

EarthMass // N

SolarMass // N

EarthMassL = EarthMass* MassL

SolarMassL = SolarMass* MassL

From the SchwarzschildOut file

MetricS = 
      Table[Metricg[-α, -β], {α, 4}, {β, 
          4}]

Schwarzschild Metric: (ds^2)

ds = (Sqrt[MetricS . dσ . dσ])

(ds^2)

Dual(Covariant) four velocity vector:

Evaluate[Table[u[-β], {β, 4}]] = 
      Table[Metricg[-α, -β], {α, 4}, {β, 
            4}] . Table[u[α], {α, 4}]

Affine Connection: AffineS = (Subscript[Γ, β])(γ^α)

AffineS = 
      Table[AffineG[α, -β, -γ], {α, 
          4}, {β, 4}, {γ, 4}]

Constants of the motion and the coordinate derivitives

Since we have spherical symmetry there is no lost of generality by restricting ourselves to the equatorial plane: ( θ = π/2, θ' = 0)

The velocity for equatorial motion: V

DefineTensor[v, {{1}, 1}]; 
    V = Evaluate[
          Table[v[α], {α, 4}]] = {Dt[r[τ], τ], 0, 
          Dt[ϕ[τ], τ], Dt[t[τ], τ]};

V

Constants of the motion; EM and LM.

Energy

The metric is independent of the t coordinate so the Killing vector (ξ^α) = {0,0,0,1} provides a constant of the motion.

EM = -ReplaceAll[{0, 0, 0, 1} . MetricS . V, 
          r[τ] -> r]

We identify EM as E/m, the energy per unit mass since as r->∞, E->mt'(τ)

Angular momentum

The metric is independent of the ϕ coordinate so the Killing vector (ξ^α) = {0,0,1,0} provides a constant of the motion.

LM = 
      ReplaceAll[{0, 0, 1, 0} . MetricS . V, {θ -> (π/2), 
          r[τ] -> r}]

First derivitives in terms of the constants of the motion

dt/dτ  in terms of the constants of the motion: dtdτ[r, Em, M]

Solve[Em == EM, t'[τ]];
t'[τ] /. %;
dtdτ[r_, Em_, M_:  1] = %[[1]]

dϕ/dτ  in terms of the constants of the motion:  dϕdτ[r, Lm]

Solve[
        Lm == LM, ϕ'[τ]];
ϕ'[τ] /. %;
dϕdτ[r_, Lm_] = %[[1]]

dr/dτ in terms of the constants of the motion: drdτ[r, Em, Lm, M]

Directly from the time metric : 
          MetricS . V . V = -1
                          ((((ds/d)τ))^2)=(((r'[τ])^2)/(1 - ((2 M)/r)))+(-1 + ((2 M)/r)) ((t'[τ])^2)+(r^2) Sin[θ]^2 ((ϕ'[τ])^2)=-1.

Solve[
        ReplaceAll[
            MetricS . V . 
              V, θ -> (π/2)] == -1, r'[τ]];
r'[τ] /. %;
drdτ[r_, Em_, Lm_, M_:  1] = 
      FullSimplify[
        ReplaceAll[%[[2]], {t'[τ] -> 
              dtdτ[r, Em, M], ϕ'[τ] -> 
              dϕdτ[r, Lm]}], 
        Assumptions -> (M ≥ 0 && 
              r ≥ 2  M)]

drdτ[r, Em, Lm, M]^2 // Expand

Geodesic equation:     (((d^2) 
            (x^α))/(d (τ^2)))   + (Subscript[Γ, β])(γ^α) ((dx^β)/d)τ(((dx^γ) )/d)τ = 0

Calculate  (Subscript[Γ, β])(γ^α) ((dx^β)/ds)((dx^γ)/ds);

Affine connection for the equatorial plane and explicit parameter dependence.

AffineSE = 
      ReplaceAll[
        AffineS, {r -> r[τ], θ -> (π/2)}]

geoeq[M_] = AffineSE . V . V

Geodesic equations: geox[M] == 0

geor[M_] = geoeq[M][[1]]  + r''[τ]

geoϕ[M_] = geoeq[M][[3]] + ϕ''[τ]

geot[M_] = geoeq[M][[4]] + t''[τ]

Constants of the motion from the geodesic equations

The ϕ equation geoϕ[M]   provides the angular momentum constant of the motion L = r[τ]^2ϕ'[τ]

(∂_τ)( r[τ]^2 ϕ'[τ])

The t equation geot[M] provides the energy constant of the motion: Em = (1 - ((2 M)/r)[τ]) t'[τ]

(∂_τ) ((1 - 
                2  M/r[τ]) t'[τ]) == 0

(((2 M r'[τ] t'[τ])/(r[τ]^2))/((1 - ((2 M)/r)[τ])))+(((1 - ((2 M)/r)[τ]) t''[τ])/((1 - ((2 M)/r)[τ])))==0//Simplify

Riemann curvature tensor

Table[
      RiemannR[α, β, γ, δ], {α, 
        4}, {β, 4}, {γ, 4}, {δ, 4}]

ReplaceAll[
      Table[RiemannR[α, β, γ, δ], {α, 
          4}, {β, 4}, {γ, 4}, {δ, 
          4}], θ -> π/2]

Ricci, Einstein and Weyl tensors

Table[
      RicciR[α, β], {α, 4}, {β, 4}]

Sum[RicciR[α, α], {α, 4}]

Table[
      EinsteinG[-α, -β], {α, 4}, {β, 
        4}]

Simplify[
      Table[EinsteinG[-α, -β], {α, 4}, {β, 
          4}]]

Table[
      WeylC[α, -β, -γ, -δ], {α, 
        4}, {β, 4}, {γ, 4}, {δ, 4}]

ReplaceAll[
      Table[WeylC[α, -β, -γ, -δ], {α, 4}, {β, 4}, {γ, 4}, {δ, 
          4}], θ -> (π/2)]