Dear Young-Hwan,
Thanks for your nice minimal example.
This is partly my fault. When you look at xPert code, you can see that in the section dedicated to the perturbation of determinants, there are two different methods. One when the order is less or equal than the dimension and one when the order is stricly larger than the dimension.
The method when order <= dim is based on Log@Trace formula and I implemented it using the tools of sorted partitions provided in xPert.
The method when order > dim is found right above this piece of code and it looks like
ExpandPerturbation1[Perturbation[mdet, order_.]] := blabla /;IntegerQ[dim] && order > dim;
In general, for nxn matrices, whenever we have a product of n+1 matrices and then a trace, this can be expressed in terms of other types of products and traces. For instance, in the example I attach, in 2 dimension, any traceless matrix A is such that Tr[A.A.A]=0. This is true only in dim=2 and wrong in dim=3.
The first method is the fastest one, but it fails to use the fact that
there are identities between traces of products of matrices so it would give results for the perturbation dim+1 dim+2 etc... and these should all vanish due to these identities. The second method is slightly slower, but by construction it has no perturbation if there was only the first order perturbation in the metric (dg[LI[1],i,j] is the only non-vanishing perturbation) in the case order > dim so it can be thought of as the method given the most compact result.
So the current state of xPert is to take the best of both world. The fastest when order <= dim, and the one which gives essentially 0 when order > dim (the most compact result).
In your case, your method would give the right result only if the Log-Trace method is used in all cases.
So you could modify xPert accordingly by commenting out
ExpandPerturbation1[Perturbation[mdet, order_.]] := blabla /;IntegerQ[dim] && order > dim;
such that this is never used.
And then removing the conditions at the end of
ExpandPerturbation1[Perturbation[mdet, order_.]] :=
mdet order! Plus @@
Map[(-1)^Length[#] productPertDet2[#, vbundle, pert] &,
SortedPartitions[order]] /; ! IntegerQ[dim] || order <= dim;
that is to say, commenting the '/; ! IntegerQ[dim] || order <= dim' condition so that this method is used in all cases. I have checked that in that case, the fact that the method is Exp Log based, suits perfectly your exponential and the result is 1 at all orders as you desire.
Best,
Cyril Pitrou