<<EDCRGTCcode.m

coordinates={t,r,θ,ϕ};
metricSch=DiagonalMatrix[{-A[r],B[r],r^2,r^2 Sin[θ]^2}];

RGtensors[metricSch,coordinates]

Rdd//Simplify

Rdd[[3,3]]/Rdd[[4,4]]

combo=α Rdd[[1,1]]+Rdd[[2,2]];

tmp=Coefficient[combo,A''[r]]
Coefficient[combo,B''[r]]
Coefficient[combo,A'[r] B'[r]]

sub=Solve[tmp==0,α]//First

tmp1=combo/.sub//Simplify

sub1=FuncRepRules[B[r],1/A[r]]

tmp1/.sub1

tmp2=Rdd[[3,3]]/.sub1

DSolve[tmp2==0,A[r],r]//First

sub2=FuncRepRules[A[r],1+c/r]

Rdd[[1,1]]/.sub1/.sub2//Simplify

Rdd[[2,2]]/.sub1/.sub2//Simplify

Rdd[[3,3]]/.sub1/.sub2//Simplify

gdd/.sub1/.sub2/.{c-> -2 G M}

metrica={{-1+((2 G M)/r),0,0,0},{0,(1/(1-((2 G M)/r))),0,0},{0,0,(r^2),0},{0,0,0,(r^2) ((Sin[θ])^2)}}

RGtensors[metrica, coordinates]

RUUUU=multiDot[gUU,multiDot[gUU,multiDot[gUU,RUddd,{2,2}],{2,3}],{2,4}];
Kretschmann=multiDot[Rdddd,RUUUU,{1,1},{2,2},{3,3},{4,4}]//Simplify