Clear[coord,metric,inversemetric,affine,t,r,θ,ϕ]

n:=4

coord:={t,r,θ,ϕ}

metric:={{-B[r],0,0,0},
{0,C[r],0,0},
{0,0,r^2*A[r],0},
{0,0,0,r^2*Sin[θ]^2*A[r]}}

metric//MatrixForm

Det[metric]

inversemetric:=Simplify[Inverse[metric]]

inversemetric//MatrixForm

Calculating the Christoffel symbols of the second kind:

affine:=affine=Simplify[Table[(1/2) Sum[inversemetric[[Mu,Rho]] (D[metric[[Rho,Nu]],coord[[Lambda]]]+D[metric[[Rho,Lambda]],coord[[Nu]]]-D[metric[[Nu,Lambda]],coord[[Rho]]]),{Rho,1,n}],{Nu,1,n},{Lambda,1,n},{Mu,1,n}]]

listaffine:=Table[If[UnsameQ[affine[[Nu,Lambda,Mu]],0],{Style[Subsuperscript[Γ,Row[{coord[[Nu]],coord[[Lambda]]}],coord[[Mu]]],18],"=",Style[affine[[Nu,Lambda,Mu]],14]}],{Lambda,1,n},{Nu,1,Lambda},{Mu,1,n}]

Simplify[TableForm[Partition[DeleteCases[Flatten[listaffine],Null],3],TableSpacing->{1,2}]]

Defining the Riemann tensor.

riemann:=riemann=Table[D[affine[[Nu,Sigma,Mu]],coord[[Rho]]]-D[affine[[Nu,Rho,Mu]],coord[[Sigma]]]+Sum[affine[[Rho,Lambda,Mu]] affine[[Nu,Sigma,Lambda]]-affine[[Sigma,Lambda,Mu]] affine[[Nu,Rho,Lambda]],{Lambda,1,n}],{Mu,1,n},{Nu,1,n},{Rho,1,n},{Sigma,1,n}]

Defining the Riemann tensor with lower indices.

riemannDn:=riemannDn=Table[Simplify[Sum[metric[[Mu,Kappa]] riemann[[Kappa,Nu,Rho,Sigma]],{Kappa,1,n}]],{Mu,1,n},{Nu,1,n},{Rho,1,n},{Sigma,1,n}]

listRiemann:=Table[If[UnsameQ[riemannDn[[Mu,Nu,Rho,Sigma]],0],{Style[Subscript[R,Row[{coord[[Mu]],coord[[Nu]],coord[[Rho]],coord[[Sigma]]}]],16],"=",riemannDn[[Mu,Nu,Rho,Sigma]]}],{Nu,1,n},{Mu,1,Nu},{Sigma,1,n},{Rho,1,Sigma}]

Simplify[Simplify[TableForm[Partition[DeleteCases[Flatten[listRiemann],Null],3],TableSpacing->{2,2}]]]

Defining Ricci tensor:

ricci:=ricci=Table[Simplify[Sum[riemann[[Rho,Mu,Rho,Nu]],{Rho,1,n}]],{Mu,1,n},{Nu,1,n}]

listRicci:=Table[If[UnsameQ[ricci[[Mu,Nu]],0],{Style[Subscript[R,Row[{coord[[Mu]],coord[[Nu]]}]],16],"=",Style[ricci[[Mu,Nu]],16]}],{Nu,1,4},{Mu,1,Nu}]

TableForm[Partition[DeleteCases[Flatten[listRicci],Null],3],TableSpacing->{1,2}]

Defining Ricci scalar:

ricciscalar:=ricciscalar=Simplify[Sum[Sum[inversemetric[[Mu,Nu]] ricci[[Nu,Mu]],{Mu,1,n}],{Nu,1,n}]]

Simplify[Simplify[ricciscalar]]

RR=Simplify[ricciscalar]

