1/X in a Lagrangian

Quit

Covariant equations

<<xAct`xTensor`
<<xAct`xPert`

$Info=False;
$CVVerbose=False;

SetOptions[ContractMetric,AllowUpperDerivatives->True];
$DefInfoQ=$UndefInfoQ=False;  (*quita las salidas de operaciones*)
$PrePrint=ScreenDollarIndices;
$Pre=ScreenDollarIndices;(* evita que salgan los indices feos *)

$CommuteCovDsOnScalars=True;
DefManifold[M4,4,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,ñ,o,p,q,s,u,v,μ,ν,κ,λ}]
DefMetric[-1,metric[-a,-b],CD,PrintAs->"g"]

Unprotect[IndexForm];
IndexForm[LI[x_]]:=ColorString[ToString[x],RGBColor[0,0,1]];
Protect[IndexForm];

DefMetricPerturbation[metric,metpert,ϵ];
PrintAs[metpert]^="h";

DefTensor[Phi[],M4,PrintAs->"φ"]
DefTensorPerturbation[PertPhi[LI[order]],Phi[],M4,PrintAs->"δφ"]

DefTensor[PhiC[],M4,PrintAs->"(SuperStar[φ])"]
DefTensorPerturbation[PertPhiC[LI[order]],PhiC[],M4,PrintAs->"(SuperStar[δφ])"]

(* We defining X and other constant
Definiendo X=(Subscript[▽, a])ϕ (▽^a)(SuperStar[ϕ]) *)

DefTensor[X[],M4,PrintAs->"X"]
IndexSet[X[],Scalar[CD[a][Phi[]]CD[-a][PhiC[]]]]

DefConstantSymbol[eta, PrintAs ->"η"]

(* Lagrangian *)

L3=Sqrt[-Detmetric[]]*((eta/(X[]))*(CD[-a]@CD[a]@PhiC[]*CD[-b]@CD[b]@Phi[]-CD[a]@CD[b]@PhiC[]*CD[-a]@CD[-b]@Phi[]))

Lpert3=ToCanonical@NoScalar@ContractMetric@ExpandPerturbation@Perturbation@L3;

E3=(VarD[PertPhi[LI[1]],CD][Lpert3]/Sqrt[-Detmetric[]]/.delta[-LI[1],LI[1]]->1)//SeparateMetric[metric]//RicciToEinstein//ContractMetric//ToCanonical//Simplification