Code C1: Static + spherically symmetric Killing vectors
Last edited by Jens Boos (jens.boos@kit.edu), Oct 6, 2024.
(For definitions and conventions refer to the lecture notes.)
Website: http://www.spintwo.net/Courses/EMRI-101/

(* clear all *)
Clear[gtt,grr,gθθ,gϕϕ,Γttr,Γrtt,Γrrr,Γrθθ,Γrϕϕ,Γθrθ,Γϕrϕ,Γθϕϕ,Γϕθϕ,ξt,ξr,ξθ,ξϕ,AA,BB,CC,Ktt,Ktr,Ktθ,Ktϕ,Krr,Krθ,Krϕ,Kθθ,Kθϕ,Kϕϕ];

(* timelike Killing vector *)
ζ={1,0,0,0};

(* rotational Killing vector ((ρ1)^μ) *)
ρ1={0,0,0,1};

(* spatial Killing vector ((ρ2)^μ) *)
ρ2={0,0,Sin[ϕ],Cot[θ]Cos[ϕ]};

(* spatial Killing vector ((ρ3)^μ) *)
ρ3={0,0,-Cos[ϕ],Cot[θ]Sin[ϕ]};

(* which one do we want to check? *)
ξ=ρ3;

(* components *)
ξt=ξ[[1]];
ξr=ξ[[2]];
ξθ=ξ[[3]];
ξϕ=ξ[[4]];

(* metric, connection, and torsion coefficients *)
AA=f[r];
BB=f[r];
CC=r^2;
gtt=-AA;
grr=1/BB;
gθθ=CC;
gϕϕ=CC Sin[θ]^2;
Γttr=D[AA,r]/(2AA);
Γrtt=BB D[AA,r]/2;
Γrrr=-D[BB,r]/(2BB);
Γrθθ=-BB D[CC,r]/2;
Γrϕϕ=-BB D[CC,r]/2 Sin[θ]^2;
Γθrθ=D[CC,r]/(2CC);
Γϕrϕ=D[CC,r]/(2CC);
Γθϕϕ=-Sin[θ]Cos[θ];
Γϕθϕ=Cos[θ]/Sin[θ];

(* Killing equations *)
Ktt=gtt D[ξt,t]-Γrtt grr ξr//Simplify
Ktr=grr D[ξr,t]+D[gtt ξt,r]-2gtt Γttr ξt//Simplify
Ktθ=gθθ D[ξθ,t]+gtt D[ξt,θ]//Simplify
Ktϕ=gϕϕ D[ξϕ,t]+gtt D[ξt,ϕ]//Simplify
Krr=D[grr ξr,r]-grr Γrrr ξr//Simplify
Krθ=D[gθθ ξθ,r]+grr D[ξr,θ]-2gθθ Γθrθ ξθ//Simplify
Krϕ=D[gϕϕ ξϕ,r]+grr D[ξr,ϕ]-2gϕϕ Γϕrϕ ξϕ//Simplify
Kθθ=gθθ D[ξθ,θ]-grr Γrθθ ξr//Simplify
Kθϕ=D[gϕϕ ξϕ,θ]+gθθ D[ξθ,ϕ]-2gϕϕ Γϕθϕ ξϕ//Simplify
Kϕϕ=gϕϕ D[ξϕ,ϕ]-grr Γrϕϕ ξr-gθθ Γθϕϕ ξθ//Simplify