Rtt:=((-B'[r] C'[r]+C[r] (((4/r)+((2 A'[r])/(A[r]))) B'[r]-(((B'[r])^2)/(B[r]))+2 B''[r]))/(4 ((C[r])^2)B[r]^2))

LeftTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[Rtt]]]]]];

RightTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[(1/2)*RR*(-1/B[R])]]]]]];

LeftTerm - RightTerm

rule7={(2 ((C[r])^2)+(r^2) A'[r] C'[r]-2 r C[r] (3 A'[r]+r A''[r]))->STUFF1};

Simplify[LeftTerm-RightTerm/.rule7]

rule8={(r^2) C[r] ((A'[r])^2)->STUFF2};

Simplify[Simplify[LeftTerm-RightTerm/.rule7]/.rule8]

rule9={-4 ((A[r])^2) (C[r]-r C'[r])->STUFF3};

Simplify[Simplify[Simplify[LeftTerm-RightTerm/.rule7]/.rule8]/.rule9]

rule10={2 STUFF1 A[r]->STUFF4};

Simplify[Simplify[Simplify[Simplify[LeftTerm-RightTerm/.rule7]/.rule8]/.rule9]/.rule10]

rule11={STUFF2+STUFF3+STUFF4->STUFF5};

Simplify[Simplify[Simplify[Simplify[Simplify[LeftTerm-RightTerm/.rule7]/.rule8]/.rule9]/.rule10]/.rule11]//ExpandAll

Rrr:=(2 r ((B[r])^2) C[r] ((A'[r])^2)+2 A[r] ((B[r])^2) (r A'[r] C'[r]-2 C[r] (2 A'[r]+r A''[r]))+((A[r])^2) (B[r] (4 B[r]+r B'[r]) C'[r]+r C[r] (((B'[r])^2)-2 B[r] B''[r])))/(4 r ((A[r])^2) ((B[r])^2) C[r])

Rrr:=(2 r ((B[r])^2) C[r] ((A'[r])^2)+2 A[r] ((B[r])^2) (r A'[r] C'[r]-2 C[r] (2 A'[r]+r A''[r]))+((A[r])^2) (B[r] (4 B[r]+r B'[r]) C'[r]+r C[r] (((B'[r])^2)-2 B[r] B''[r])))/(4 r ((A[r])^2) ((B[r])^2) C[r])

LeftTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[Rrr/C[r]^2]]]]]];

RightTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[(1/2)*RR*(1/C[r])]]]]]];

Simplify[LeftTerm - RightTerm]//ExpandAll//ExpandAll

(1/((r^2) ((C[r])^2)))-(1/((r^2) A[r] C[r]))+((-((2 A'[r])/(r A[r]))+(((A'[r])^2)/(2 ((A[r])^2))))/((C[r])^2))+((3 A'[r])/(r A[r] ((C[r])^2)))-(((A'[r])^2)/(4 ((A[r])^2) ((C[r])^2)))+((B'[r])/(r B[r] ((C[r])^2)))+((A'[r] B'[r])/(2 A[r] B[r] ((C[r])^2)))

(1/((r^2) ((C[r])^2)))-(1/((r^2) A[r] C[r]))+((-((2 A'[r])/(r A[r]((C[r])^2)))+(((A'[r])^2)/(2 ((A[r])^2)((C[r])^2))))/1)+((3 A'[r])/(r A[r] ((C[r])^2)))-(((A'[r])^2)/(4 ((A[r])^2) ((C[r])^2)))+((B'[r])/(r B[r] ((C[r])^2)))+((A'[r] B'[r])/(2 A[r] B[r] ((C[r])^2)))

(1/((r^2) ((C[r])^2)))-(1/((r^2) A[r] C[r]))+(-((2 A'[r])/(r A[r] ((C[r])^2)))+(((A'[r])^2)/(2 ((A[r])^2) ((C[r])^2))))+((3 A'[r])/(r A[r] ((C[r])^2)))-(((A'[r])^2)/(4 ((A[r])^2) ((C[r])^2)))+((B'[r])/(r B[r] ((C[r])^2)))+((A'[r] B'[r])/(2 A[r] B[r] ((C[r])^2)))//InputForm

1/(r^2*C[r]^2) - 1/(r^2*A[r]*C[r]) + (-2*Derivative[1][A][r])/(r*A[r]*C[r]^2) + 
   Derivative[1][A][r]^2/(2*A[r]^2*C[r]^2) + 
 (3*Derivative[1][A][r])/(r*A[r]*C[r]^2) - 
 Derivative[1][A][r]^2/(4*A[r]^2*C[r]^2) + 
 Derivative[1][B][r]/(r*B[r]*C[r]^2) + 
 (Derivative[1][A][r]*Derivative[1][B][r])/(2*A[r]*B[r]*C[r]^2)

(1/((r^2) ((C[r])^2)))-(1/((r^2) A[r] C[r]))+((A'[r])/(r A[r] ((C[r])^2)))+(((A'[r])^2)/(4 ((A[r])^2) ((C[r])^2)))+((B'[r])/(r B[r] ((C[r])^2)))+((A'[r] B'[r])/(2 A[r] B[r] ((C[r])^2)))//Simplify

Rthth:=(1/(4 B[r] ((C[r])^2)))(-(r^2) C[r] A'[r] B'[r]-2 A[r] (r C[r] B'[r]+B[r] (2 C[r]-r C'[r]))+B[r] (4 ((C[r])^2)+(r^2) A'[r] C'[r]-2 r C[r] (4 A'[r]+r A''[r])))

LeftTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[Rthth]]]]]];

RightTerm:=Simplify[Simplify[Simplify[Simplify[Simplify[Simplify[(1/2)*RR*((r^2*A[r]))]]]]]];

Simplify[LeftTerm - RightTerm]//ExpandAll//ExpandAll

-1+((A[r])/(C[r]))+(1-((A[r])/(C[r]))-((2 r A'[r])/(C[r]))-((r A[r] B'[r])/(2 B[r] C[r]))-(((r^2) A'[r] B'[r])/(4 B[r] C[r]))+((r A[r] C'[r])/(2 ((C[r])^2)))+(((r^2) A'[r] C'[r])/(4 ((C[r])^2)))-(((r^2) A''[r])/(2 C[r])))+((3 r A'[r])/(C[r]))-(((r^2) ((A'[r])^2))/(4 A[r] C[r]))+((r A[r] B'[r])/(B[r] C[r]))+(((r^2) A'[r] B'[r])/(2 B[r] C[r]))-(((r^2) A[r] ((B'[r])^2))/(4 ((B[r])^2) C[r]))-((r A[r] C'[r])/((C[r])^2))-(((r^2) A'[r] C'[r])/(2 ((C[r])^2)))-(((r^2) A[r] B'[r] C'[r])/(4 B[r] ((C[r])^2)))+(((r^2) A''[r])/(C[r]))+(((r^2) A[r] B''[r])/(2 B[r] C[r]))//InputForm

-1 + A[r]/C[r] + 
 1 - A[r]/C[r] - (2*r*Derivative[1][A][r])/C[r] - 
    (r*A[r]*Derivative[1][B][r])/(2*B[r]*C[r]) - 
    (r^2*Derivative[1][A][r]*Derivative[1][B][r])/
     (4*B[r]*C[r]) + (r*A[r]*Derivative[1][C][r])/(2*C[r]^2) + 
    (r^2*Derivative[1][A][r]*Derivative[1][C][r])/(4*C[r]^2) - 
    (r^2*Derivative[2][A][r])/(2*C[r]) + (3*r*Derivative[1][A][r])/C[r] - 
 (r^2*Derivative[1][A][r]^2)/(4*A[r]*C[r]) + 
 (r*A[r]*Derivative[1][B][r])/(B[r]*C[r]) + 
 (r^2*Derivative[1][A][r]*Derivative[1][B][r])/(2*B[r]*C[r]) - 
 (r^2*A[r]*Derivative[1][B][r]^2)/(4*B[r]^2*C[r]) - 
 (r*A[r]*Derivative[1][C][r])/C[r]^2 - 
 (r^2*Derivative[1][A][r]*Derivative[1][C][r])/(2*C[r]^2) - 
 (r^2*A[r]*Derivative[1][B][r]*Derivative[1][C][r])/
  (4*B[r]*C[r]^2) + (r^2*Derivative[2][A][r])/C[r] + 
 (r^2*A[r]*Derivative[2][B][r])/(2*B[r]*C[r])//ExpandAll//Simplify

(1/(4 A[r] ((B[r])^2) ((C[r])^2)))r (-r ((B[r])^2) C[r] ((A'[r])^2)+A[r] B[r] (r C[r] A'[r] B'[r]+B[r] (4 C[r] A'[r]-r A'[r] C'[r]+2 r C[r] A''[r]))-((A[r])^2) (r C[r] ((B'[r])^2)+2 ((B[r])^2) C'[r]+B[r] (r B'[r] C'[r]-2 C[r] (B'[r]+r B''[r]))))//InputForm

Now we define the expansions:

AA[r] := 1 + e*A1[r]

BB[r] := 1 + e*B1[r]

CC[r] := 1 + e*C1[r]

tt:=(4*BB[r]*CC[r]^2*m^2*r^2*AA[r]^3)+AA[r]^2*(2BB[r](CC[r]-3)CC[r]^2m^2r^2 - 4*Sqrt[AA[r]^2BB[r]CC[r]](CC[r]-r*Derivative[1][CC][r]) )+2*Sqrt[AA[r]^2BB[r]CC[r]]*(2CC[r]^2 - 2r(3Derivative[1][AA][r]+r*Derivative[2][AA][r])CC[r] + r^2Derivative[1][AA][r]Derivative[1][CC][r])AA[r]+CC[r]Sqrt[AA[r]^2BB[r]CC[r]]*r^2*(Derivative[1][AA][r])^2

tt

rule12={(Sqrt[(((1+e A1[r]))^2) (1+e B1[r]) (1+e C1[r])])-> 1};

rule13={AA'[r]->e*Derivative[1][A1][r]};

rule14={AA''[r]->e*Derivative[2][A1][r]};

rule15={CC''[r]->e*Derivative[2][C1][r]};

rule16={CC'[r]->e*Derivative[1][C1][r]};

ttSim:=Coefficient[tt/.rule12/.rule13/.rule14/.rule15/.rule16,e]//Simplify

ttSim

rr:=(4(BB[r]+r*Derivative[1][BB][r])AA[r]^2 +(2r^2Derivative[1][AA][r]Derivative[1][BB][r]-4BB[r](CC[r]-r Derivative[1][AA][r]))AA[r] + BB[r]^2r^2(Derivative[1][AA][r])^2 )/(r^2*AA[r]^2BB[r]CC[r]^2) - (2(2AA[r]+BB[r]-3)m^2)/(Sqrt[AA[r]^2BB[r]CC[r]])

rule17={(Sqrt[(((1+e A1[r]))^2) (1+e B1[r]) (1+e C1[r])])^(-1)->1};

rule18={(((1+e A1[r]))^2) (1+e B1[r]) (1+e C1[r])->1};

rule19={((((1+e A1[r]))^2) (1+e B1[r]) (((1+e C1[r]))^2))^(-1)->1};

rule20={BB'[r]->e*Derivative[1][B1][r]};

rule21={BB''[r]->e*Derivative[2][B1][r]};

rrSim:=rr/.rule12/.rule13/.rule14/.rule15/.rule16/.rule17/.rule18/.rule19/.rule20/.rule21

rrSimSim=Coefficient[rrSim/.rule12/.rule13/.rule14/.rule15/.rule16,e]//Simplify

thth:=-2BB[r]^2CC[r]^2m^2r*AA[r]^4-2BB[r]^2CC[r]^2(BB[r]+CC[r]-3)m^2r*AA[r]^3-Sqrt[AA[r]^2BB[r]CC[r]](2Derivative[1][CC][r]BB[r]^2+(r Derivative[1][BB][r]Derivative[1][CC][r] - 2CC[r](Derivative[1][BB][r]+r*Derivative[2][BB][r]))BB[r] + CC[r]r(Derivative[1][BB][r])^2)AA[r]^2+BB[r]Sqrt[AA[r]^2BB[r]CC[r]](CC[r]r Derivative[1][AA][r] Derivative[1][BB][r] + BB[r](4CC[r]Derivative[1][AA][r]- r Derivative[1][CC][r] Derivative[1][AA][r] + 2CC[r]r Derivative[2][AA][r]))AA[r]-BB[r]^2CC[r]Sqrt[AA[r]^2BB[r]CC[r]]r (Derivative[1][AA][r])^2

ththSim:=thth/.rule12/.rule13/.rule14/.rule15/.rule16/.rule17/.rule18/.rule19/.rule20/.rule21

thSimSim=Coefficient[ththSim/.rule12/.rule13/.rule14/.rule15/.rule16/.rule17/.rule18/.rule19/.rule20/.rule21,e]//Simplify

NSolve[{ttSim==0,rrSimSim==0,thSimSim==0},{A1[r],Derivative[1][A1][r],Derivative[2][A1][r]}]//Simplify//FullSimplify

AA1:=NSolve[{ttSim==0,rrSimSim==0,thSimSim==0},{A1[r],Derivative[1][A1][r],Derivative[2][A1][r]}]//Simplify//FullSimplify

A1D0:=AA1[[All, 1, 2]];A1D0[[1]]//Simplify

A1D1:=AA1[[All, 2, 2]];A1D1[[1]]

A1D2:=AA1[[All, 3, 2]];A1D2[[1]]

NSolve[{D[A1D0[[1]],r]==A1D1[[1]],D[A1D1[[1]],r]==A1D2[[1]]},{C1[r],D[C1[r],r]}]//Simplify

CC1:=NSolve[{D[A1D0[[1]],r]==A1D1[[1]],D[A1D1[[1]],r]==A1D2[[1]]},{C1[r],D[C1[r],r]}]//Simplify;

C1D0:=CC1[[All, 1, 2]];C1D0[[1]]

C1D1:=CC1[[All, 2, 2]];C1D1[[1]]

D[C1D0[[1]],r]-C1D1[[1]]//Simplify

DSolve[-3 (m^2) r B1[r]+6B1'[r]+3 r B1''[r]==0,B1[r],r]

BB1[r_]:=-(8G*M/3)*E^(-m*r)/r

BB1[r]

CC1new[r]:=-2BB1[r]+((3 D[BB1[r],r]+2*r* D[D[BB1[r],r],r])/((m^2) r))//Simplify

CC1new[r]

AA1new[r]:=-(3/2)BB1[r]-(1/2)CC1new[r]+((2 BB1'[r]+ r BB1''[r])/((m^2) r))//Simplify

AA1new[r]

Now on to the O(e^2) problem.

AA2[r] := 1 + e*A1[r]+e^2*A2[r]

BB2[r] := 1 + e*B1[r]+e^2*b2[r]

CC2[r] := 1 + e*C1[r]+e^2*C2[r]

tt2:=(4CC2[r]^2*m^2*r^2*AA2[r])+AA2[r]^2*(2BB2[r](CC2[r]-3)CC2[r]^2m^2r^2 - 4*Sqrt[AA2[r]^2BB2[r]CC2[r]](CC2[r]-r*Derivative[1][CC2][r]) )+2*Sqrt[AA2[r]^2BB2[r]CC2[r]]*(2CC2[r]^2 - 2r(3Derivative[1][AA2][r]+r*Derivative[2][AA2][r])CC2[r] + r^2Derivative[1][AA2][r]Derivative[1][CC2][r])AA2[r]+CC2[r]Sqrt[AA2[r]^2BB2[r]CC2[r]]*r^2(Derivative[1][AA2][r])^2

rr2:=(4(BB2[r]+r*Derivative[1][BB2][r])AA2[r]^2 +(2r^2Derivative[1][AA2][r]Derivative[1][BB2][r]-4BB2[r](CC2[r]-r Derivative[1][AA2][r]))AA2[r] + BB2[r]^2r^2(Derivative[1][AA2][r])^2 )- (2*r^2*(2AA2[r]+BB2[r]-3)m^2*CC2[r])

rr2

thth2:=-2m^2r-2BB2[r]*CC2[r]*(BB2[r]+CC2[r]-3)m^2r*AA2[r]-(2Derivative[1][CC2][r]BB2[r]^2+(r Derivative[1][BB2][r]Derivative[1][CC2][r] - 2CC2[r](Derivative[1][BB2][r]+r*Derivative[2][BB2][r]))BB2[r] + CC2[r]r(Derivative[1][BB2][r])^2)AA2[r]^2+BB2[r](CC2[r]r Derivative[1][AA2][r] Derivative[1][BB2][r] + BB2[r](4CC2[r]Derivative[1][AA2][r]- r Derivative[1][CC2][r] Derivative[1][AA2][r] + 2CC2[r]r Derivative[2][AA2][r]))AA2[r]-BB2[r]^2CC2[r]*r (Derivative[1][AA2][r])^2

rule22={(Sqrt[(((1+e A1[r]+(e^2) A2[r]))^2) (1+e B1[r]+(e^2) b2[r]) (1+e C1[r]+(e^2) C2[r])])-> 1};

rule23={(((1+e A1[r]+(e^2) A2[r]))^3) (1+e B1[r]+(e^2) b2[r]) (((1+e C1[r]+(e^2) C2[r]))^2)-> (1+e A1[r]+(e^2) A2[r])(1+e C1[r]+(e^2) C2[r])};

rule25={AA2[r]-> 1 + e*A1[r]+e^2*A2[r]};

rule26={AA2'[r]-> D[1 + e*A1[r]+e^2*A2[r],r]};

rule27={AA2''[r]-> D[D[1 + e*A1[r]+e^2*A2[r],r],r]};

rule28={BB2[r]-> 1 + e*B1[r]+e^2*b2[r]};

rule29={BB2'[r]-> D[1 + e*B1[r]+e^2*b2[r],r]};

rule30={BB2''[r]-> D[D[1 + e*B1[r]+e^2*b2[r],r],r]};

rule31={CC2[r]-> 1 + e*C1[r]+e^2*C2[r]};

rule32={CC2'[r]-> D[1 + e*C1[r]+e^2*C2[r],r]};

rule33={CC2''[r]-> D[D[1 + e*C1[r]+e^2*C2[r],r],r]};

tt2

ttSim2:=Coefficient[tt2/.rule22/.rule23/.rule25/.rule26/.rule27/.rule28/.rule29/.rule30/.rule31/.rule32/.rule33,e^2]/.rule50/.rule51/.rule52/.rule53/.rule54/.rule55/.rule56/.rule57/.rule58/.rule59/.rule60/.rule61/.rule63/.rule64/.rule65//Simplify

ttSim2/.ruleE

ttSim2:=((80 (G^2) (M^2))/((m^4) (r^6)))-4 A2[r]+4 C2[r]-12 r A2'[r]+4 r C2'[r]-4 (r^2) A2''[r]

ttSim2

ruleE={m^2r^2-> 0,m^4*r^4-> 0};

ruleA={((((1+e A1[r]+(e^2) A2[r]))^2) (1+e B1[r]+(e^2) b2[r]) (((1+e C1[r]+(e^2) C2[r]))^2))^(-1)-> 1,((((1+((4 e G M)/(3 (m^2) (r^3)))+(e^2) A2[r]))^2) (1-((8 e G M)/(3 r))+(e^2) b2[r]) (((1-((8 e G M)/(3 (m^2) (r^3)))+(e^2) C2[r]))^2))^(-1)-> 1,
((Sqrt[(((1+((4 e G M)/(3 (m^2) (r^3)))+(e^2) A2[r]))^2) (1-((8 e G M)/(3 r))+(e^2) b2[r]) (1-((8 e G M)/(3 (m^2) (r^3)))+(e^2) C2[r])]))^(-1)-> 1,
((r^2) (((1+e A1[r]+(e^2) A2[r]))^2) (1+e B1[r]+(e^2) b2[r]) (((1+e C1[r]+(e^2) C2[r]))^2))-> 1};

rr2

rrSim2:=Coefficient[rr2/.rule22/.rule23/.rule25/.rule26/.rule27/.rule28/.rule29/.rule30/.rule31/.rule32/.rule33,e^2]/.ruleA/.rule50/.rule51/.rule52/.rule53/.rule54/.rule55/.rule56/.rule57/.rule58/.rule59/.rule60/.rule61/.rule63/.rule64/.rule65//Simplify

rrSim2/.ruleE//ExpandAll

thth2

ththSim2:=Coefficient[thth2/.rule22/.rule23/.rule25/.rule26/.rule27/.rule28/.rule29/.rule30/.rule31/.rule32/.rule33,e^2]/.rule50/.rule51/.rule52/.rule53/.rule54/.rule55/.rule56/.rule57/.rule58/.rule59/.rule60/.rule61/.rule63/.rule64/.rule65//Simplify

ththSim2//ExpandAll

ththSim2:=((1024 (G^6) (M^6))/(27 (m^12) (r^19)))-((128 (G^4) (M^4))/((m^8) (r^13)))-((48 (G^2) (M^2))/((m^4) (r^7)))-((128 (G^4) (M^4) A2[r])/(9 (m^8) (r^13)))+((64 (G^2) (M^2) A2[r])/((m^4) (r^7)))+2 (m^2) r A2[r]+((32 (G^2) (M^2) b2[r])/((m^4) (r^7)))-((64 (G^4) (M^4) C2[r])/(9 (m^8) (r^13)))+((32 (G^2) (M^2) C2[r])/((m^4) (r^7)))+4 A2'[r]-((8 (G^2) (M^2) A2'[r])/(3 (m^4) (r^6)))-2 C2'[r]+((8 (G^2) (M^2) C2'[r])/(3 (m^4) (r^6)))+2 r A2''[r]

ththSim2

AAA2:=Solve[{ttSim2==0,rrSim2==0,ththSim2==0},{A2[r],Derivative[1][A2][r],Derivative[2][A2][r]}]

A2D0:=AAA2[[All, 1, 2]];A2D0new = Simplify[A2D0]/.ruleE//ExpandAll

A2D1:=AAA2[[All, 2, 2]];A2D1new=Simplify[A2D1]

A2D1new:=(1/(9 (m^8) (r^13) (((-1+(m^2) (r^2)))^2)))(-72 (G^2) (m^4) (M^2) (r^6)-440 (G^2) (m^6) (M^2) (r^8)-160 (G^2) (m^8) (M^2) (r^10)-288 (G^2) (m^10) (M^2) (r^12)+256 (G^2) (m^12) (M^2) (r^14)-36 (m^10) (r^14) b2[r]-54 (m^10) (r^14) C2[r]+18 (m^12) (r^16) C2[r]+45 (m^8) (r^13) b2'[r]-9 (m^12) (r^17) b2'[r]+18 (m^8) (r^14) b2''[r]-18 (m^10) (r^16) b2''[r])//Simplify

A2D1new/.ruleE

A2D2:=AAA2[[All, 3, 2]];A2D2new=Simplify[A2D2]

A2D2new:= (1/(9 (m^8) (r^14) (((-1+(m^2) (r^2)))^2)))(360 (G^2) (m^4) (M^2) (r^6)+644 (G^2) (m^6) (M^2) (r^8)+596 (G^2) (m^8) (M^2) (r^10)+800 (G^2) (m^10) (M^2) (r^12)-640 (G^2) (m^12) (M^2) (r^14)+81 (m^10) (r^14) b2[r]+9 (m^12) (r^16) b2[r]+126 (m^10) (r^14) C2[r]-36 (m^12) (r^16) C2[r]-99 (m^8) (r^13) b2'[r]-18 (m^10) (r^15) b2'[r]+27 (m^12) (r^17) b2'[r]+9 (m^8) (r^13) C2'[r]-18 (m^10) (r^15) C2'[r]+9 (m^12) (r^17) C2'[r]-45 (m^8) (r^14) b2''[r]+45 (m^10) (r^16) b2''[r])

A2D2new/.ruleE

Solve[{D[A2D0new/.ruleE,r]==A2D1new/.ruleE,D[A2D1new/.ruleE,r]==A2D2new/.ruleE},{C2[r],D[C2[r],r]}]/.ruleE

CCC2:=Solve[{D[A2D0new/.ruleE,r]==A2D1new/.ruleE,D[A2D1new/.ruleE,r]==A2D2new/.ruleE},{C2[r],D[C2[r],r]}]/.ruleE;

CCC2

C2D0:=CCC2[[All, 1, 2]];C2D0[[1]];

C2D1:=CCC2[[All, 2, 2]];C2D1[[1]];

ruleG={-14 (m^2)+28 (m^4) (r^2)+6 (m^6) (r^4)-> -14m^2};

D[C2D0[[1]],r]-C2D1[[1]]==0/.ruleG//ExpandAll

BEQN=((716 (G^2) (M^2))/(7 (m^4) (r^7)))-(2/7) (m^2) r b2[r]-((b2'[r])/(7 (m^2) (r^2)))+((b2''[r])/(7 (m^2) r))+((5 Derivative[3][b2][r])/(14 (m^2)))+((r Derivative[4][b2][r])/(14 (m^2)))

rule50={B1[r]->-((8 (G* M))/(3 r))};

rule51={C1[r]->-((8 (G *M))/(3 (m^2) (r^3)))};

rule52={A1[r]->((4 G*M)/(3 (m^2) (r^3)))};

rule53={B1'[r]->D[-((8 (G *M))/(3 r)),r]};

rule54={C1'[r]->D[-((8 (G* M))/(3 (m^2) (r^3))),r]};

rule55={A1'[r]->D[((4 G*M)/(3 (m^2) (r^3))),r]};

rule56={B1''[r]->D[D[-((8 (G* M))/(3 r)),r],r]};

rule57={C1''[r]->D[D[-((8 (G M))/(3 (m^2) (r^3))),r],r]};

rule58={A1''[r]->D[D[((4 G*M)/(3 (m^2) (r^3))),r],r]};

rule59={Derivative[3][B1][r]->D[D[D[-((8 (G M))/(3 r)),r],r],r]};

rule60={Derivative[3][C1][r]->D[D[D[-((8 (G M))/(3 (m^2) (r^3))),r],r],r]};

rule61={Derivative[3][A1][r]->D[D[D[((4 G*M)/(3 (m^2) (r^3))),r],r],r]};

rule63={Derivative[4][B1][r]->D[D[D[D[-((8 (G M))/(3 r)),r],r],r],r]};

rule64={Derivative[4][C1][r]->D[D[D[D[-((8 (G M))/(3 (m^2) (r^3))),r],r],r],r]};

rule65={Derivative[4][A1][r]->D[D[D[D[((4 G*M)/(3 (m^2) (r^3))),r],r],r],r]};

DSolve[BEQN==0,b2[r],r]