# Perturbation of Einstein tensor around a fixed background in Xact [duplicate]

I want to compute Ricci tensor expansion around a fixed curved background. It is easy to find the formal expansion around the background metric, but I have a reference metric with known components and I don't know how to plug it in the Xact code.

<< xActxPert

(* Define a 4-dimensional manifold. *)
DefManifold[M, 4, IndexRange[a, l]]

(* Define a (Lorentzian) metric and its associated curvature tensors. *)
DefMetric[-1, metric[-a, -b], CD, PrintAs -> "g"]

(* Define metric perturbations, with H being the fluctuation of the metric. *)
DefMetricPerturbation[metric, H, ϵ]

linearEinstein = ExpandPerturbation @ Perturbation[ EinsteinCD[-a, -b] ]

linearEinstein // ContractMetric // ToCanonical



I copied the code which have written in this link Linearized Einstein Equations with Mathematica. I have the following metric with the coordinate (t,x,y,u)

{{-1/ (u^2), 0, 0, 0}, {0, 1/u^2, 0, 0}, {0, 0, 1/ (u^2), 0}, {0,
0, 0, 1/u^2 }}


How can I do the perturbation of the Ricci or Einstein tensor explicitly?

• In general, you need to use xCoba to do calculations in a coordinate basis. I would start by calculating the desired tensor quantities in abstract index notation (which I think your code does?) and then use xCoba to calculate the coordinate components of the results. Aug 5, 2021 at 15:35
• @MichaelSeifert, dear Michael, I used xPert, and I have xCoba package too, but in that link, I couldn't find how perturbation is entered to the code. If you have worked with this kind of calculations, I am thankful to you if you promote your comment to an answer. Aug 5, 2021 at 18:17