1 Introduction

Explaining the observed accelerated phase of the late Universe [1, 2] is till now an argument of debate. According to the present view, approximately 70% of the energy content of the Universe is a mysterious form of dark energy, exotic, invisible, and unclustered. Many classes of models have been proposed to address the problem. They can be classified as follows: (i) models with cosmological constant \(\Lambda \); (ii) dark energy related to some fundamental field; and (iii) possible modifications of gravity. The cosmological constant \(\Lambda \) gives rise to the cosmic acceleration and dominate today the Universe. It seems to be the most obvious explanation. However, the cosmological constant is affected by the well known cosmological constant problem and the 8coincidence problem [3].

The second class of models postulates the existence of a dark energy fluid (the equation of state is \(P \approx -\rho \) (\(\rho \) and P are the energy density and pressure of the fluid, respectively), and it is assumed to dominate the late Universe. Such a fluid should be related to some fundamental field. Dark energy could even be phantom energy (the equation of state is \( P < -\rho \)). Many dark energy models have been proposed. They are not definitely convincing, as well as they are not free of fine-tuning problems. A third possibility consists in modifying gravity at the large scales, i.e. at infrared scales. Here we focus on this class of models.

The most popular and simplest theory proposed to modified General Relativity (GR) is the f(R) gravity. More than a modification, it is an extension of GR where the Einstein theory is a particular case. In fact, the usual Einstein–Hilbert action

$$\begin{aligned} \mathcal{L}_\mathrm{EH}=\frac{1}{2\kappa } \, \sqrt{-g} \, R+\mathcal{L}^\mathrm{(matter)} \end{aligned}$$
(1)

is modified to

$$\begin{aligned} \mathcal{L}=\frac{1}{2\kappa } \, \sqrt{-g} \, f(R)+\mathcal{L}^\mathrm{(matter)}, \end{aligned}$$
(2)

where f(R) is a non-linear function of its argument [4, 5]. Here R denoted the Ricci curvature of the metric tensor \(g_{\alpha \beta } \) with metric determinant g, \(\kappa \equiv 8\pi G\), is the Newton coupling [6]. It is worth noticing that, in principle, the metric tensor contains several degrees of freedom: tensor, vector, and scalar, massless or massive. In GR, only massless spin 2 graviton propagates, while its modifications give rise to the occurrence of other degrees of freedom. For example, the change \(R \rightarrow f(R)\), in the action, induces, in addition to the massless graviton, the appearance of a massive scalar mode which can be responsible of the cosmic acceleration (this is analogous to the inflaton field driving the accelerated expansion of the early Universe). Including in the gravitational Lagrangian quadratic terms depending on Ricci and Riemann tensor, and/or other curvature invariants, can induce massive gravitons and vector degrees of freedom enriching a lot the dynamics [7, 8].

A comment is in order at this point: in modifying gravity, it may occur that there could be violations of experimental limits on the parametrized-post-Newtonian (PPN) parameters at terrestrial and Solar System scales [9], instabilities, ghosts and, as in any newly proposed theory, the Cauchy problem could be ill-posed. All these problems are studied in literature, and we will briefly focus on them, being mainly interested on the cosmological consequences.

The prototype of f(R) gravity working at late epoch is

$$\begin{aligned} f(R)=R-\mu ^4/R , \end{aligned}$$
(3)

where \(\mu \) is a mass scale of the order of the present value of the Hubble parameter \(\mu \sim H_0\sim 10^{-33}\) eV. Although ruled out by its weak-field limit [10] and by a violent instability [11], this model gives the idea underlying modified gravity: the 1/R correction is negligible in comparison with R at the high curvatures of the early universe, and kicks in only as \(R\rightarrow 0\), late in the history of the universe.

Early and late cosmic acceleration can be successfully described by assuming this geometric approach, allowing at the same time to address shortcomings of the standard cosmological model [12,13,14,15,16,17]. The paradigm is that \(R^2\) term dominates at early epoch, \(R^{-1}\) dominate at late cosmological scales while R is working at local scales.

The main advantage is that the left-hand side of the Einstein field equations get modified and the introduction of ad hoc matter contributions to the energy-momentum is avoided [18,19,20,21,22,23,24]. This ‘geometric picture’, generally referred as Extended Theories of Gravity (ETG) [23], applies to all approaches in which curvature or torsion invariants enter into the effective gravitational action allowing the recovery of GR in some limit or as a particular case [23, 25].

The general view is that terms depending on geometric invariant are significative at a given epoch [24], being directly related to important phenomena in the Universe evolution (the process of structure formation, early and late-time cosmic acceleration, inflation, and so on. Refs. [26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47] and references therein give an idea of possibilities.

In principle, both early and late time acceleration can be achieved considering higher-order curvature terms in the gravitational action [23, 48,49,50,51,52,53,54,55,56]. Specifically, the Starobinsky model [18], is an inflationary scenario which is realized considering a \(R^2\) contribution in Ricci curvature scalar. Other models realize inflation under a similar standard [57,58,59,60,61,62,63,64].

From a fundamental physics point of view, such curvature invariants are derived as quantum corrections from renormalisation of gravity in curved spacetime [65]. Other curvature invariants, as \(R_{\mu \nu }R^{\mu \nu },R_{\mu \nu \sigma \rho }R^{\mu \nu \sigma \rho }\) have also been taken into account in literature [66,67,68,69,70,71,72], in particular the Gauss–Bonnet topological invariant \(\mathcal{G}\) which is related to the emergence of the trace anomaly in curved spacetime [65, 73]. In general, if both R and \(\mathcal{G}\) are present in the gravitational action, all the curvature budget is considered, if we do not take into account further derivative terms like \(\Box R\) and others [8]. As shown in [74], the presence of nonlinear \(\mathcal{G}\) terms in the action gives rise to a further inflationary episode that can be connected to the observed large-scale structure process. In these models, one has an early \(\mathcal{G}\)-dominated phase followed by the usual R-dominated phase. In general, the presence of Gauss–Bonnet topological invariant can solve some problems of f(R) gravity, as discussed in [75,76,77,78,79,80,81,82,83]. The advantage of considering a Gauss–Bonnet non-minimal coupling is due to the fact that an improved phantom-quintessence phase of the late universe occurs thanks to such a term. The Gauss–Bonnet curvature becomes dominant and then the phantom phase is a transient: this means that the Big Rip singularity is avoided.

An important issue to be mentioned is related to the gravitational wave event GW170817 [84]. In fact, many alternative theories of gravity can be discarded owing the the upper bound on the wave propagation giving by \(|c_{g}/c - 1|\le 5 \cdot 10^{-16}\) [85]. Interestingly f(R) gravity remains a viable theory, while GR modified with a scalar field \(f(\phi )\mathcal{G}\) [86], where \(f(\phi )\) is a function of a phantom field and \(\mathcal{G}\) is the Gauss–Bonnet invariant seems to be excluded by the observations. However, not only f(R) remains a viable theory, but remarkably, \(F(R,\mathcal{G})\) can be retained because it is a singularity free theory where the Gauss–Bonnet contribution enhances the reliable behavior of curvature quintessence [87] and inflation [74].

In this short review paper, without claiming for completeness, we restrict ourselves to curvature based theories of gravity in their various formulations, and we focus the possibility that they can address the accelerated behavior of the present observed Universe. In other context, these curvature based theories can also be used as an alternative to dark matter in galaxies and clusters of galaxies [89,90,91,92,93,94,95,96].

We adopt a conservative point of view considering these theories to test the principle that modifying gravity is a viable approach to explain the observed accelerated behavior of the cosmic Hubble fluid. However, none can claim that any modified gravity model, proposed thus far, is the correct final one, or has exceptional support from the observational data. While it is true that many models, in particular f(R), pass all the available experimental tests and fit the cosmological data, the same is true for many dark energy models, and it is currently impossible to use observational data to discriminate between most of them, and between dark energy and modified gravity models.

The layout of the paper is the following. Different formulations of f(R) gravity, like metric, Palatini and metric-affine ones, are discussed in Sect. 2. Viability criteria are reported in Sect. 3 and equivalent between f(R) gravity and scalar-tensor theories are sketched in Sect. 4. Cosmology in curvature based modified gravity is discussed in Sect. 5. In particular, we take into account f(R) gravity and \(F(R, \mathcal {G})\) gravity improved with Gauss–Bonnet invariant. This last case is important because the introduction of the topological invariant exhausts all the quadratic curvature invariants that can be considered into the gravitational action. We close the section considering the f(TB) extension of teleparallel gravity, where T is the torsion scalar and B is the boundary term. As we will see, a linear combination of T and B is capable of restoring the Ricci curvature scalar giving rise to an equivalent picture of f(R) gravity. Conclusions and outlooks are reported in Sect. 6.

2 Different formulations of f(R) gravity

As discussed, f(R) gravity is the straightforward extension of GR. It has quite a long history (see [97] for an historical review). In his theory, Weyl (1919) added a term quadratic in the Weyl tensor to the Einstein–Hilbert Lagrangian [98]. Later, during the the 1960’s and 1970’s, it was realized that quadratic corrections to \(S_\mathrm{EH}\) were necessary to improve the renormalizability of GR [99], and, some years later, Starobinsky pointed out that quadratic corrections are needed to fuel inflation without scalar fields [18]. Non-linear corrections are also motivated by string theories [100, 101].

As proposed in literature, f(R) gravity comes in three versions: (1) metric (or second order) formalism; (2) Palatini (or first order) formalism; and (3) metric-affine formalism. Here, we will sketch them and their relations with dark energy.

2.1 Metric formalism

In the metric formalism [4, 5], the action is

$$\begin{aligned} S_\mathrm{metric}=\frac{1}{2\kappa }\int d^4 x \, \sqrt{-g} \, f(R)+S^\mathrm{(matter)}. \end{aligned}$$
(4)

Variation with respect to the metric tensor \(g_{\alpha \beta }\) yields the field equations

$$\begin{aligned}&f'(R)R_{ab}-\frac{f(R)}{2} \, g_{\alpha \beta }\nonumber \\&\quad =\nabla _\alpha \nabla _\beta f'(R) -g_{\alpha \beta } \Box f'(R) +\kappa \, T_{\alpha \beta } \;, \end{aligned}$$
(5)

where a prime denotes differentiation with respect to R. The first two terms on the right hand side introduce fourth order derivatives of the metric, hence the name “fourth order gravity” sometimes given to these theories. The trace of Eq. (5) yields

$$\begin{aligned} 3\Box f'(R)+Rf'(R)-2f(R)=\kappa \, T \;, \end{aligned}$$
(6)

where \(T\equiv {T^\alpha }_\alpha \) is the trace of the matter stress–energy tensor. This second order differential equation for \(f'(R)\) differs deeply from the trace of the Einstein equations \(R=-\kappa \, T\) which, instead, relates algebraically the Ricci scalar to T. We already see that \(f'(R)\) is indeed a dynamical variable, the scalar degree of freedom contained in the theory.

Formally, one can rewrite the field Eq. (5) in the form of effective Einstein equations considering

$$\begin{aligned} T_{\alpha \beta }^\mathrm{(eff)}= & {} \frac{1}{f'(R)} \left[ \frac{ f(R)-Rf'(R)}{2}\, g_{\alpha \beta }\right. \nonumber \\&\quad \left. +\nabla _\alpha \nabla _\beta f'(R)-g_{\alpha \beta } \Box f'(R) \right] \end{aligned}$$
(7)

as an effective stress–energy tensor containing geometric terms. Of course, as usual when adopting this procedure, \(T_{\alpha \beta }^\mathrm{(eff)}\) satisfies generalized energy conditions [102] and the effective energy density is, in general, non-positively defined. As is clear from these equations, in f(R) gravity one can define an effective gravitational coupling \(G_\mathrm{eff}\equiv G/f'(R)\) in a way analogous to what is done in scalar-tensor theories. Hence, \(f'(R)\) must be positive in order for the graviton to carry positive kinetic energy. It is possible to demonstrate that (7) is a perfect fluid whose origin is geometric [103].

2.2 The Palatini formalism

In the Palatini approach, both the metric \(g_{\alpha \beta }\) and the connection \(\Gamma ^\alpha _{\beta \gamma }\) are independent variables, i.e., the connection is not the metric connection of \(g_{\alpha \beta }\). While in GR, the metric and Palatini variations produce the same (Einstein) equations, this is no longer true for non-linear Lagrangians.Footnote 1 After metric f(R) theories were proposed as alternatives to dark energy, also the Palatini version has been considered for the same purpose, originally for the model \(f(R)=R-\mu ^4/R\) [105]. The Palatini action reads

$$\begin{aligned} S_\mathrm{Palatini}= & {} \frac{1}{2\kappa }\int d^4 x \, \sqrt{-g} \, f\left( \tilde{R} \right) \nonumber \\&+S^\mathrm{(matter)}\left[ g_{\alpha \beta }, \psi ^{(m)} \right] \;. \end{aligned}$$
(8)

In this approach, we have to take into account two Ricci tensors: \(R_{\alpha \beta }\), which is constructed using the Levi–Civita connection of the metric \(g_{\alpha \beta }\), and \(\tilde{R}_{\alpha \beta }\) which is the Ricci tensor of the non-metric connection \(\Gamma ^\alpha _{\beta \gamma }\). The latter gives rise to the scalar \(\tilde{R}\equiv g^{\alpha \beta }\tilde{R}_{\alpha \beta }\). The matter part of the action does not depend explicitly on the connection \(\Gamma \), but only on metric and matter fields, collectively denoted by \(\psi ^{(m)}\). The variation of the Palatini action (8) yields the field equations

$$\begin{aligned} f'(\tilde{R}) \tilde{R}_{\alpha \beta }-\frac{1}{2} f(\tilde{R}) \, g_{\alpha \beta }=\kappa \, T_{\alpha \beta } \;, \end{aligned}$$
(9)

which clearly reduce to the standard Einstein equations for \(f(\tilde{R})=\tilde{R}\). Note the absence of second covariant derivatives of \(f'\), in contrast with Eq. (5). Variation with respect to the independent connection produces the field equation

$$\begin{aligned} \tilde{\nabla }_\delta \left( \sqrt{-g} \, f'(\tilde{R}) g^{\alpha \beta } \right) -\tilde{\nabla }_\delta \left( \sqrt{-g} \, f'(\tilde{R}) g^{\gamma (\alpha }\right) \delta ^{\beta )}_\gamma =0 ,\nonumber \\ \end{aligned}$$
(10)

where \(\tilde{\nabla }_\delta \) denotes the covariant derivative associated to the non-metric connection \(\Gamma \). Traces of Eqs. (9) and (10) yield

$$\begin{aligned} f'(\tilde{R}) \tilde{R} -2f(\tilde{R})=\kappa \, T \end{aligned}$$
(11)

and

$$\begin{aligned} \tilde{\nabla }_\gamma \left( \sqrt{-g} \, f'(\tilde{R}) g^{\alpha \beta } \right) =0 \;. \end{aligned}$$
(12)

Equation (12) tells us that \(\tilde{\nabla }_\gamma \) is the covariant derivative of the metric

$$\begin{aligned} \tilde{g}_{\alpha \beta }\equiv f'( \tilde{R}) g_{\alpha \beta } \end{aligned}$$
(13)

conformally related to \(g_{\alpha \beta }\). In this sense, the Palatini approach can be considered a bimetric formulation. Note that Eq. (11) is an algebraic equation for \(f'(\tilde{R})\): hence, this quantity is non-dynamical, contrary to f(R) gravity in metric formalism. This lack of dynamics has important consequences which we will sketch below. However, metric and Palatini formalism can be connected each other taking into account conserved currents [106].

An important remark is in order at this point. It is worth noticing that, in Palatini formalism, non-linear couplings between matter and gravity naturally emerge as it is easy to see from Eq. (11). Such an equation, sometimes called the structural equation or the master equation [107], points out that Palatini field equations contain nonlinear terms in the stress-tensor and its derivatives. If we solve algebraically Eq. (11), according to the form of f(R), the solution R is a function of the stress–energy tensor trace T. As a consequence, the conformal factor in Eq. (13) is a function of T. Using this result in the field Eq. (10), these equations contain nonlinear terms in T and its derivatives. This picture immediately tells us that the the theory reduces to GR in vacuum (\(T=0\)) and the so called universality of the Einstein equations is restored [108]. In this perspective, the theory gives cosmic accelerated expansion only if some effective cosmological constant is recovered, at late times, or strong deviations from GR emerge into dynamics at early times [50].

2.3 The metric-affine formalism

In metric-affine formalism [109], also the matter component depends on the connection. It is

$$\begin{aligned} S_\mathrm{affine}= & {} \frac{1}{2\kappa }\int d^4 x \, \sqrt{-g} \, f\left( \tilde{R} \right) \nonumber \\&\quad +S^\mathrm{(matter)}\left[ g_{\alpha \beta }, \Gamma ^\alpha _{\beta \gamma }, \psi ^{(m)} \right] . \end{aligned}$$
(14)

Here \(\Gamma \) can be also non-symmetric. In this case, torsion associated with matter has to be considered. The approach was originally introduced to consider the spin of elementary particles which generate the torsion. A detailed discussion of f(R) gravity with torsion in metric-affine formalism is reported in [110]. In the following, we shall focus on metric and Palatini f(R) gravity in view of cosmological applications.

3 Viability criteria for f(R) gravity

Besides cosmological applications, f(R) gravity and any modification/extension of GR must also pass tests imposed by Solar System and terrestrial experiments. In other words, any modification of GR must satisfy some viability criteria to be a self-consistent formulation for a relativistic theory of gravitation. In summary they are:

  • having the correct Newtonian and post-Newtonian limit;

  • cosmological dynamics has to be reproduced;

  • not suffer for instabilities and ghosts;

  • giving rise to cosmological perturbations compatible with data from the cosmic microwave background and large scale structure;

  • having a well-posed and well-formulated Cauchy problem.

Failing also even a single one of these criteria is a statement that the theory does not work. These viability criteria are examined in the following.

3.1 Weak field limit and solar system tests

In order to assess whether the limits set on the PPN parameter \(\gamma \) by the available Solar System experiments hold or not, one needs to find the weak-field solution of the field equations and compute this parameter. It is possible to consider a static, spherically symmetric, non-compact body which constitutes a perturbation of a background de Sitter solution. The line element is written as

$$\begin{aligned} \mathrm{d}s^2= & {} -\left[ 1+2\Psi (r)-H_0^2r^2 \right] \mathrm{d}t^2 \nonumber \\&\quad +\left[ 1+2 \Phi (r) +H_0^2 r^2 \right] \mathrm{d}r^2 +r^2 \mathrm{d}\Omega ^2 \end{aligned}$$
(15)

in Schwarzschild coordinates, where \(\mathrm{d}\Omega ^2\) is the line element on the unit 2-sphere and \(\Psi \) and \(\Phi \) are post-Newtonian potentials. These are of small amplitude, \(\left| \Psi (r) \right| , \left| \Phi (r) \right|<<1\), and one considers small (non-cosmological) scales so that \(H_0r<<1\) while expanding the Ricci scalar around the constant curvature of the background de Sitter space, that is \(R(r)=R_0+R_1\). The PPN parameter \(\gamma \) is given by \( \gamma =-\Phi (r) / \Psi (r) \) [9]. Three assumptions can be made [10]:

  1. 1.

    f(R) is analytical in \(R_0\);

  2. 2.

    \(mr<<1\), where m is the effective mass of the scalar degree of freedom of the theory, i.e., it is assumed that this scalar field is light and has a range larger than the size of the Solar System (we remind the reader that there are no experimental constraints of scalars in the range \(m^{-1} <0.2\) mm).

  3. 3.

    For matter composing the spherical body, the pressure is negligible, \(P\simeq 0\), so that \( T=T_0+T_1 \simeq -\rho \).

The first and the last assumption are not stringent, but the second one is, as it will be clear below.

The trace Eq. (6) yields the equation for the Ricci scalar perturbation

$$\begin{aligned} \nabla ^2 R_1 -m^2 R_1 =-\frac{\kappa \rho }{3f_0''}, \end{aligned}$$
(16)

where

$$\begin{aligned} m^2 =\frac{ (f_0')^2 -2f_0f_0''}{3f_0' f_0''} \end{aligned}$$
(17)

is the effective mass squared of the scalar. Equation (17) coincides with the expression obtained in the gauge-invariant stability analysis of de Sitter space and in propagator calculations.

If \(mr<<1\), the solution of the linearized field equations is

$$\begin{aligned} \Psi (r)= & {} -\frac{\kappa M}{6\pi f_0'}\, \frac{1}{r} , \end{aligned}$$
(18)
$$\begin{aligned} \Phi (r)= & {} \frac{\kappa M}{12 \pi f_0'} \, \frac{1}{r} . \end{aligned}$$
(19)

Therefore, the PPN parameter is

$$\begin{aligned} \gamma =-\frac{\Phi (r)}{\Psi (r)}=\frac{1}{2} , \end{aligned}$$
(20)

in gross violation of the experimental limits [150]

$$\begin{aligned} \left| \gamma -1 \right| <2.3 \cdot 10^{-5} . \end{aligned}$$
(21)

This result would be the end of metric f(R) gravity if the assumptions made in the calculation were satisfied. However, this is not the case for assumption 2): mr is not always less than unity due to the Chameleon Effect . This consists in the effective mass m depending on the curvature or, alternatively, the matter density of the environment. The scalar degree of freedom can be short-ranged (say \(m > 10^{-3}\) eV, corresponding to a range \(\lambda < 0.2\) mm) at Solar System densities and evade the experimental constraints, while being long-ranged at cosmological densities and thus it is able to affect the cosmological dynamics [147, 151]. Although at a first glance the Chameleon Effect could be seen as a contrived and fine-tuned mechanism, f(R) gravity is rather complicated and the effective range does indeed depend on the environment. The Chameleon Mechanism is well-known and accepted in quintessence models, in which it was discovered for the scalar field potential \(V(\phi ) \approx 1/\phi \) [152, 153]. Many forms of the function f(R) are known to exhibit the chameleon mechanism and pass the observational tests [154]. For example, the model

$$\begin{aligned} f(R)=R-\left( 1-n \right) \mu ^2 \left( \frac{R}{\mu ^2} \right) ^n \end{aligned}$$
(22)

is compatible with the PPN limits if \( \mu \sim 10^{-50}\) eV\(\sim 10^{-17} H_0\) [151]. It is obvious that a correction term \(\sim R^n\) with \(n<1\) to the Einstein-Hilbert Lagrangian R will come to dominate as \(R\rightarrow 0^{+}\) (for example, for \(n=1/2\), \(\sqrt{R} >R \) as \(R\rightarrow 0\)). The model (22) is compatible with the experimental data but it could be essentially indistinguishable from a dark energy model. Hope of discriminating between dark energy and f(R) models, or between different modified gravities, relies on the study of the growth of cosmological perturbations.

3.2 Cosmological dynamics

In order to be acceptable and compatible with observations, a cosmological model has to exhibit some minimal requirements which are: (i) an early inflationary epoch or an alternative mechanism to solve horizon, flatness, and monopole problems together with a mechanism to generate density perturbations; (ii) a following radiation-dominated era and (iii) a matter-dominated era, and, finally, (iv) the model has to be compatible with the present acceleration.

f(R) gravity has mainly be proposed to address this sequence in a self-consistent way. The future eras are usually found to be either an eternal de Sitter attractor phase, or a Big Rip singularity truncating the history of the universe at a finite time.

In particular, smooth transitions between different eras are required. It has been pointed out that the exit from the radiation era, in particular, may have problems in many models [111,112,113,114,115], a warning that has to be considered in building up f(R) cosmologies. In general, exit from the radiation, or any era can be achieved for given f(R) models. Consider, for example, the so-called “designer f(R) gravity”: one can prescribe a desired expansion history of the universe by a choice of the scale factor a(t) and then integrate a differential equation determining the function f(R) producing this a(t) [116,117,118,119,120]. In general, this function is not unique and can assume complicated forms and not only the usual \(R-\mu /R^n\) or other simple forms. In summary, the recipe is a sort of “inverse scattering” where the form of the model is achieved starting from the desired behavior needed for matching the observations.

3.3 Instabilities and ghosts

The prototype model for discussing instabilities is again \(f(R)=R-\mu ^4/R\) with \(\mu \sim H_0\sim 10^{-33}\) eV. Shortly after it was proposed, this model was found to a suffer catastrophic instability [11]. The stability analysis was later generalized to any metric f(R) theory [121] and the extension to even more general gravitational theories has been pursued in [122,123,124]. The approach consists in parameterizing the deviations from GR as

$$\begin{aligned} f(R)=R+\epsilon \varphi (R), \end{aligned}$$
(23)

where \(\epsilon \) is a small positive constant with the dimensions of a squared mass and the function \(\varphi \) is dimensionless. The trace equation for the Ricci scalar R takes the form

$$\begin{aligned} \Box R+\frac{\varphi '''}{\varphi ''} \, \nabla ^\alpha R \nabla _\alpha R +\left( \frac{\epsilon \varphi ' -1}{3\epsilon \varphi ''} \right) R =\frac{\kappa \, T}{3\epsilon \varphi ''}+\frac{2\varphi }{3\varphi ''}.\nonumber \\ \end{aligned}$$
(24)

Next, one expands around a de Sitter background and writes the metric locally as

$$\begin{aligned} g_{\alpha \beta }=\eta _{\alpha \beta }+h_{\alpha \beta } , \end{aligned}$$
(25)

while the scalar degree of freedom R is expanded as

$$\begin{aligned} R=-\kappa \, T +R_1 , \end{aligned}$$
(26)

with \(R_1\) a perturbation. To first order, the trace equation yields the dynamical equation for \(R_1\)

$$\begin{aligned}&\ddot{R}_1 -\nabla ^2 R_1 -\frac{2\kappa \varphi '''}{\varphi ''} \, \dot{T}\dot{R}_1+\frac{2\kappa \varphi '''}{\varphi ''} \, \mathbf {\nabla }T \cdot \mathbf {\nabla }R_1 \nonumber \\&\quad + \frac{1}{3\varphi ''}\left( \frac{1}{\epsilon }-\varphi ' \right) R_1=\kappa \, \ddot{T}-\kappa \nabla ^2 T -\frac{ \left( \kappa T \varphi ^2 +2\varphi \right) }{3\varphi ''} .\nonumber \\ \end{aligned}$$
(27)

The last term on the left hand side is dominated by the term in \(\epsilon ^{-1}\) and gives the effective mass squared of \(R_1\)

$$\begin{aligned} m^2 \simeq \frac{1}{3\epsilon \varphi ''} , \end{aligned}$$
(28)

from which one deduces that the theory is

  • stable if \(f''(R)>0\)

  • unstable if \(f''(R)<0 \;.\)

The case of GR is excluded by the assumption \(f''\ne 0\), but one can extend the stability criterion for metric f(R) gravity to be \(f'' \ge 0\), including GR.

As an example, the prototype model \(f(R)=R-\mu ^4/R\), which has \(f''<0\) is unstable. The time scale for the onset of this instability is dictated by the smallness of the scale \(\mu \) which corresponds to \(\sim 10^{-26}\) s [11], making this an explosive instability.

One can give a physical interpretation of this result as follows [125]: remembering that the effective gravitational coupling is \(G_\mathrm{eff}=G_\mathrm{N}/f'(R)\), with \(G_{\text {N}}\) the Newton constant, if \(\mathrm{d}G_\mathrm{eff}/\mathrm{d}R=-f''G_\mathrm{N}/(f')^2>0\) (which corresponds to \(f''<0\)), then \(G_\mathrm{eff}\) increases with R and a large curvature causes gravity to become stronger, which, in turn, causes a larger R, in a positive feedback mechanism driving the system away. If instead \(\mathrm{d}G_\mathrm{eff}/\mathrm{d}R<0\), then a negative feedback damps the increase in the gravitational coupling strength.

Palatini f(R) gravity, by contrast, is described by second order field equations, the trace equation \( f'( \tilde{R}) \tilde{R} -2f(\tilde{R})=\kappa \, T\). It is not a differential equation but rather a non-dynamical algebraic one and, therefore, there is no instability [126].

The previous analysis for metric f(R) gravity, obtained with the local expansion (25), is necessarily limited to short wavelengths (compared to the curvature radius), but it can be extended to the longest wavelengths [127,128,129]. This is necessarily more complicated because these modes suffer for the well-known gauge-dependence problems of cosmological perturbations. In order to solve it, a covariant and gauge-invariant formalism is needed. Let us assume that the background space is de Sitter and consider the general action

$$\begin{aligned} S=\int d^4 x \, \sqrt{-g} \, \left[ \frac{f \left( \phi , R \right) }{2} -\frac{\omega (\phi )}{2}\, \nabla ^\alpha \phi \nabla _\alpha \phi -V(\phi ) \right] ,\nonumber \\ \end{aligned}$$
(29)

which contains a mixture of f(R) and scalar-tensor gravity. On a Friedmann–Lemaître–Robertson–Walker background, the field equations become

$$\begin{aligned}&H^2= \frac{1}{3f'} \left( \frac{\omega }{2}\,\dot{\phi }^2+\frac{Rf'-f}{2}+V-3H\dot{f}\right) , \end{aligned}$$
(30)
$$\begin{aligned}&\dot{H}=\frac{-1}{2f'} \left( \omega \dot{\phi }^2 + \ddot{f'}-H\dot{f'} \right) , \end{aligned}$$
(31)
$$\begin{aligned}&\ddot{\phi }+3H\dot{\phi } +\frac{1}{2\omega }\left( \frac{d\omega }{d\phi } \dot{\phi }^2 -\frac{\partial f}{\partial \phi } +2 \, \frac{dV}{d\phi } \right) =0. \end{aligned}$$
(32)

A de Sitter space solution is recovered if conditions

$$\begin{aligned} 6H_0^2 f_0'-f_0 +2V_0=0 \;, \;\;\;\;\;\;\;\; f_0'=2V_0' , \end{aligned}$$
(33)

hold. An analysis [127,128,129], using the covariant and gauge-invariant Bardeen–Ellis–Bruni–Hwang formalism [130,131,132,133] in the version given by Hwang [134,135,136,137,138,139,140,141] for alternative gravitational theories, yields the stability condition of de Sitter space in metric f(R) gravity with respect to inhomogeneous perturbations

$$\begin{aligned} \frac{ (f_0')^2 -2f_0 f_0''}{f_0' f_0''} \ge 0 . \end{aligned}$$
(34)

This condition is obtained in the zero momentum limit. It coincides with the stability condition with respect to homogeneous perturbations [125].

At this point it is worth checking that the equivalence between metric f(R) gravity and Brans–Dicke theory with \(\omega =0\) holds also at the level of perturbations. Previous issues [142, 143] on this equivalence have been addressed.

For a Brans–Dicke model, with \(\omega =0\), the stability condition of de Sitter solution with respect to inhomogeneous perturbations is given again by Eq. (34). For stability with respect to homogeneous perturbations, Eq. (34) holds provided that stability against local perturbations, expressed by \(f_0''>0\), is assumed. Therefore, there is a complete equivalence between metric f(R) gravity and Brans–Dicke theory with \(\omega =0\) also at the level of cosmological perturbations.

From a more conceptual point of view, instabilities can be related to ghosts that are massive states of negative norm which cause a lack of unitarity and are common for generalizations of Einstein’s gravity. The good news is that f(R) gravity is ghost-free. More general theories of the form \(f\left( R, R_{\alpha \beta }R^{\alpha \beta }, R_{\alpha \beta \gamma \delta } R^{\alpha \beta \gamma \delta }, \ldots \right) \), in general, contain ghost fields. A possible exception (under certain conditions [144, 145]) is the case in which the extra terms appear in the Gauss–Bonnet combination \(\mathcal{G}=R^2-4R_{\alpha \beta }R^{\alpha \beta }+R_{\alpha \beta \gamma \delta }R^{\alpha \beta \gamma \delta }\), as in \(f=f\left( R, \mathcal{G} \right) \). In this case, the field equations are of second order and there are no ghosts [146, 147].

Another important issue is related with the weak-field limit. Early works on the weak-field limit of both metric and Palatini f(R) gravity was subject to errors and incompleteness (see [23] for details). A satisfactory treatment for the prototype model \(f(R)=R-\mu ^4/R\) in the metric formalism was given in [148] and then generalized to arbitrary forms of the function f(R) in [10, 149].

3.4 Cosmological perturbations dynamics

The expansion history of the universe alone is not sufficient to discriminate between various models, but the growth of structures depends on the theory of gravity and has the potential to achieve this goal. For example, in [155,156,157,158,159,160,161,162,163], it is assumed an expansion history a(t) typical of the \(\Lambda \)CDM model and found that vector and tensor modes are not affected by f(R) at lowest order, while perturbation scalar modes depend on the specific f(R) model. It is also found the condition \(f''(R)>0\) for the stability of scalar perturbations, in agreement with the arguments discussed above. The most interesting results are that f(R) corrections lower the large angle anisotropies of the cosmic microwave background and produce correlations between cosmic microwave background and galaxy surveys different from those of dark energy models.

Overall, the study of structure formation in modified gravity is still work in progress, and often it is performed within the context of specific models, some of which are already in trouble because they do not pass the weak-field limit or the stability constraints. A similar situation holds for all Palatini f(R) models, and for this reason, their weak-field limit and cosmological perturbations are not discussed here.

3.5 The Cauchy problem

A physical theory must have predictive power and, therefore, a well-posed and well-formulated initial value problem. GR satisfies this requirement for “reasonable” forms of matter [6]. The well-posedness of the Cauchy problem for vacuum f(R) gravity was briefly discussed for special metric models in earlier papers [165]. Thanks to the equivalence between f(R) gravity and scalar-tensor theory when \(f''(R)\ne 0\), the Cauchy problem can be reduced to the analogous one for Brans–Dicke gravity with \(\omega =0, -3/2\). Specifically, the initial value problem is well-posed and demonstrated for some scalar-tensor theories in [164, 165]. A general analysis is performed in [166]. A general discussion of the Cauchy problem in the case of Palatini f(R) gravity is reported in [167,168,169]. Here, the well-posedness and the well-formulation are discussed according to the fluids sourcing the field equations.

4 Equivalence of f(R) gravity with scalar-tensor theories

An important issue is related with the fact that f(R) gravity can be a particular scalar-tensor theory. Specifically, if \(f''(R) \ne 0\), the metric f(R) gravity is equivalent to an \(\omega =0\) Brans–Dicke theoryFootnote 2 [170]. On the other hand, in Palatini formalism, f(R) gravity is equivalent to Brans–Dicke with \(\omega =-3/2\). This equivalence is discussed in Refs. [171,172,173,174,175,176]. Let us give details of both formulations in the following.

4.1 Metric formalism

Assuming that \(f''(R) \ne 0\) and starting with the Lagrangian (2), one can introduce the auxiliary scalar field \(\phi \) and considers the action

$$\begin{aligned} S=\frac{1}{2\kappa } \int d^4 x \, \sqrt{-g} \left[ \psi ( \phi )R -V(\phi ) \right] +S^\mathrm{(matter)},\qquad \end{aligned}$$
(35)

where

$$\begin{aligned} \psi (\phi ) = f'(\phi ) \;, \;\;\;\;\;\; V(\phi )=\phi f'(\phi )-f(\phi ). \end{aligned}$$
(36)

The action (35) trivially reduces to (2) for metric f(R) gravity if \(\phi =R\). Vice-versa, the variation of (35) with respect to \(g^{\alpha \beta }\) gives

$$\begin{aligned} G_{\alpha \beta }=\frac{1}{\psi }\left( \nabla _\alpha \nabla _\beta \psi - g_{\alpha \beta }\Box \psi -\frac{V}{2}\, g_{\alpha \beta } \right) +\frac{\kappa }{\psi } \, T_{\alpha \beta },\qquad \end{aligned}$$
(37)

while varying with respect to \(\phi \) yields

$$\begin{aligned} R\, \frac{\mathrm{d}\psi }{\mathrm{d}\phi } -\frac{\mathrm{d}V}{\mathrm{d}\phi }=\left( R-\phi \right) f''(\phi )=0 \end{aligned}$$
(38)

and \(\phi =R\) under the assumption \(f''\ne 0\). Hence, the scalar field \(\phi =R\) is dynamical and satisfies the trace equation

$$\begin{aligned} 3f''(\phi )\Box \phi +3f'''(\phi )\nabla ^\gamma \phi \nabla _\gamma \phi +\phi f'(\phi ) -2f(\phi ) =\kappa \, T.\nonumber \\ \end{aligned}$$
(39)

This scalar is massive and the analysis of small perturbations of de Sitter space allows one to compute explicitly its mass squared

$$\begin{aligned} m_{\phi }^2=\frac{1}{3} \left( \frac{f_0'}{f_0 ''}-R_0 \right) , \end{aligned}$$
(40)

where a zero subscript denotes quantities evaluated at the constant curvature of the de Sitter background. It turns out to be more convenient considering the scalar field \( \psi \equiv f'(\phi )\), which satisfies

$$\begin{aligned} 3\Box \psi +2 U(\psi ) -\psi \, \frac{\mathrm{d}U}{\mathrm{d}\psi }=\kappa \, T \end{aligned}$$
(41)

with \( U(\psi )=V(\phi (\psi ))-f(\phi (\psi )) \). It is clear, therefore, that the theory contains a scalar degree of freedom, and the action

$$\begin{aligned} S=\frac{1}{2\kappa } \int d^4 x \, \sqrt{-g} \left[ \psi R -U(\psi ) \right] +S^\mathrm{(matter)} , \end{aligned}$$
(42)

is recognized as an \(\omega =0\) Brans–Dicke theory. This theory, called “massive dilaton gravity” was originally introduced in the 1970’s in order to generate a Yukawa term in the Newtonian limit [177]. The assumption \(f''\ne 0\) can be seen as the requirement that the change of variable \(R\rightarrow \psi (R)\) be invertible.

4.2 The Palatini formalism

In the Palatini case, the discussion of the equivalence with a Brans–Dicke theory proceeds in an analogous way. One begins with the action (8) and introduces \(\phi =\tilde{R}\) and \(\psi \equiv f'(\phi )\). Then, apart from a boundary term that can be neglected, the action is rewritten, in terms of the metric \(g_{\alpha \beta }\) and of its Ricci tensor \(R_{\alpha \beta }\), as

$$\begin{aligned} S_\mathrm{Palatini}= & {} \frac{1}{2\kappa }\int d^4x \, \sqrt{-g} \left[ \psi R +\frac{3}{2\psi } \, \nabla ^\gamma \psi \nabla _\gamma \psi -V(\psi ) \right] \nonumber \\&+S^\mathrm{(matter)}, \end{aligned}$$
(43)

where we used the fact that, since \(\tilde{g}_{\alpha \beta }=\psi \, g_{\alpha \beta }\), the Ricci curvatures of \(g_{\alpha \beta }\) and \(\tilde{g}_{\alpha \beta }\) are related by

$$\begin{aligned} \tilde{R}=R +\frac{3}{2\psi } \nabla ^\gamma \psi \nabla _\gamma \psi -\frac{3}{2} \Box \psi . \end{aligned}$$
(44)

The action (43) is recognized as a Brans–Dicke theory with \(\omega =-3/2\).

As a final consideration, we can state that f(R) gravity can be reduced in any case to the more general class of scalar-tensor theories and, in general, higher-order theories in curvature invariants can be reduced to multi-scalar tensor theories [178].

5 Cosmology in extended gravity

One of the main purpose for introducing Extended Gravity is to achieve the cosmic accelerated expansion observed at late time [4]. However, besides the first models related to f(R) gravity, the approach has been expanded in view to consider also other geometric invariants like the Gauss–Bonnet one \(\mathcal G\), the scalar torsion T and so on.

Here we present and comment the cosmological equations for different Extended Gravity models. We focus in particular on f(R), Gauss–Bonnet \(f(R,\mathcal{G})\), and f(T) cosmologies. The aim is to show that the equation of states for the models provide a sort of geometric adiabatic index which negative which can naturally explaining the accelerated phase of the today universe. In what follows, we shall refer to the spatially flat Friedmann–Lemaître–Robertson–Walker (FLRW) metric, which is usually adopted as the kinematic description of the universe,

$$\begin{aligned} \mathrm{d}s^2=-\mathrm{d}t^2 +a^2(t) \left( \mathrm{d}x^2+\mathrm{d}y^2+\mathrm{d}z^2 \right) . \end{aligned}$$
(45)

5.1 f(R) cosmology and the accelerated expansion

From the field equations (5), the cosmological equations

$$\begin{aligned} H^2= & {} \frac{\kappa }{3f'(R)} \left[ \rho ^{(matter)}\right. \nonumber \\&\left. +\frac{Rf'(R)-f(R)}{2}-3H \dot{R} f''(R) \right] , \end{aligned}$$
(46)
$$\begin{aligned} 2\dot{H}+3H^2= & {} -\frac{\kappa }{f'(R)} \left[ P^{(matter)}\right. \nonumber \\&+ f'''(R) \left( \dot{R}\right) ^2 +2H\dot{R} f''(R)+\ddot{R}f''(R) \nonumber \\&\left. +\frac{ f(R)-Rf'(R) }{2} \right] , \end{aligned}$$
(47)

can be derived. Here an overdot denotes differentiation with respect to the comoving time t. It is assumed that \(f'>0\) to keep the effective gravitational coupling positive, and that \(f^{\prime \prime }>0\) to avoid local instabilities [121, 179]. The effective energy density and pressure of the f(R) fluid are

$$\begin{aligned} \rho _\mathrm{eff}= & {} \frac{Rf'-f}{2f'}-\frac{3H\dot{R}f'' }{f'} \,, \end{aligned}$$
(48)
$$\begin{aligned} P_\mathrm{eff}= & {} \frac{\dot{R}^2 f'''+ 2H\dot{R}f''+\ddot{R}f''+\frac{1}{2} \left( f-Rf' \right) }{f'}.\quad \end{aligned}$$
(49)

The effective density \(\rho _{eff}\) is non-negative in a spatially flat FLRW universe in the limit \(\rho \rightarrow 0\). f(R) gravity can produce accelerated expansion without any material dark energy counterpart. In vacuo, the above equations assume the form [4, 180]

$$\begin{aligned} H^2= & {} \frac{\kappa }{3}\rho _\mathrm{eff}, \end{aligned}$$
(50)
$$\begin{aligned} \frac{\ddot{a}}{a}= & {} -\frac{\kappa }{6}\left( \rho _\mathrm{eff}-3P_\mathrm{eff}\right) \end{aligned}$$
(51)

but, if a material cosmological fluid is present, it couples to gravity with the effective strength \(\kappa /f'\). One can define the effective EoS parameter as

$$\begin{aligned} w_\mathrm{eff} \equiv \frac{P_\mathrm{eff}}{\rho _\mathrm{eff}}= \frac{ \dot{R}^2f'''+2H\dot{R}f''+ \ddot{R}f''+\frac{1}{2}(f-Rf') }{ \frac{Rf'-f}{2} -3H\dot{R}f'' } . \end{aligned}$$
(52)

In this approach, a metric f(R) model mimics the de Sitter equation of state \(w_\mathrm{eff}=-1\) when

$$\begin{aligned} \frac{f'''}{f''}= \frac{ \dot{R}H -\ddot{R}}{( \dot{R})^2 }. \end{aligned}$$
(53)

By introducing explicitly the scalar degree of freedom of metric f(R) gravity, \(\phi \equiv f'(R)\), the effective EoS parameter becomes

$$\begin{aligned} w_\mathrm{eff}= -1+2\, \frac{\left( \ddot{\phi }-H\dot{\phi } \right) }{R\phi -f-6H \dot{\phi } }= -1+\frac{\kappa \left( \ddot{\phi }-H\dot{\phi }\right) }{3\phi H^2} , \end{aligned}$$
(54)

while

$$\begin{aligned} \rho _\mathrm{eff}+P_\mathrm{eff}= \frac{\ddot{\phi }-H\dot{\phi }}{\phi } =\frac{\dot{\phi }}{\phi } \, \frac{\mathrm{d}}{\mathrm{d}t} \left[ \ln \left( \frac{\dot{\phi }}{a} \right) \right] . \end{aligned}$$
(55)

and a de Sitter solution corresponds to \(\dot{\phi }=f''(R) \dot{R}=0\). The above mechanism can, in principle, not only address the dark energy behavior but also the cosmological constant problem related to the fact that \(\Lambda \) does not evolve. Considering the above equations, the evolution of the gravitational vacuum state is allowed by the Extended Gravity.

It is worth stressing that equations describing spatially homogeneous and isotropic cosmologies are of fourth order in the scale factor a(t). When matter is absent (a situation of interest in early time inflation or in a late universe completely dominated by f(R) corrections), a(t) appears only through the Hubble parameter \(H\equiv \dot{a}/a\). In this situation, it is convenient to adopt H, instead of a, as the dynamical variable. First, H is a cosmological observable; second, the above field equations are of third order in H. This elimination of a is not possible when the spatial 4s are not flat or when a fluid with density \( \rho (a) \) is present.

The dynamical fields of the theory are the metric \(g_{\mu \nu }\) and the massive scalar degree of freedom \(\phi \equiv f'(R)\). As previously noted by several authors, quadratic corrections to the Hilbert-Einstein action introduce a massive scalar field [181,182,183,184,185,186]. This result is relevant for any metric f(R) theory [187,188,189].

In principle, the metric tensor contains various degrees of freedom: spin two modes, vector and scalar modes, and all of these can be massless or massive. GR contains only a massless graviton but when nonlinear corrections depending on R, \(R_{\mu \nu }R^{\mu \nu }\), \(R_{\mu \nu \rho \sigma }R^{\mu \nu \rho \sigma }\) are included in the action, other modes have to be considered [8]. In the case of f(R) gravity, these further degrees of freedom include only a massive scalar mode, which is dynamical in the metric formalism but not in the Palatini formalism.

f(R) gravity can achieve cosmic acceleration through the effective equation of state parameter \(w_\mathrm{eff}\simeq -1\), as it is well known from \(R^2\)-inflation. This is possible also in the late universe, and it has even been attempted to unify early inflation and late time acceleration in the context of modified gravity [190,191,192,193]. However, modelling the late-time cosmic acceleration should not spoil the successes of the standard cosmological model which requires early inflation, a radiation era allowing Big Bang nucleosynthesis, a matter era during which matter overdensities can grow and form structures, and the present accelerated epoch leading to an uncertain future era the prediction of which is model-dependent (a de Sitter attractor solution or a Big Rip singularity are common predictions as discussed above). The transitions between consecutive eras must be smooth. Smoothness may not be guaranteed in all f(R) models and the radiation-matter transition, in particular, can originate problems in specific f(R) models, including \(f=R-\mu ^{2(n+1)}/R^n\), \(n>0\) [194,195,196,197]. However, the prototypical toy model \(f(R)=R-\mu ^4/R\), which reportedly could not terminate the radiation era, was analyzed in detail with singular perturbation methods [198] and a sufficiently long matter era was found. In general, although a caveat exists about terminating the radiation era and allowing a sufficiently long matter era, one can always find choices of the function f(R) which achieve the correct cosmological dynamics (or any prescribed evolutionary history) by first assigning the desired form of the scale factor a(t) and then by integrating a differential equation for f(R) that produces the desired scale factor as discussed above. The solution f(R) solution is not unique [199,200,201,202], which shows that observational data providing information on (a segment of) the cosmic expansion history a(t) cannot suffice for a reconstruction of the function f(R) specifying the theory of gravity. Additional information is necessary, and it may come from the growth history of cosmological density perturbations, which depends on the theory of gravity.

Analytical solutions of FLRW cosmological equations are rare in literature [203] and phase space analyses are often necessary. They originated with pre-1998 studies of \(R^2\)-inflation and are not limited to spatially flat FLRW spaces [18, 204,205,206].

5.2 The Gauss–Bonnet cosmology

A straightforward generalization of f(R) gravity involves the inclusion in the action of the Gauss–Bonnet topological invariant

$$\begin{aligned} \mathcal{G}\equiv R^2-4R_{\mu \nu }R^{\mu \nu }+R_{\mu \nu \rho \sigma } R^{\mu \nu \rho \sigma }. \end{aligned}$$
(56)

Considering the action \(F(R,\mathcal G)\) means to take into account all the second order curvature invariants connected by the relation (56).

Following the lines of Ref. [78] and adopting physical units such that \(c= k_B=\hbar =1\), we can write the action

$$\begin{aligned} \mathcal{A}=\frac{1}{2\kappa }\int d^4x \sqrt{-g}\left[ F(R,\mathcal{G})+\mathcal{L}_\mathrm{(matter)}\right] . \end{aligned}$$
(57)

It is worth saying that the action (57) contains all the possible curvature invariants that can be derived starting from the Riemann tensor.

The variation of action (57) with respect to the metric provides the following field equations

$$\begin{aligned} R_{\mu \nu }-\tfrac{1}{2} g_{\mu \nu }R=\kappa \,T^\mathrm{(matter)}_{\mu \nu }+ T^{(\mathcal {GB})}_{\mu \nu }, \end{aligned}$$
(58)

where \(\kappa =8\pi G\), \(T^\mathrm{(matter)}_{\mu \nu }\) is the stress energy tensor describing the ordinary matter. The extra term \(T_{\mu \nu }^{(\mathcal {GB})}\), containing all extra curvature terms, is defined as

$$\begin{aligned}&T^{(\mathcal {GB})}_{\mu \nu }=\nabla _\mu \nabla _\nu \frac{\partial F(R,\mathcal{G})}{\partial R}-g_{\mu \nu }\, \Box \, \frac{\partial F(R,\mathcal{G})}{\partial R}\nonumber \\&\quad +2R \nabla _\mu \nabla _\nu \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}-2g_{\mu \nu } R\, \Box \, \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}\nonumber \\&\quad -4R_\mu ^{~\lambda } \nabla _\lambda \nabla _\nu \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}\nonumber \\&\quad -4R_\nu ^{~\lambda } \nabla _\lambda \nabla _\mu \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}} +4R_{\mu \nu } \Box \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}\nonumber \\&\quad +4 g_{\mu \nu } R^{\alpha \beta } \nabla _\alpha \nabla _\beta \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}+4R_{\mu \alpha \beta \nu } \nabla ^\alpha \nabla ^\beta \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}\nonumber \\&\quad -\frac{1}{2}\,g_{\mu \nu } \left[ R \frac{\partial F(R,\mathcal{G})}{\partial R} + \mathcal{G} \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}- F(R,\mathcal{G})\right] \nonumber \\&\quad +\left( 1- \frac{\partial F(R,\mathcal{G})}{\partial R}\right) \,\left( R_{\mu \nu }-\frac{1}{2} g_{\mu \nu }R\right) . \end{aligned}$$
(59)

where \(\nabla \) is the covariant derivative and \(\Box \) is the d’Alembert operator. As for f(R) case, Einstein’s gravity is immediately recovered for \(F(R,\mathcal{G}) = R\).

In the following, for the sake of simplicity, we denote by

$$\begin{aligned} f_{R}\equiv \frac{\partial F(R,\mathcal{G})}{\partial R},\qquad f_\mathcal{G}\equiv \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}, \end{aligned}$$
(60)

the partial derivatives with respect to R and \(\mathcal G\). From the above definition (59), it is clear that the form of \(F(R,\mathcal{G})\) determines the dynamical behavior of the theory. In particular, the term

$$\begin{aligned} W(R,\mathcal{G})\equiv R \frac{\partial F(R,\mathcal{G})}{\partial R} + \mathcal{G} \frac{\partial F(R,\mathcal{G})}{\partial \mathcal{G}}- F(R,\mathcal{G}), \end{aligned}$$
(61)

can be considered as an effective double-field potential for the theory where R and \( \mathcal G\) act as two different scalar fields whose regimes can lead different phases of the cosmological evolution. This can be easily seen considering the trace of field equations

$$\begin{aligned} 3[\Box f_R+V_R]+R[\Box f_\mathcal{G} +W_\mathcal{G}]=0\,. \end{aligned}$$
(62)

Clearly we have the combination of two Klein–Gordon equations where the two fields can lead different phases of dynamics. Below, we are going to derive the cosmological equations in order to discuss the quintessential behavior. Assuming as above a spatially flat FLRW, we can write the Friedmann equations as

$$\begin{aligned} 3f_{R}H^2= & {} \kappa \rho ^\mathrm{(matter)}+\frac{1}{2}(f_{R}R-F(R,\mathcal{G})-6H\dot{f_{R}} \nonumber \\&\quad +\mathcal {G}f_{\mathcal {G}}-24H^3\dot{f_{\mathcal {G}}}), \end{aligned}$$
(63)
$$\begin{aligned} 2f_{R}\dot{H}= & {} -\kappa \left( \rho ^\mathrm{(matter)}+P^\mathrm{(matter)}\right) +H\dot{f_{R}}-\ddot{f_{R}} \nonumber \\&\quad +4H^3\dot{f_{\mathcal {G}}}-8H\dot{H}\dot{f_{\mathcal {G}}}-4H^2\ddot{f_{\mathcal {G}}}. \end{aligned}$$
(64)

The system of cosmological equations becomes self-consistent considering the definition of the Ricci curvature scalar and the Gauss–Bonnet invariant in terms of the scale factor a and then the Hubble parameter H. As derived in [78], they are related to the Lagrange multipliers that have to be introduced in the action (57). We have

$$\begin{aligned} R= & {} 6 \left[ \frac{\ddot{a}}{a}+\left( \frac{\dot{a}}{a}\right) ^2\right] = 6 \left( 2H^{2}+\dot{H} \right) , \end{aligned}$$
(65)
$$\begin{aligned} \mathcal{G}= & {} \frac{24 {\dot{a}}^2 {\ddot{a}}}{a^3}= 24H^{2} \left( H^{2}+\dot{H} \right) \,. \end{aligned}$$
(66)

We can also rewrite the total energy density and pressure, \(\rho _\mathrm{(tot)}\) and \(P_{(tot)}\), due to R and Gauss–Bonnet contributions as [83]:

$$\begin{aligned} \rho _\mathrm{(tot)}= & {} \frac{1}{f_{R}}\left[ \rho ^\mathrm{(matter)}+\frac{1}{2\kappa }\left( R f_{R}-F(R,\mathcal{G})\right. \right. \nonumber \\&\left. \left. -6H\dot{f}_R+\mathcal{G}f_\mathcal{G}-24H^3\dot{f}_\mathcal{G}\right) \right] , \end{aligned}$$
(67a)
$$\begin{aligned} P_{(tot)}= & {} \frac{1}{f_{R}}\left\{ P^{(matter)}+\frac{1}{\kappa }\left[ 2H\dot{f}_R+\ddot{f}_{R}+8H^3\dot{f}_\mathcal{G}\right. \right. \nonumber \\&+8H\dot{H}\dot{f}_\mathcal{G}+4H^{2}\ddot{f}_\mathcal{G} \nonumber \\&\left. \left. -\frac{1}{2}\left( R f_{R}+\mathcal{G} f_\mathcal{G}-F(R,\mathcal{G}) \right) \right] \right\} . \end{aligned}$$
(67b)

For cosmic acceleration, \(\rho _\mathrm{(tot)}+3 P_\mathrm{(tot)} <0\), and assuming that all matter components have non-negative pressure, we can write the equation of state \(w_{(\mathcal {GB})}=P_{(\mathcal {GB})}/\rho _\mathcal{{(GB})}\) from the geometry terms as

$$\begin{aligned} w_{(\mathcal {GB})}= \frac{\mathcal{G} f_\mathcal{G} +R f_{R}-F(R,\mathcal{G})-4 H \left[ 2 H {\ddot{f}}_\mathcal{G}+4 {\dot{f}}_\mathcal{G} \left( H^2+{\dot{H}}\right) +{\dot{f}}_{R}+ {\ddot{f}}_{R}/(2H)\right] }{F(R,\mathcal{G})+24 H^3 {\dot{f}}_\mathcal{G}-\mathcal{G} f_\mathcal{G} +6 H {\dot{f}}_{R}-R f_{R} }\,, \end{aligned}$$
(68)

where the quintessence behavior is obtained for \(-1\le w_{(\mathcal {GB})}<0 \) while the phantom behaviour is achieved for \(w_{(\mathcal {GB})}<-1\).

Specifically, the Gauss–Bonnet term plays the role of a geometrical dark energy as in the case of f(R) gravity and then it contributes to the effective cosmological density according to the formula

$$\begin{aligned} H(z) = H_0\left[ \Omega _m a^{-3}+\Omega _r a^{-4}+\Omega _\mathcal{{(GB)}} a^{-3(1+ w_{(\mathcal {GB})})} \right] \,. \end{aligned}$$
(69)

This means that the effective value of the Gauss–Bonnet contribution can be “measured” by evaluating the standard matter and radiation contributions at the various epochs, that is

$$\begin{aligned} \Omega _\mathcal{{(GB)}}=1-\Omega _m - \Omega _r\,. \end{aligned}$$
(70)

However, the form of \(F(R,\mathcal{G})\) determines the evolution of \(w_{(\mathcal {GB})}\). A viable \(F(R,\mathcal{G})\) form can be achieved by considering the so called Noether Symmetry Approach [78]. It can be shown that symmetries select the form of the function to be

$$\begin{aligned} F({R,\mathcal G})= F_0 R^{n} \mathcal{G}^{1-n}, \end{aligned}$$
(71)

where n is any real number and \(F_0\) is a constant. For power law solutions of the form \(a(t)=a_0t^s\) [80], we obtain the relations

$$\begin{aligned} n_1=\frac{1+s}{2} \quad {\text{ and }} \quad n_2=\frac{1}{1+2s(s-1)}-2s\;, \end{aligned}$$
(72)

such that Eq. (68) can be written in terms of n and s as:

$$\begin{aligned} w_{(\mathcal GB)}=\frac{3 - 2( n + s )}{3 s}, \end{aligned}$$
(73)

where n can assume the values \(n_1\) or \(n_2\). Asymptotically \(w_{(\mathcal GB)}\) behaves like the \(\Lambda \)CDM model with \({\displaystyle w_{(\mathcal GB)}\rightarrow -1}\). By a cosmographic analysis reported in Ref. [87], it is possible to trace the whole cosmic history in terms of \(F(R,\mathcal G)\) gravity. It emerges that Gauss–Bonnet field is dominant in early epochs while Ricci scalar field dominates in the late universe.

Finally, it should be noted that \(F(R,\mathcal{G})= R + \mathcal{G}\), obtained simply adding the Gauss–Bonnet term to the Ricci scalar R, does not differ from GR in 4-dimensional spacetime as it can be rewritten as a boundary term. A detailed discussion on this point is reported in [88].

5.3 Recovering f(R) gravity from teleparallel gravity

In GR, gravitational interaction is described in terms of spacetime curvature. However, this is not the only possibility because equivalent formulations of GR can be achieved in flat spacetimes where gravity is described either by torsion or by non-metricity. This fact points out the existence of further representations of the same underlying theory [207]. Particularly relevant are the Teleparallel Equivalent of General Relativity (TEGR) and its generalization, f(T) gravity, which do not require the Equivalence Principle as its foundation [25]. However, also in this framework an analogue description of accelerated cosmological dynamics can be achieved as in the case of curvature.

Let us sketch the main ingredients of TEGR approach and how f(R) gravity can be recovered also in this framework.

In this theory, the dynamical variables are the vierbeins or tetrad fields \(e_{\mu }^{a}\). They form an orthonormal basis for the tangent space at each point \(x^{\mu }\) of the spacetime manifold. The tetrads \(e_{\mu }^{n}\) and their inverses \(E_{m}^{\mu }\) fulfill the orthogonality conditions \(E_{m}^{\mu }e_{\mu }^{n} =\delta _{m}^{n}\), \(E_{m}^{\nu }e_{\mu }^{m} =\delta _{\mu }^{\nu }\). In terms of the tetrad fields, the metric tensor can be written as \(g_{\mu \nu }=e_{\mu }^{a}e_{\nu }^{b}\eta _{ab}\), where \(\eta _{ab}\) denotes the Minkowski metric. The idea underlying TEGR is to build up a theory with a geometry endorsed with torsion and with a globally flat curvature. This can be realized by defining the torsion tensor in terms of the curvatureless Weitzenböck connection \(W_{\mu }{}^{a}{}_{\nu }=\partial _{\mu }e_{\nu }^{a}\), that is

$$\begin{aligned} T^{a}{}_{\mu \nu }=W_{\mu }{}^{a}{}_{\nu }-W_{\nu }{}^{a}{}_{\mu }=\partial _{\mu }e_{\nu }^{a}-\partial _{\nu }e_{\mu }^{a}\,. \end{aligned}$$
(74)

In addition, it is convenient to define the contorsion tensor

$$\begin{aligned} 2K_{\mu }{}^{\lambda }{}_{\nu }=T^{\lambda }{}_{\mu \nu }-T_{\nu \mu }{}^{\lambda }+T_{\mu }{}^{\lambda }{}_{\nu }\,, \end{aligned}$$
(75)

and the tensor \(2S_{\sigma }{}^{\mu \nu }=K_{\sigma }{}^{\mu \nu }-\delta _{\sigma }^{\mu }T^{\nu }+\delta _{\sigma }^{\nu }T^{\mu }\). The combination \(T=S_{\sigma }{}^{\mu \nu }T^{\sigma }{}_{\mu \nu }\) is the torsion scalar,Footnote 3 which is a topological object. The action corresponding to the TEGR is given by

$$\begin{aligned} S_{\mathrm {TEGR}}=\frac{1}{\kappa }\int d^{4}x\,e\,T+S_\mathrm{(matter)}, \end{aligned}$$
(76)

where \(e=\text {det}(e_{\mu }^{a})=\sqrt{-g}\) is the volume element of the metric. The Ricci scalar R and the torsion scalar T differs by a boundary term

$$\begin{aligned} R=-T+\frac{2}{e}\partial _{\mu }(eT^{\mu })=-T+B\,, \end{aligned}$$
(77)

where \(B=(2/e)\partial _{\mu }(eT^{\mu })=\nabla _{\mu }T^{\mu }\). It can be shown that the TEGR action reproduces the same field equations as GR being (76) equivalent to the Hilbert-Einstein action.

The straightforwardly generalization of (76) is

$$\begin{aligned} S_{f(T)}=\frac{1}{\kappa }\int d^{4}x\,e\,f(T)+S_\mathrm{(matter)}, \end{aligned}$$
(78)

where f(T) is a smooth function of the torsion scalar. Some comment are in order: (1) In this generalized theory is not possible to find the teleparallel equivalent of f(R) gravity since the boundary term in (77) contributes to the field equations. (2) Since the torsion field T is not invariant under local Lorentz transformations, this theory is also not invariant under Lorentz transformations. (3) The theory is a second order theory and hence, mathematically, it is easier than f(R) gravity.

An important remark is in order at this point. As we said, the dynamical variables in TEGR are the tetrad fields \(e^a_\mu \), while, in the metric formulation, this role is fulfilled by the metric tensor \(g_{\mu \nu }\). This means the breaking of Lorentz invariance. However, it is worth noticing that TEGR and its generalizations can be reduced to equivalent metric theories, where the further degrees of freedom of the geometrical background are encoded in the metric potentials (see ref. [25], for more details). It means that passing from the anholonomic system of variables given by \(e^a_\mu \), to the holonomic system of space-time coordinates, assigning \(g_{\mu \nu }\), the Lorentz invariance is restored.

The above action (78) can be immediately generalized by assuming that the function f(T) depends also on the boundary term B. The action can be then written as [208]

$$\begin{aligned} S_{f(T,B)}=\frac{1}{\kappa }\int d^{4}x\,e\,f(T,B)+S_\mathrm{(matter)}, \end{aligned}$$
(79)

where f(TB) is a smooth function of the scalar torsion T and of the (scalar) boundary term B. The motivation of this action is due to the fact that from the only f(T) gravity, it is not possible to find an equivalent theory of its metric counterpart, the f(R) gravity. From the above action, instead, one can easily show that f(R) gravity can be recovered by assuming \(f(T,B)=f(-T+B)=f(R)\).

The variation of the action (79) with respect to the tetrad field yields the field equations

$$\begin{aligned}&2eE_{a}^{\lambda }\Box f_{B} - 2 e E_{a}^{\sigma }\nabla ^{\lambda }\nabla _{\sigma }f_{B}+eBE_{a}^{\lambda }f_{B}\nonumber \\&\quad +4e\Big [(\partial _{\mu }f_{B})+(\partial _{\mu }f_{T})\Big ]S_{a}{}^{\mu \lambda } \nonumber \\&\quad + 4\partial _{\mu }(eS_{a}{}^{\mu \lambda })f_{T}-4ef_{T}T^{\sigma }{}_{\mu a}S_{\sigma }{}^{\lambda \mu }\nonumber \\&\quad -efE_{a}^{\lambda }=16\pi e\Theta _{a}^{\lambda }, \end{aligned}$$
(80)

where \(f_{T}=\partial f/\partial T\), \(f_{B}=\partial f/\partial B\), \(\nabla _{\sigma }\) is the covariant derivative with respect to the Levi-Civita connection and \(\Theta _{a}^{\lambda }\) is the energy-momentum tensor.

Let us consider f(TB) cosmology in a flat FLRW Universe. In this perspective, one can construct the tetrad field \(e_{\mu }^{a}=\text {diag}\Big (-1,a(t),a(t),a(t)\Big )\). Since f(TB) is not invariant under Lorentz transformations, the choice of the tetrad deserves some caution (for instance, the unwanted condition \(f_{TT}=0\) appears when one considers a flat diagonal FLRW tetrad in spherical coordinates). According to Ref. [209], the above choice of vierbein fields is a good tetrad. The Friedmann equations read

$$\begin{aligned}&-3H^{2}(3f_{B}+2f_{T})+3H\dot{f}_{B}-3\dot{H}f_{B}\nonumber \\&\quad +\frac{1}{2}f(T,B) =\kappa \rho _\mathrm{(matter)} , \end{aligned}$$
(81)
$$\begin{aligned}&-(3H^{2}+\dot{H})(3f_{B}+2f_{T})-2H\dot{f}_{T}+\ddot{f}_{B}\nonumber \\&\quad +\frac{1}{2}f(T,B) =-\kappa P_\mathrm{(matter)}. \end{aligned}$$
(82)

As above, dots represent derivation with respect to the cosmic time and \(f_T\) and \(f_B\) are the derivatives of f(TB) function with respect to T and B.

Immediately, the cosmological equations can be written as

$$\begin{aligned} 3H^2= & {} \kappa (\rho _\mathrm{(matter)}+\rho _\mathrm{eff}), \end{aligned}$$
(83)
$$\begin{aligned} 3H^2+{\dot{H}}= & {} -\kappa (P_\mathrm{(matter)}+P_\mathrm{eff}), \end{aligned}$$
(84)

and then the adiabatic factor is again \( w_\mathrm{eff}={P_\mathrm{eff}}/{\rho _\mathrm{eff}} \) which means that the above considerations for f(R) gravity can be easily recovered.

6 Conclusions

In this short review paper we have discussed the possibility to address the cosmic history by Extended Gravity, i.e. extensions of GR aimed to address the gravitational interaction at ultraviolet and infrared scales. In particular, a straightforward extension of Einstein theory, f(R) gravity, can potentially explain the cosmic accelerated expansion by curvature both at early and late epochs.

The approach is based on the fact that the further degrees of freedom, related to curvature, behave as a scalar field capable of leading the expansions in the various cosmic epochs without considering further material ingredients like dark energy and dark matter.

Taking into account some viability criteria in order to avoid inconsistencies and dangerous instabilities of the models, large classes of theories, involving also other geometric invariants, can be considered. The underlying philosophy is that geometry can give a comprehensive picture of the universe ranging from inflation up today. Clearly, the final cosmological model will be derived once a consistent amount of data, tracing back the evolution at any epoch, will be matched with methods of the precision cosmology. This inverse scattering approach is a sort of Designer Extended Gravity which will be more and more reliable if it will steam out from some fundamental theory.