Schwarszschild metric and the Birkhoff theorem
Uses CTensor framework of xCoba

Cyril Pitrou (pitrou@iap.fr)
March 2018

Summary: A basic example to show how to use CTensor in the case of the Schwarszschild metric.
We shod the Birkhoff theorem which states that stationary spherically symmetric space-time is necessary the Schwarszschild metric.

Load xAct

<<xAct`xCoba`

$CVSimplify=Simplify;(* Why is it so useful ? *)

DefManifold[M4,4,{α,β,ρ,σ,μ,ν,λ}]

(*DefMetric[-1,g[-α,-β],CD,PrintAs->"g"(*,FlatMetric->True*)]*)

DefScalarFunction/@{λtt,λrr,A};
DefConstantSymbol[M]

?DefBasis

DefChart[B,M4,{1,2,3,4},{t[],r[],θ[],ϕ[]},ChartColor->Red]

Stationary and spherically symmetric metric

We choose a spherically symmetric metric (the last 2x2 part of the metric), and stationary (does not depend on time)

g=CTensor[DiagonalMatrix[{-Exp[λtt[r[]]],Exp[λrr[r[]]],r[]^2,r[]^2Sin[θ[]]^2}],{-B,-B}];

g[-μ,-ν]
g[μ,ν]

We need a metric to raise indices

?SetCMetric

So we tell xCoba that g is the metric

SetCMetric[g,B,SignatureOfMetric->{3,1,0}]
g[μ,ν]

SignDetOfMetric[g]

We compute all curvature tensor related to g

MetricCompute[g,B,All]

We define the CD associated to g

CD=LC[g];

Ricci does not vanishes (yet) as expect

xAct`xCoba`$LargeComponentSize=3000;(* This is to make sure expressions are displayed *)

Ricci[CD][μ,-ν]

Killing vector of the spherical symmetry

KV1=CTensor[{0,0,0,1},{B}];
KV2=CTensor[{0,0,Cos[ϕ[]],-Cot[θ[]]Sin[ϕ[]]},{B}];
KV3=CTensor[{0,0,-Sin[ϕ[]],-Cot[θ[]]Cos[ϕ[]]},{B}];

Symmetrize[CD[μ]@KV1[ν],{μ,ν}]
Symmetrize[CD[μ]@KV2[ν],{μ,ν}]
Symmetrize[CD[μ]@KV3[ν],{μ,ν}]

KVF of stationarity

KVt=CTensor[{1,0,0,0},{B}];
Symmetrize[CD[μ]@KVt[ν],{μ,ν}]

Birkhoff theorem

We solve the (Subscript[G, tt]) and the (Subscript[G, rr]) part of the Einstein equations in vacuum

G=Einstein[CD];

G[{1,B},{1,-B}]

Ruleλs=(Flatten@DSolve[({G[{1,B},{1,-B}]==0,G[{2,B},{2,-B}]==0(*,G[[1,2]]==0,*),λrr[Infinity]==0})/.r[]->r/.λtt->λttV/.λrr->λrrV,{λttV,λrrV},{r}])/.C[1]->Log[-2M]/.C[2]->0

λtt=λttV/.Ruleλs
λrr=λrrV/.Ruleλs

Schwarzschild metric

Now, with these rules, the metric and its Ricci are

g[-μ,-ν]//Simplify

Ricci[CD]

Riemann and Kretschmann

Riemann[CD][-μ,-ν,-α,β]

Kretschmann

Riemann[CD][-μ,-ν,-α,-β]Riemann[CD][μ,ν,α,β]//Simplify

We could have asked directly the Kretschmann tensor which had alrady been computed by MetricCompute

Kretschmann[CD]

Bianchi identities

?Antisymmetrize

Antisymmetrize[Riemann[CD][-α,-β,-μ,-ν],{-α,-β,-μ}]

CDR=CD[-λ]@Riemann[CD][-α,-β,-μ,-ν]//ToCanonical//ToCCanonical;

When we antisymmetrie we get 0

Antisymmetrize[CDR,{-λ,-α,-β}]

Levi - Civita Tensor

SignDetOfMetric[g]^=-1;

epsilon[g][{1,-B},{2,-B},{3,-B},{4,-B}]
epsilon[g][{1,B},{2,B},{3,B},{4,B}]

Eddington - Finkelstein coordinates

This section is given to serve as an extremely simple example of change of coordinates (that is change of chart).

?DefChart

DefChart[EF,M4,{1,2,3,4},{v[],r[],θ[],ϕ[]},ChartColor->Blue]

$Assumptions=And[
{t[],r[],v[],ϕ[],θ[]} ∈ Reals,
r[]>2M,
M>0,
0≤ θ[]≤ Pi,
0≤ ϕ[]<2Pi
]

The change of coordinates is (Identity should be Abs but let us restrict to the r>2M region)

EF2B={v[]-(r[] +2M Log@Identity[r[]/(2M)-1]),r[],θ[],ϕ[]};
B2EF={t[]+r[] +2M Log@Identity[r[]/(2M)-1],r[],θ,ϕ[]};

