Hi all !,
I would like to ask you some problem that I have with xAct and I don't get any solution. Let me explain:
I am working in f(R) gravity (is a generalization of general relativity, in the sense that you have more curvature terms than the Einstein-Hilbert action given only by the Ricci scalar) under a FRW background and I want to get the "new" Einstein equations, which can be got doing a variation of the action in terms of the metric of the space-time g_{\mu\nu}. xAct can get the typical Einstein equations when you consider only the Einstein-Hilbert term in a very easy way. For instance, you can get the Friedman equation (given the inflationary action) that claims: H^2=(1/3Mpl^2)*(V+\phi'^2/2), where H is the Hubble constant, V is the potential of inflation, Mpl is the Planck mass and phi' the time-derivative of the inflaton.
In particular: I don't have the idea how to get this Friedman equation in modified f(R) in xAct, see the notebook that I post. With my code you can get easily the Frieddman-equations when you have only the Einstein-Hilbert action, but for instance if you take a term like the contraction of the Riemann by itself
L = Sqrt[-Detmetricg[]] RiemannCD[-\[Alpha], -\[Beta], -\[Eta], -\[Lambda]] RiemannCD[\[Alpha], \[Beta], \[Eta], \[Lambda]]
then you get a lot of errors, which doesn't make sense, since the you are able to compute the Riemann, Ricci and Christoffel components for the FRW metric, and then xAct only has to substitute this on the expression that he is able to get when he performs a variation of the action with the metric:
metricg[-\[Mu], -\[Nu]]
RiemannCD[-\[Alpha], -\[Beta], -\[Eta], -\[Lambda]]
RiemannCD[\[Alpha], \[Beta], \[Eta], \[Lambda]] -
4 RiemannCD[-\[Mu], \[Alpha], \[Beta], \[Eta]]
RiemannCD[-\[Nu], -\[Alpha], -\[Beta], -\[Eta]] - 4 CD[-\[Alpha]][
CD[-\[Beta]][
RiemannCD[-\[Mu], \[Alpha], -\[Nu], \[Beta]]]] - 4 CD[-\[Beta]][
CD[-\[Alpha]][
RiemannCD[-\[Mu], \[Alpha], -\[Nu], \[Beta]]]]
This problem also happens when you take the Ricci contraction for instance:
L = Sqrt[-Detmetricg[]] RicciCD[-\[Alpha], -\[Beta]] RicciCD[\[Alpha], \[Beta]]
Anyone knows how to solve that? See my notebook please, and comment something if you have some question or already the answer :) ! Thanks.