xPand: An algorithm for perturbing homogeneous cosmologies
Cyril Pitrou, Xavier Roy, Obinna Umeh
TL;DR
xPand delivers a fully geometrical, coordinate-free method to derive cosmological perturbation equations on arbitrary homogeneous backgrounds using a 3+1 splitting. By combining the xAct suite (xTensor/xPert) with the conformal transformation framework and a robust SVT decomposition, it enables perturbations to any order in any gauge, including FLRW and Bianchi cosmologies. The package automates curvature expansions, the Gauss–Codazzi decomposition, and the 3+1 splitting, while providing dedicated routines for matter perturbations and gauge transformations. Its primary contributions are the seamless, high-order perturbation derivations without tedious component-by-component calculations, validated against known first- and second-order results and extended to general homogeneous backgrounds. This capability significantly accelerates exploration of nonlinear cosmological perturbations and perturbed Bianchi models, with practical implications for precision cosmology and gravitational lensing studies.
Abstract
In this paper, we develop in detail a fully geometrical method for deriving perturbation equations about a spatially homogeneous background. This method relies on the 3+1 splitting of the background space-time and does not use any particular set of coordinates: it is implemented in terms of geometrical quantities only, using the tensor algebra package xTensor in the xAct distribution along with the extension for perturbations xPert. Our algorithm allows one to obtain the perturbation equations for all types of homogeneous cosmologies, up to any order and in all possible gauges. As applications, we recover the well-known perturbed Einstein equations for Friedmann-Lemaitre-Robertson-Walker cosmologies up to second order and for Bianchi I cosmologies at first order. This work paves the way to the study of these models at higher order and to that of any other perturbed Bianchi cosmologies, by circumventing the usually too cumbersome derivation of the perturbed equations.
