<< EDCRGTCcode.m

◼  	 General 1st Order Perturbation of the Schwarzschild solution

xCoord = {t, r, θ, φ};

g = 
        DiagonalMatrix[{1 - 
              2  M/r, -1/(1 - 2  M/r), -r^2, -r^2 
              Sin[θ]^2}];

simpRules = TrigRules;

First evaluate the exact solution -- to use the appropriate covD later.

RGtensors[g, xCoord]

Under a coordinate perturbation, x[a]->x[a]+X1[a][x], the metric changes by  (Subscript[X1, a;b])+(Subscript[X1, b;a]), where the covD is with respect to the unperturbed metric

X1ab = 
        covD[{X1[1][t, r, θ, φ], X1[2][t, 
              r, θ, φ], X1[3][t, 
              r, θ, φ], X1[4][t, 
              r, θ, φ]}];
coordPerturb = X1ab + Transpose[X1ab]

Construct a symmetric matrix of functions of the coordinates:.

hh[a_, b_][t, 
        r, θ, φ] := hh[b, a][t, 
          r, θ, φ] /; a > b

symMat = 
      Table[hh[a, b][t, r, θ, φ], {a, 4}, {b, 
          4}]

General perturbation -- 1st order in the parameter lam.

gh1=Series[g+lam symMat,{lam, 0, 1}]

\(
\)

Compute the general first order perturbation of the Riemann and Ricci tensors:

RGtensors[gh1, xCoord, {0, 0}]

Use FuncRepRules to generate transformation rules to replace symMat(hh[a,b]) by coordPerturb((Subscript[X1, a;b])+(Subscript[X1, b;a])):

CoordSolRules = 
          Join @@ (Union[
                  Flatten[MapThread[ZZZ, {symMat, coordPerturb}, 2]]] /. 
                ZZZ -> FuncRepRules); // Timing

FacSimp[FacSimp[Rdd /. CoordSolRules]] // Timing

verifying hh[a,b]=(Subscript[X1, a;b])+(Subscript[X1, b;a]) is a solution of Rdd=0 to order 1.

That hh[a,b]=(Subscript[X1, a;b])+(Subscript[X1, b;a]) satisfies Rdd=0 to order 1, can be checked directly by calling RGtensors with this for hab

RGtensors[FacSimp[gh1 /. CoordSolRules], xCoord, {0, 0}]

Rdd

\(
\)

Note: Double Series expansions are not supported by RGTC. Thus to look for solutions of the 1st order perturbation equations for which the hh[a,b] have series expansions in 1/r, one must substitute these series expansions in Normal[Rdd] rather than in Rdd itself.