Hi David,
Thank you for using xAct.
I think the problem could be coming from the fact that for a tensor T
we have
perturbedT = T + eps Perturbation[T] + eps^2 Perturbation[T] / 2! +
eps^3 Perturbation[T] / 3! + ...
You get the full expression you want with xPert using (I assume eps is
the perturbation parameter)
Perturbed[ Sqrt[ Detg[] ], 2 ] / Sqrt[ Detg[] ] // ExpandPerturbation
Collect[ NoScalar[%], eps, ToCanonical ]
Note the use of NoScalar. The result is
1 + eps trace(h1) / 2 + eps^2 ( trace(h2) / 4 + trace(h1)^2 / 8 -
trace(h1.h1) / 4 )
where h1 is the first-order perturbation of the metric and h2 is its
second-order perturbation. I guess the last term is this formula is
the term you are worried about.
If you still think this result is incorrect, please let us know.
Cheers,
Jose.