B2EFRules=Thread[{t[],r[],θ[],ϕ[]}->EF2B]
EF2BRules=Thread[{v[],r[],θ[],ϕ[]}->B2EF]

Some assumptions on the ranges taken by coordinates

$Assumptions=And[
{t[],v[],r[],ϕ[],θ[]} ∈ Reals,
r[]>2M,
0≤ θ[]≤ Pi,
0≤ ϕ[]<2Pi
]

B2EFRules/.EF2BRules//Simplify
EF2BRules/.B2EFRules//Simplify

This is the Jacobian that we computed from the change of coordinates

JEF2B=Simplify@Outer[D,EF2B,{v[],r[],θ[],ϕ[]}];
JB2EF=Simplify@Outer[D,B2EF,{t[],r[],θ[],ϕ[]}];

When building the CTensor which corresponds to the Jacobian, we must be very careful with the order of indices, otherwise it is the transpose !

EF2BJacobian=CTensor[JEF2B,{B,-EF}];
B2EFJacobian=CTensor[JB2EF,{EF,-B}];

But we could equally well use the Transpose and define

EF2BJacobian=CTensor[Transpose@JEF2B,{-EF,B}];
B2EFJacobian=CTensor[Transpose@JB2EF,{-B,EF}];

Here are the components of the Jacobians, and we check that one is the inverse of the other one

{EF2BJacobian[a,-b],B2EFJacobian[a,-b]}

(EF2BJacobian[b,-a]B2EFJacobian[c,-b]/.EF2BRules)//Simplify
(B2EFJacobian[b,-a]EF2BJacobian[c,-b]/.B2EFRules)//Simplify

If we know we prefer one of the charts (say Eddington-Finkelstein in this case) then set the corresponding Jacobian:

?SetBasisChange

SetBasisChange[EF2BJacobian]

Let us give a simple example of change of coordinates. 
Let us take some vector which is not Killing, that is which has no special propreties, and which depends explicitly on t in the B basis.

CV=CTensor[{t[],r[]Sin[θ],0,0},{B}]

Let us transform it to the EF coordinates and read the result (this requires to use the rules B2EFRules to read the result in the new basis AND and where all dependence is in the scalars of the new chart.)

ToCTensor[%,{EF}]
CV=%/.B2EFRules//Simplify

CV[μ]

We can look at the metric in the EF components

(ToCTensor[g,{-EF,-EF}][-μ,-ν]/.B2EFRules)
(ToCTensor[g,{EF,-EF}][μ,-ν]/.B2EFRules)
(ToCTensor[g,{EF,EF}][μ,ν]/.B2EFRules)

The determinant of the Jacobian is a density

Determinant[EF2BJacobian][]
Determinant[Inv[EF2BJacobian]][]
Jacobian[EF,B][]//ToValues

The determinant of the metric is regular at r=2M in these Eddington-Finkelstein coordinates

(Determinant[g,EF][]/.B2EFRules)//ToValues

However in usual coordinates it is not regular at r = 2 M :

g
(Det[g[[1]]]/.r[]->2M)

We want to check that v=Cte curves are geodesic
Let us look for the vector of the geodesic equation.

DefScalarFunction[f]

They must be generated by something of the form:

CTensor[{0,f[r[]],0,0},{EF}]

Let us determine the function f[].
We change k to the usual SZ chart

k=(ToCTensor[%,{B}]/.EF2BRules)//ToValues;
k[μ]

It does not satisfy yet the geodesic equation

k[μ]CD[-μ][k[ν]]//ToValues//Simplify

But it is null whatever f

k[μ]k[-μ]//Simplify

So we must determine the function f[r].

DefTensor[Acc[μ],M4]

We set (A^μ) = (k^ν)(Subscript[∇, ν])(k^μ).

IndexSet[Acc[ν_],k[μ]TensorDerivative[k,CD][ν,-μ]//ToValues//Simplify]

Solvef=DSolve[{Acc[{2,B}]==0,f[Infinity]==1}/.r[]->r/.f->fV,fV,r][[1]]

We replace what we have found from the geodesic condition. It is simply f[r] = r.

f=fV/.Solvef

And now the acceleration vanishes. We check that now it is indeed a null geodesic vector.

k[μ]//Simplify
k[μ]k[-μ]//Simplify
Acc[μ]//Simplify

Surface Gravity

Let us consider the Killing - Vector field of time translations

KV=KVt;

It is null at the horizon.

g[-μ,-ν]KV[μ]KV[ν]
%/.r[]:>2M

Surface gravity (Wald’s book 12.5.14) is  defined as (κ^(2 )) =  -1/2 (Subscript[∇, μ])(Subscript[V, ν])(∇^μ)(V^ν)

(-1/2CD[-μ]@KV[-ν]CD[μ]@KV[ν]//ToValues)
%/.r[]:>2M
Simplify[Sqrt@%,Assumptions->M>0]