\(
\)

<< EDCRGTCcode.m

(Section 4.3) - Exercise: Find the simpRules that must be used in order that RGtensors prints Ricci Flat when applied to the Kruskal form of the Schwarzschild metric:

gKRUSKAL = {{0, -8 M^2 (1 - 2  M/r[u, v])/(u*v), 
              0, 0}, {-8 M^2 (1 - 2  M/r[u, v])/(u*v), 0, 0, 
              0}, {0, 0, -r[u, v]^2, 0}, {0, 0, 
              0, -r[u, v]^2 Sin[θ]^2}};

xCoord = {u, v, θ, φ};

Where r[u,v] is related to the coordinates u,v by the equation (2M-r[u,v])Exp[r[u,v]/(2M)]-2M*u*v=0.

Solution:

simpRules = {};

zer0=(2  M - r[u, v]) Exp[r[u, v]/(2  M)] - 2  M*u*v

Use the following rule to satisfy zer0=0:

expRule = {(E^(-r[u, v]/(2 M))) -> (2 M - 
                r[u, v])/(2 M u v)}

Factor[
      Expand[(E^(-r[u, v]/(2 M))) zer0] /. 
        expRule]

Solve the u, v derivatives of zer0=0 for the u, v derivatives of r[u,v] :

ruvSOL = 
      FacSimp[Solve[Map[D[zer0, #] &, {u, v}] == 0, 
            Map[D[r[u, v], #] &, {u, v}]][[1]]]

Combine the 3 rules in simpRules:

simpRules = Join[FacSimp[ruvSOL /. expRule], expRule]

RGtensors[gKRUSKAL, xCoord]