I'd like to check some results I obtained by using the VarD command, but the results I obtain disagree.
Under xCoba I define a Lagrangian L and perturb it using varL = L // Perturbation // ExpandPerturbation // ContractMetric // ToCanonical.
Then, I use
vartf = 2 (-VarD[pert[LI[1], a, b], cd][varL]/Sqrt[-Detbackground[]] /. delta[-LI[1], LI[1]] -> 1 // SeparateMetric[background] // RicciToEinstein) // Expand // ContractMetric // ToCanonical
eterm = IndexCollect[cd[a]@vartf // ToCanonical, cd[-b][sf[]]] // Simplification
to obtain the equations of motion.
Now, shouldn't the [t] or [0] component of eterm agree with
L1 = Simplify[Coefficient[Series[L, {\[Epsilon], 0, 1}], \[Epsilon], 1]];
(D[D[L1, \[Alpha][t[], x[], y[], z[]]] /Sqrt[-detg], t[]] +
D[D[L1, b1[t[], x[], y[], z[]]] /Sqrt[-detg], x[]] +
D[D[L1, b2[t[], x[], y[], z[]]] /Sqrt[-detg], y[]] +
D[D[L1, b3[t[], x[], y[], z[]]] /Sqrt[-detg], z[]])
when alpha and b1, b2, b3 are the [00] and [0i] metric perturbations and L1 is the first order perturbation of the Lagrangian? I think the result should be zero, as eterm corresponds to the background scalar equation of motion, times the derivative of a scalar field. I attached two MWE to illustrate my issue. If I am not mistaken, eterm should correspond to the conservation equation ( 1/sqrt(-g) * d (sqrt(-g)L / d g_ab ),a. Or does VarD work differently than I assumed?
If you see my mistake and could point it out to me, you'd help me tremendously. Thank you very much in advance.
Benedict