Declare that the zeroth order in a expansion is zero

24 views
Skip to first unread message

Gabriel Sánchez Pérez

unread,
Mar 20, 2025, 7:05:43 PM3/20/25
to xAct Tensor Computer Algebra
Hi!
I'm new with xAct and I have the following problem: I have defined a vector beta and I have perturbed it up to order 3
Screenshot from 2025-03-20 23-51-19.png
Now I can declare that the second order of the expansion vanishes, and it works:
Screenshot from 2025-03-20 23-53-25.png
But if I want to declare that the zeroth order vanishes, the output is identically zero:
Screenshot from 2025-03-20 23-54-47.png
How can I set the zeroth order to zero while keeping the remaining orders untouched?

Thank you,
Gabri

Juan Margalef

unread,
Mar 20, 2025, 11:32:10 PM3/20/25
to xAct Tensor Computer Algebra
The problem is that Perturbation[B[_],0] returns B[_] and when you make the rule to put that to zero, it is set to zero everywhere, leading to:

0+t Perturbation[0,1] +t^2/2 Perturbation[0,2] +t^3/3! Perturbation[0,3]

which is clearly zero.

The easiest solution is to define a the perturbed tensor DefTensorPerturbation[pertB[LI[n], a], B[a], M, PrintAs -> "\[CapitalDelta]\[Beta]"] and then Perturbed[B[a],3]/.{pertB[LI[0],_]->0} will work as expected.
Reply all
Reply to author
Forward
0 new messages