1 Introduction

Despite being a challenging task, the search for a unified cosmological theory accounting for the entire known evolution history of the Universe, or at least providing a smooth transition between two different cosmic epochs, has been attempted both through single fluid approaches and by proposing modifications of the gravity sector beyond general relativity [1, 2]. In the former case a certain single cosmic fluid is adopted to describe two different epochs in the limits of high and low energy, while the latter framework postulates some curvature modifications to the Lagrangian which are dominant at a certain cosmic epoch but dilutes at others. For example, Born–Infeld-like theories can lead to an effective description of the cosmic matter interpolating between dark matter and dark energy dominated epochs as a consequence of the Friedman equations, in terms of the Chaplygin Gas [3, 4] or of the Anton–Schmidt fluid [5, 6]. Other thermodynamically-motivated fluid models like the Dieterici [7] or the Shan–Chen [8] can as well exhibit a phase transition from a decelerating to an accelerating phase of the universe; the former from a matter-dominated epoch to a dark energy epoch, and the latter from an early radiation-dominated epoch to a dark energy epoch. The Shan–Chen model can also be used for describing the exponential expansion occurring during the inflationary epoch with the advantage of exhibiting a graceful exit mechanism, but for a different choice of the free parameters entering its equations of state than in the former analysis [9].

On the other hand, extended gravity theories in which a certain curvature invariant is added to, or used to replace, the Ricci scalar inside the Einstein-Hilbert Lagrangian can provide as well an evolution between different cosmic epochs as a consequence of the modified field equations themselves [10,11,12,13,14,15,16]. In spite of the correspondence between modified gravity theories and non-ideal fluid pictures (i.e. whose pressure and energy density are connected via \(P=w(\rho )\rho \)) [17], the former have the advantage of not violating some of the energy conditions which instead are broken when exotic fluids with negative pressure are adopted, and they preserve causality which would be lost when the adiabatic speed of sound squared becomes negative.

In this paper, we will merge the fluid and the modified gravity approaches and propose some cosmological models in which the gravity sector is accounted for by a Lagrangian of the type \(f(R)=R+\zeta R^2\), while the matter content is assumed to obey to some non-ideal equations of state with a well-established thermodynamical foundation known under the names of Redlich–Kwong, (modified) Berthelot, and Dieterici fluid separately. The former assumption will allow us to account for the early-time dynamics, while the latter for the present-day epoch. Both these two models have been investigated separately in a number of literature works [18,19,20,21,22,23,24,25,26,27]. Here, we will obtain a cosmological dynamics with a rich variety of different behaviors like a non-singular bounce, two de Sitter-like epochs (thanks to the non-linear equation of state of the cosmic fluid in which \(w(\rho )\) is not a constant), possibly two radiation-dominated epochs, and possibly a phantom regime (the latter only in the Redlich–Kwong scenario). The comparison between three different realizations of the equation of state parameter function \(w(\rho )\) (for example which can be either always regular or admitting singularities, which can blow up or not at small or high energy densities, etc.) will give us the opportunity of enlightening which of our findings hold only when a particular fluid modeling is considered, and which instead seem to be a general characteristic of the cosmological dynamics. We must mention here that previously there have been some attempts to unify early and late time cosmology under certain forms of f(R) gravity [28,29,30]. However, it is worthwhile to remark also that the modifications utilized in those works are completely ad-hoc, lacking any motivation from the field theory point of view. The only modifications to the Einstein-Hilbert Lagrangian with some field theoretical motivations are the quadratic gravity theories. It has been known for some time that gravity Lagrangian containing additional quadratic curvature invariant terms are renormalizable [31, 32]. Therefore in this work we do not intend to go beyond quadratic modifications. In particular we consider only the simplest case, namely, an \(R^2\) correction term, along with fluids having a well-defined thermodynamic foundation.

We will tackle the technical difficulties arising in a fourth-order gravity theory like this one by adopting the set of dimensionless variables constructed in [33] which allows to cast the dynamical equations into a system of autonomous first-order equations suited for a dynamical system analysis. Such technique constitutes a powerful mathematical tool for describing the qualitative evolution of the the cosmological model under investigation not only in modified gravity [33,34,35,36,37,38,39,40,41,42,43], but also in multi-interacting fluid models [25, 44,45,46,47,48,49,50,51], and in exact or perturbed anisotropic and inhomogeneous cosmological models [52,53,54,55,56,57,58], just to mention a few examples. However, we will also propose a novel cosmologically transparent interpretation for those variables which was still lacking in the literature by deriving the physical restrictions they should obey to for avoiding tachyonic and ghost instabilities and connecting them to the cosmographic parameters, such as the deceleration, jerk and snap parameters which can be astrophysically constrained. Remarkably, we will show that such physical restrictions still allow the existence of a region in the phase space in which the energy density of the matter field is equal to the energy density of the curvature, which may be relevant for addressing the coincidence problem. Furthermore, our choice of variables will be useful also for showing that certain regions of the phase space are free from any of the five known types of cosmological singularities without the need of using the dominant energy balance formalism [59]. Moreover, after compactifying the phase space we will show that the region at infinity does not have only a geometrical meaning but it is such that the cosmic fluid equation of state reduce to the ideal behavior \(P \propto \rho \) in which the interactions between the fluid constituents are suppressed.

One of the most severe shortcomings of the standard cosmological modeling is the Hubble tension, which is the discrepancy between the large and small scale estimates of the Hubble constant from supernova and cosmic microwave background data. Assuming that these predictions are not affected by any systematics, as to gravitational lensing effects on the cosmic microwave background angular spectrum [60] or to calibration and reddening issues for supernovae [61,62,63], an appropriate theoretical framework should be constructed for taming it. Several different proposals have been formulated, but none of them still seem fully satisfactory. For example the presence of a Proca field would reduce the Hubble tension [64], but there are no laboratory evidences of massive electrodynamic effects, and furthermore gauge invariance is lost in this theory [65]. Also, interactions between dark energy and dark matter may alleviate the tension [66], but thermodynamical considerations based on the Le Chatelier-Braun principle suggests that dark energy should decay into dark matter [67] while the fact that the structure formation era should precede the accelerating phase would require otherwise [68]. Our present work is intended as a rigorous dynamical study of a unified cosmic history model, combining two important frameworks one each from the study of early and late-time universe. Although we do not address the issue of \(H_0\) tension here, an interesting scope for further investigation would be whether a unified cosmic history model, like the one we presented here, can provide an alternative to introducing ad-hoc interactions in the dark sector when it comes to alleviating the \(H_0\) tension. Indeed this is not the first time that modified gravity and other ingredients are merged together. For example, anisotropic models in which the Copernican principle is relaxed have already been considered in Einstein–Aether gravity [69] also with a coupling to a scalar field [53], in braneworld cosmologies [70], or in f(R) gravity [71], just to cite a few examples. On the other hand, for a recent phenomenological proposal which may tame some observational challenges invoking two free parameters and requiring only a modification of the gravity sector in terms of a torsional Lagrangian see [72].

Our paper is organized as follows: in Sect. 2 we will review the field equations of the class of models we want to analyze and exhibit the equations of state of the cosmic fluids we are adopting mentioning their basic features, and we will as well introduce a formalism in which both curvature and matter effects are combined into an effective picture. Sect. 3 constitutes the main part of our work: in 3.1 we will recast the equations governing the dynamics of our models as a system of autonomous first order equations in terms of a set of dimensionless variables on which we will also derive appropriate physical restrictions; in 3.2 we will identify the cosmologically meaningful equilibrium solutions, explain for which ranges of the matter equation of state parameters they can arise pointing out possible bifurcations among them for particular types of matter contents, and report their stability showing that radiation-dominated, de Sitter-like and power law cosmologies can arise; in 3.3 we will compactify the phase space and perform the analysis at infinity showing that a nonsinglar bounce occurs; in 3.4, 3.5 and 3.6 we will investigate the dynamics in the invariant submanifolds both numerically by plotting the trajectories in the phase spaces, by deriving analytically their stability, and by finding analytical results for the phase orbits in some specific cases; in 3.7 we will relate the dimensionless variables we have adopted to the deceleration, jerk and snap cosmographic parameters which can be astrophysically measured. Then, in Sect. 4 we will explain why some regions of the phase space are not affected by any cosmological singularity, and in Sect. 5 we will summarize the patterns that have emerged in our analysis by discussing which cosmological features we have discovered are sensitive to the particular modeling of the fluid, and which instead seem to be a general property. We will conclude in Sect. 6 by discussing the cosmological relevance of our analysis and by putting the present work in the perspective of possible future projects. In “Appendix A” we review the applicability of the fluid models considered in this paper for the description of real gases beyond the cosmological context. The analytical computations of the stability of the isolated fixed points and of the invariant submanifolds are reported in the “Appendices B, C, D, E” which make use of both the standard notion of linear stability and of a much more advanced technique like the “ center manifold analysis”.

2 Basic equations of quadratic gravity

The action of quadratic gravity in the Ricci scalarFootnote 1 reads as [78]

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

withFootnote 2\(f(R)=R+\zeta R^2\) and \(\kappa =8\pi G\), G being the Newton’s gravitational constant. \(\zeta \) is a positive parameter quantifying the deviation of the quadratic gravity from the general relativistic Einstein-Hilbert Lagrangian at high curvature. These contributions are supposed to play an important role in the early universe driving the inflationary dynamics but diluting at later epochs [18,19,20,21,22,23,24]. This model constitutes a specific realization of a scalar-tensor theory of gravity because modifications in the gravity sector can be re-interpreted in the Brans–Dicke language as a new degree of freedom associated to a propagating scalar field [17]. Moreover, \(S_m\) is the aggregate matter action responsible for all the fluid content of the Universe. In this paper we will assume the cosmic matter to be a perfect fluid (it is fully characterized by its pressure P and energy density \(\rho \)) obeying to a nonideal equation of state (pressure and energy density are not directly proportional to each other). To be more specific, we will consider some fluid models which constitute examples of evolving dark energy and/or unification of exotic and regular matter since in this latter case the sign of the pressure can change at different cosmic epochs as a consequence of the evolution of the energy density. Thus, our model is intended to study the evolution from inflationary to dark energy epoch by involving both quadratic corrections in the curvature and some nonideal fluid.

Furthermore, in light of the Copernican principle, i.e. that the universe is homogeneous and isotropic, and considering an almost spatially flat universe, our geometrical model will be based on the spacetime

$$\begin{aligned} ds^2=-dt^2 +a^2(t) (dx^2 +dy^2 +dz^2)\,. \end{aligned}$$
(2)

Defining \(F:=\partial f / \partial R\), and introducing the Hubble function \(H:=\dot{a} /a\), where an overdot denotes a derivative with respect to the cosmic time, we can write the field equations for a flat Friedman universe under the action (1) as [10,11,12]:

$$\begin{aligned}&3 (1+ 2\zeta R) H^2 = \rho + \zeta \left( \frac{R^2}{2} -6H \dot{R} \right) \,, \end{aligned}$$
(3a)
$$\begin{aligned}&(1+ 2\zeta R) \dot{H} = \zeta (H \dot{R} -{\ddot{R}}) -\frac{\rho +P}{2}\,, \end{aligned}$$
(3b)

where we have adopted units such that \(\kappa =1\), and the Ricci scalar is related to the Hubble function via

$$\begin{aligned} R=\frac{6 (\dot{a}^2 +a \ddot{a})}{a^2 } = 6(2H^2 + \dot{H})\,. \end{aligned}$$
(4)

The field equations should be complemented by the Bianchi identity

$$\begin{aligned} {\dot{\rho }}=-3H (\rho +P) \end{aligned}$$
(5)

which governs the energy conservation of the cosmic fluid. Furthermore, combining (3a) with (3b) we get

$$\begin{aligned} 2{\dot{H}} + 3H^2 = - \frac{1}{F}\left( P - \frac{RF-f}{2} + \ddot{F} + 2H{\dot{F}}\right) \,, \end{aligned}$$
(6)

which will be invoked in what follows for providing a transparent physical interpretation to the various quantities governing the cosmological dynamics. In fact, the joint effects of the matter content and of the modifications to the gravity sector can be combined into an effective total energy density and an effective total pressure which read as [13, Eq. (IV.82)]:

$$\begin{aligned} \rho _\mathrm{eff}:= & {} 3H^2 = \frac{1}{F} \left( \rho + \frac{RF-f}{2} - 3H{\dot{F}}\right) \nonumber \\= & {} \frac{1}{1+2\zeta R}\left[ \rho + \zeta \left( \frac{R^2}{2} -6H \dot{R} \right) \right] \,, \end{aligned}$$
(7a)
$$\begin{aligned} P_\mathrm{eff}:= & {} -(2 \dot{H} +3H^2)= -\frac{1}{F} \left( P - \frac{RF-f}{2} + \ddot{F} + 2H{\dot{F}}\right) \nonumber \\= & {} -\frac{1}{1+2\zeta R}\left[ P+ \zeta \left( -\frac{R^2}{2} +2{\ddot{R}} +4H \dot{R} \right) \right] \,. \end{aligned}$$
(7b)

Along this line of thinking, one can also define an effective equation of state parameter which encodes information about both the actual cosmic fluid and the curvature effects as

$$\begin{aligned} w_\mathrm{eff} := \frac{P_\mathrm{eff}}{\rho _\mathrm{eff}}= -1-\frac{2{\dot{H}}}{3H^2}\,. \end{aligned}$$
(8)

For the the description of the matter content of the universe, we find convenient to follow the approach of [27] and consider the following modelings for the equations of state of the cosmic fluid separately:

$$\begin{aligned}&P(\rho ) = \frac{1- (\sqrt{2} -1) \alpha \rho }{ 1- (1-\sqrt{2}) \alpha \rho }\beta \rho \,\,\,\,\,\,\,(\text {Redlich--Kwong [79]}), \end{aligned}$$
(9a)
$$\begin{aligned}&P(\rho ) = \frac{\beta \rho }{1+ \alpha \rho } \,\,\,\,\,\,\,[\text {(modified) Berthelot [80]}], \end{aligned}$$
(9b)
$$\begin{aligned}&P(\rho ) = \frac{\beta \rho e^{2(1- \alpha \rho )}}{2- \alpha \rho } \,\,\,\,\,\,\,(\text {Dietrici [81]}). \end{aligned}$$
(9c)

The fluid equation of state parameter defined as \(w:=P/\rho \) takes respectively the forms:

$$\begin{aligned}&w(\rho ) = \frac{1- (\sqrt{2} -1) \alpha \rho }{ 1- (1-\sqrt{2}) \alpha \rho }\beta \,\,\,\,\,\,\,(\text {Redlich--Kwong}), \end{aligned}$$
(10a)
$$\begin{aligned}&w(\rho ) = \frac{\beta }{1+ \alpha \rho } \,\,\,\,\,\,\,[\text {(modified) Berthelot}], \end{aligned}$$
(10b)
$$\begin{aligned}&w(\rho ) = \frac{\beta e^{2(1- \alpha \rho )}}{2- \alpha \rho } \,\,\,\,\,\,\,(\text {Dietrici}). \end{aligned}$$
(10c)

Therefore, our class of models is based on three free parameters (\(\zeta \), \(\alpha \), \(\beta \)). Different interplay between these free parameters will affect the existence of certain equilibrium configurations and certain types of finite-time singularities that we will classify in this paper with the purpose of constraining the values that these free parameters can assume by requiring these configurations to be physically meaningful. The two free parameters entering the equation of state of the cosmic fluid should be interpreted as: \(\alpha >0\) is the temperature at which a thermodynamic phase transition occurs within the fluid, and it sets the strength of the interactions between the fluid particles since in the limit \(\alpha \rightarrow 0\) all these equations of state describe an ideal fluid for which pressure and energy density are directly proportional to each other \(P\simeq \beta \rho \). This latter relation also shows the connection between \(\beta \) and the adiabatic speed of sound inside the fluid. The interested reader can find a more detailed review of the thermodynamic foundation of these fluid approaches in the Appendix of [27], and we will as well mention what the original reasons for their introduction for accounting for some features of real gases were in our Appendix A. More in general, these models try to provide a founded thermodynamical description of an evolving dark energy beyond ad hoc redshift parametrizations for helping its possible direct detection in the the far future. In fact, for accounting for both the Planck and weak lensing datasets, a redshift-dependent modeling of the dark energy equation of state parameter has been assumed in the form of \(w=w_0 +w_1 (1+z)\) with \(w_0\) and \(w_1\) free parameters [82, Sect.6.3]. However, in this simple framework the analysis of the cosmic microwave background constraints on the distance to the last scattering surface is problematic, and therefore the refined Chevallier-Polarski-Linder parametrization \(w=w_0+w_1 z/(1+z)\) has been introduced [83, 84]. The Barboza-Alcaniz \(w=w_0+w_1 z(1+z)/(1+z^2)\) is another proposal which can be used in the whole redshift range \(z\in [1,\infty )\) [85]. Although these frameworks have been useful for studying the running of the dark energy potential beyond a cosmological constant, they do not try to establish the microscopic properties of such an exotic fluid which remain mysterious, calling for a physically deeper investigation. Finally, the functional \(w(\rho )\) can be interpreted also as an energy-dependent chameleon field [86, 87].

3 Qualitative analysis of the dynamics of quadratic gravity with nonideal fluids

In this section, we will derive the dynamical equations governing the evolution of the universe (2) in the gravity model (1) including some nonideal fluids by implementing the set of dimensionless variables considered in [33, 36]. Particular attention will be devoted to the rewriting of the equation of state parameters (10) as functions of such dimensionless variables which are suited for a dynamical system analysis. Then, we will set some further constraints on the values of the free parameters of our model by requiring it to be free from instabilities. Lastly, we will list the mathematical equilibria and discuss their cosmological significance (which may provide tighter restrictions on the free parameters), possible bifurcations among them and their stability. Then, we will provide a prescription for compactifying the phase space with the purpose of investigating the dynamics at its infinity, and we will reconstruct the cosmological evolution on some invariant submanifolds also by analytically finding the equations of the phase orbits. In this section we also derive a set of relationships between the dimensionless variables employed in the dynamical system analysis and the observationally-relevant cosmographic parameters.

3.1 Derivation of the autonomous first-order dynamical system in terms of dimensionless variables

The evolution equations to investigate in the \(R+\zeta R^2\) gravity are:

$$\begin{aligned}&3 H^2 + 18 (6 H^2 \dot{H} +2 H {\ddot{H}} -\dot{H}^2) \zeta - \rho =0\,, \end{aligned}$$
(11a)
$$\begin{aligned}&6 [\dddot{H} + (\zeta +4) H {\ddot{H}} + (4-2\zeta ) \dot{H}^2] -\dot{H} -\frac{\rho +P}{2} =0 \,, \nonumber \\\end{aligned}$$
(11b)
$$\begin{aligned}&{\dot{\rho }} +3H (\rho +P)=0 \,, \end{aligned}$$
(11c)

where we have obtained the first two by plugging (4) into (3a)–(3b). We can note that the first equation, which constitutes the Generalized Friedman equation, is not sensitive to the specific cosmic fluid modeling \(P=P(\rho )\), unlike the other two dynamical equations. Furthermore, Eq. (6) can be rewritten in terms of the Hubble function as:

$$\begin{aligned}&6\zeta (2\dddot{H}+12 H {\ddot{H}}+9 \dot{H}^2)\nonumber \\&\quad +2(54 \zeta H^2+1)\dot{H}+3H^2+P=0\,. \end{aligned}$$
(12)

Explicitly, for flat Friedman universes filled with the fluids (9a), (9b), (9c) evolving under the action of quadratic gravity, we get the following set of dynamical equations, respectively:

  • Redlich–Kwong fluid:

    $$\begin{aligned}&3 H^2 + 18 (6 H^2 \dot{H} +2 H {\ddot{H}} -\dot{H}^2) \zeta - \rho =0\,, \end{aligned}$$
    (13a)
    $$\begin{aligned}&6 [\dddot{H} + (\zeta +4) H {\ddot{H}} + (4-2\zeta ) \dot{H}^2] -\dot{H}\nonumber \\&\quad +\frac{[\alpha \rho (\sqrt{2}-1)(\beta -1)-\beta -1]\rho }{2[\alpha \rho (\sqrt{2}-1)+1]} =0 \,, \end{aligned}$$
    (13b)
    $$\begin{aligned}&{\dot{\rho }} +3H\rho \left( 1+\frac{1- (\sqrt{2} -1) \alpha \rho }{ 1- (1-\sqrt{2}) \alpha \rho }\beta \right) =0 \,. \end{aligned}$$
    (13c)
  • (Modified) Berthelot fluid:

    $$\begin{aligned}&3 H^2 + 18 (6 H^2 \dot{H} +2 H {\ddot{H}} -\dot{H}^2) \zeta - \rho =0\,, \end{aligned}$$
    (14a)
    $$\begin{aligned}&6 [\dddot{H} + (\zeta +4) H {\ddot{H}} + (4-2\zeta ) \dot{H}^2] \nonumber \\&\quad -\dot{H} -\frac{(\alpha \rho +\beta +1)\rho }{2(\alpha \rho +1)} =0 \,, \end{aligned}$$
    (14b)
    $$\begin{aligned}&{\dot{\rho }} +3H\rho \left( 1+\frac{\beta }{1+ \alpha \rho } \right) =0 \,. \end{aligned}$$
    (14c)
  • Dietrici fluid:

    $$\begin{aligned}&3 H^2 + 18 (6 H^2 \dot{H} +2 H {\ddot{H}} -\dot{H}^2) \zeta - \rho =0\,, \end{aligned}$$
    (15a)
    $$\begin{aligned}&6 [\dddot{H} + (\zeta +4) H {\ddot{H}} + (4-2\zeta ) \dot{H}^2] -\dot{H} \nonumber \\&\quad +\frac{[\alpha \rho -\beta e^{2(1- \alpha \rho )}-2]\rho }{2(2-\alpha \rho )} =0 \,, \end{aligned}$$
    (15b)
    $$\begin{aligned}&{\dot{\rho }} +3H\rho \left( 1+\frac{\beta e^{2(1- \alpha \rho )}}{2- \alpha \rho }\right) =0 \,. \end{aligned}$$
    (15c)

These differential equations are third order in the Hubble function (or equivalently fourth order in the scale factor), and non-linear in both the Hubble function and the energy density. Thus, it is convenient to tackle them by adopting dynamical system techniques and searching possible equilibrium configurations for clarifying their cosmological meaning and analyzing their qualitative dynamics [88,89,90,91]. Following the formalism of [33, 36], we can recast these differential equations into a first-order autonomous dynamical system in terms of the following dimensionless variables:

$$\begin{aligned} x:= & {} \frac{\dot{F}}{F H} \,=\, 12\zeta \frac{4 H \dot{H} +{\ddot{H}}}{H[1+12\zeta (2H^2+\dot{H})]} \,, \end{aligned}$$
(16a)
$$\begin{aligned} y:= & {} \frac{R}{6 H^2} \,=\, 2+\frac{\dot{H}}{H^2} \, \equiv \, \frac{1-3w_\mathrm{eff}}{2} \,, \end{aligned}$$
(16b)
$$\begin{aligned} z:= & {} \frac{f}{6 F H^2} \,=\, \frac{(2 H^2 +\dot{H})[1+6\zeta (2H^2 +\dot{H})]}{H^2 [1+12\zeta (2H^2+\dot{H})]}\,, \end{aligned}$$
(16c)
$$\begin{aligned} \Omega:= & {} \frac{\rho }{3F H^2} \,=\, \frac{\rho }{3H^2 [1+12\zeta (2H^2+\dot{H})]} \,. \end{aligned}$$
(16d)

We introduce also the following auxiliary quantity:

$$\begin{aligned} \mathfrak {q}(y,z):= & {} \frac{F}{R F'} \nonumber \\= & {} \frac{1+12\zeta (2H^2+\dot{H})}{12\zeta (2H^2+\dot{H})}\equiv \frac{y}{2(y-z)}\,. \end{aligned}$$
(17)

It is clear from (16) that these dynamical variables are undefined when \(H=0\). Therefore, this particular choice of variables pushes any possible fixed point corresponding to Minkowski solutions and bounce (a cosmological bounce is an alternative to the inflationary paradigmFootnote 3) or turnaround scenarios to the infinity of the phase space. Taking into consideration fixed points at infinity requires a global phase space analysis (see e.g. [37, 38] in the context of f(R) gravity), which we will investigate separately in Sect. 3.3. Also, we do not expect any moment of maximum expansion at which \(\dot{a}=0=H\) since we are considering a flat ever-expanding universe filled with the effective fluid (8). However restricting to a domain of the full solution space consisting of only ever expanding (or ever contracting) solutions, this choice of variables is very advantageous when looking for a physical interpretation of the solutions and connecting with the cosmological observables. Therefore, the expansion normalized dynamical variables in (16) are appropriate for the consideration of this paper.

The first-order autonomous dynamical system governing the evolution of the cosmological variables (16) is:Footnote 4

$$\begin{aligned} \frac{dx}{dN}= & {} -2z-x^2+(1-y)x-(3w(\rho )+1)\Omega +2 \,, \end{aligned}$$
(18a)
$$\begin{aligned} \frac{dy}{dN}= & {} y(x \mathfrak {q}(y,z) +4 -2y) \,, \end{aligned}$$
(18b)
$$\begin{aligned} \frac{dz}{dN}= & {} z(4-x-2y )+xy\mathfrak {q}(y,z) \,, \end{aligned}$$
(18c)
$$\begin{aligned} \frac{d \Omega }{dN}= & {} \Omega (1-x-2y-3w(\rho )) \,, \end{aligned}$$
(18d)

where \(\rho =\rho (x,y,z,\Omega )\), \(N=\ln (a(t))\) denotes the number of e-folds of the universe [93], and where we have exploited the chain rule

$$\begin{aligned} \frac{d {{\mathcal {X}}}}{dN}= & {} \frac{d {{\mathcal {X}}}}{dt} \cdot \frac{d t}{da} \nonumber \\&\cdot \frac{d a}{dN}=\frac{\dot{{\mathcal {X}}}}{H}, \end{aligned}$$
(19)

for any generic quantity \(\chi =\chi (t)\). From (16) we can write the Hubble function, its time derivative, and the fluid energy density in terms of the dimensionless variables as:

$$\begin{aligned} H^2= & {} \frac{y-z}{6\zeta y(2z-y)}\,, \quad {\dot{H}}= \frac{(y-z)(y-2)}{6\zeta y(2z-y)}\,, \nonumber \\ \rho= & {} \frac{\Omega (y-z)}{2\zeta (2z-y)^2}\,, \end{aligned}$$
(20)

which, together with the definitions (9a), (9b), (9c), allow us to rewrite the equation of state parameters as

$$\begin{aligned} w(y,z,\Omega )= & {} \frac{2\zeta (2z-y)^2 - (\sqrt{2}-1)\alpha \Omega (y-z)}{2\zeta (2z-y)^2 + (\sqrt{2}-1)\alpha \Omega (y-z)}\beta \,\,\,\,\,\,\,\nonumber \\&(\text {Redlich--Kwong}), \end{aligned}$$
(21a)
$$\begin{aligned} w(y,z,\Omega )= & {} \frac{2\beta \zeta (2z-y)^2}{2\zeta (2z-y)^2 + \alpha \Omega (y-z)} \nonumber \\&[\text {(modified) Berthelot}], \end{aligned}$$
(21b)
$$\begin{aligned} w(y,z,\Omega )= & {} \frac{2\beta \zeta (2z-y)^2}{4\zeta (2z-y)^2 - \alpha \Omega (y-z)}\nonumber \\&\times \exp \left[ 2 - \frac{\alpha \Omega (y-z)}{\zeta (2z-y)^2}\right] \,\,\,\,\,\,\,(\text {Dietrici}). \end{aligned}$$
(21c)

Furthermore, the Generalized Friedman equation (11a) is reduced to the constraint

$$\begin{aligned} y +\Omega -z-x=1\,, \end{aligned}$$
(22)

which should be used for removing one cosmological variable from the dynamical system (18). We choose to eliminate x for a twofold reason: the x-equation is apparently the most complicated one, and the \(w(\rho )\) can be naturally expressed in terms of \((y,z,\Omega )\) as done in (21). Keeping in mind Eq. (17), the dynamical system (18) becomes:

$$\begin{aligned} \frac{dy}{dN}= & {} \frac{y(7y - 8z - 3y^2 + 3yz + y\Omega )}{2(y-z)} \,, \end{aligned}$$
(23a)
$$\begin{aligned} \frac{dz}{dN}= & {} \frac{y^3+(\Omega -7z-1)y^2+2(4z+5-\Omega )yz-2z^2(z-\Omega +5)}{2(y-z)} \,, \nonumber \\ \end{aligned}$$
(23b)
$$\begin{aligned} \frac{d\Omega }{dN}= & {} \Omega (2-3w(y,z,\Omega )-3y+z-\Omega ) \,. \end{aligned}$$
(23c)

There are three physical viability conditions which should be accounted for when identifying the cosmologically relevant regions inside the full 3-dimensional y-z-\(\Omega \) phase space.Footnote 5 They are the following:

  • Firstly, absence of ghost instabilities in f(R) gravity requires \(F(R)>0\), which implies \(1+2\zeta R>0\) for our scenario [94]. From (4)–(20) we can write

    $$\begin{aligned} R = 6{\dot{H}} + 12H^2 = \frac{1}{\zeta }\left( \frac{y-z}{2z-y}\right) \,, \end{aligned}$$
    (24)

    so that the absence of ghost instabilities requires

    $$\begin{aligned} F = 1 + 2\zeta R = \frac{y}{2z-y}>0 \,, \end{aligned}$$
    (25)

    which can be satisfied for

    $$\begin{aligned} 0< y< 2z \quad \text {or} \quad 2z< y < 0\,. \end{aligned}$$
    (26)

    These conditions represent two disconnected regions on the first and third quadrant of the y-z plane bounded by the line \(y=2z\) and the z-axis.

  • Secondly, absence of tachyonic instabilities for a generic f(R) gravity theory requires \(f''(R)>0\), which in our case simply implies \(\zeta >0\) [94]. From the definition of the dynamical variables (16), we note that

    $$\begin{aligned} y-z = \frac{RF-f}{6FH^2} = \frac{\zeta R^2}{6FH^2}> 0 \quad \Rightarrow \quad y > z\,. \end{aligned}$$
    (27)
  • Finally, the weak energy condition requires the energy density to be locally non-negative:

    $$\begin{aligned} \rho \ge 0 \quad \Rightarrow \quad \Omega \ge 0. \end{aligned}$$
    (28)

    We can observe also that R is non-negative within the semi-infinite \(y\ge 0\) region. Therefore,

    $$\begin{aligned} \Omega =\frac{\rho }{3FH^2}\le \frac{\rho }{3F(\zeta \rightarrow 0) H^2}\le 1\,, \end{aligned}$$
    (29)

    where the last equality follows from the observation that in the General Relativity limit (which corresponds to \(\zeta \rightarrow 0\) in the system (11)), one recovers the usual Friedman equation

    $$\begin{aligned} 3H^2 = \rho . \end{aligned}$$
    (30)

To summarize, there are two disjoint regions of the phase space which are physically relevant:

$$\begin{aligned}&0< z< y< 2z,\,\,\, 0 \le \Omega \le 1 \quad \text {and} \nonumber \\&\quad z< y < 0,\,\,\,0 \le \Omega \le 1\,. \end{aligned}$$
(31)

These are two distinct semi-infinite wedge-shaped sectors above the \(\Omega =0\) plane, in the first and third quadrants of the y-z plane, respectively. The region in the first quadrant is confined between the two lines \(y=z\) and \(y=2z\), while the region in the third quadrant is confined between the line \(y=z\) and the z-axis. We stress that till now we have not included the boundaries of these two regions (which are represented by equalities rather than inequalities in (31)), because they require a more careful treatment. The plane defined by the equality \(y=z\) accounts for the General Relativity limit \(R + \zeta R^2 \approx R\) (which can be expressed as \(\zeta \rightarrow 0\) thanks to Eq. (27)) in which the quadratic modification in the Lagrangian is negligible with respect to the Einstein-Hilbert contribution. It is not appropriate to consider the plane \(y=z\) in the analysis that follows because the dynamical variables are undefined there and the dynamical system formulation that we are adopting becomes singular on the plane \(y=z\). However, this does not prevent the origin \((y,z)=(0,0)\) to be describe a physically meaningful configuration, as it can be appreciated from

$$\begin{aligned} \lim _{y\rightarrow 0, z\rightarrow 0}\frac{dy}{dN} \,=\, \lim _{y\rightarrow 0, z\rightarrow 0}\frac{dz}{dN} \, = \, 0\,. \end{aligned}$$
(32)

The dynamical system (23) is therefore singular everywhere on the y-z plane except along the line \(y=z=0\). The other boundary of the acceptable region in the first quadrant is the plane defined by the equality \(y=2z\), while for the one in the third quadrant is the z-\(\Omega \) plane defined by the condition \(y=0\). The plane \(y=2z\) corresponds to the limit \(R + \zeta R^2 \approx \zeta R^2\) (which is equivalent to \(\zeta \rightarrow +\infty \), as it can be seen from Eq. (25)) which occurs when the quadratic modification term in the Lagrangian becomes dominant over the Einstein-Hilbert contribution. At this stage, both the planes \(y=2z\) and \(y=0\) can be safely included in the physically viable region of the phase space, which is thus given by

$$\begin{aligned} {0<z<y\le 2z \,\cup \, z<y\le 0 \,\cup \, y=0=z\,,\,\,0\le \Omega \le 1}\,.\nonumber \\ \end{aligned}$$
(33)

As a consistency check, one can note from (20) that \(H^2 >0\) in both these regions. The dynamical system (23) admits the two invariant submanifolds \(y=0\) and \(\Omega =0\). An invariant submanifold divides the entire phase space into two distinct regions on its both sides. Although they can at most reach the boundary, no phase trajectory can cross the invariant submanifold leaving one region and entering the other. Also, any orbit originating from a point on an invariant submanifold will always remain on that submanifold signifying that the reconstruction of the dynamics requires knowledge on the initial data. We note that R is always negative in the third quadrant of the y-z plane (because y is negative), and thus this region cannot contain any fixed point interpreted as a De-Sitter cosmology (or any other cosmology with negative deceleration parameter). Therefore, observational datasets suggest that the cosmological evolution should not occur in this region of the phase space.

Table 1 In this Table we exhibit all the equilibrium points that can be obtained mathematically for the dynamical system (23) once Eq. (21) have been implemented for the different types of cosmic fluids. The effective equation of state parameter \(w_\mathrm{eff}\) is computed from (16b) and it takes into account the contributions of both the actual matter content and of the curvature effects (see also (8)). We refer to the main text for a detailed explanation of why some equilibria do not represent any meaningful cosmological model

3.2 Qualitative dynamics: equilibria, stability, and bifurcations

In Table 1 we exhibit all the equilibrium points that arise mathematically for the dynamical system (23), along with the corresponding cosmological solution they represent, if any. In fact, some of the fixed points should be ignored on physical and observational grounds:

  1. 1.

    The point \({\mathcal {P}}_3\) is unphysical for the scenario of a universe filled with the (modified) Berthelot fluid because it violates the weak energy condition. Should we consider the Redlich–Kwong fluid, it can carry a physical interpretation for \(1\le \beta \le \frac{17}{9}\). Interestingly, the former point corresponds to the \(\beta =0\) case of the latter.

  2. 2.

    Any orbit that approaches the point \({\mathcal {P}}_4\) must reside inside the third quadrant of the y-z plane in which the deceleration parameter is always positive. Therefore, this point should be ignored on observational ground.

  3. 3.

    Similarly for the state \({\mathcal {P}}_5\): we can note that \(0\le \Omega _\mathrm{eq}\le 1\) delivers a negative \(z_\mathrm{eq}\) implying that any orbit approaching \({\mathcal {P}}_5\) must reside within the third quadrant of the y-z plane. Therefore, this point should also be ignored on observational ground.

  4. 4.

    The fixed point \({\mathcal {P}}_7\) is unphysical for a universe filled with the (modified) Berthelot fluid because it violates the energy condition \(\Omega _\mathrm{eq}\le 1\). In the Redlich–Kwong scenario it is physical for \(-\frac{2}{3} \le \beta \le -\frac{1}{3}\).

The conditions on the model parameters which should be imposed for endowing the remaining mathematical solutions reported in Table 1 with a cosmological interpretation are listed in Table 2. They follow by imposing \(0\le \Omega \le 1\). It should be appreciated that this affects only the range of validity of \(\beta \), while no further constraints other than the already discussed are arising for \(\alpha \) and \(\zeta \).

Among the physically viable fixed points we can identify three distinct types of cosmological solutions:

  1. 1.

    De-Sitter-like cosmology  There are two different possible realizations of a De-Sitter-like cosmology,Footnote 6 which are represented by the isolated fixed points \({\mathcal {P}}_1\) and \({\mathcal {P}}_2\). The equilibrium \({\mathcal {P}}_1\) always constitutes a physical configuration for all the three fluids, whereas \({\mathcal {P}}_2\) is relevant in cosmology only imposing certain constraints on the model parameter \(\beta \) as shown in Table 2. For all the three types of matter, the ideal fluid regime (\(\alpha \rightarrow 0\)) leads to a saddle-node bifurcation between \({\mathcal {P}}_1\) and \({\mathcal {P}}_2\). Furthermore, in the case of the Redlich–Kwong fluid model, also the equilibrium \({\mathcal {P}}_3\) reduces to \({\mathcal {P}}_1\) if we fix \(\beta =1\). In this latter case a pitchfork bifurcation is possible if we choose simultaneously \(\alpha =0\) and \(\beta =1\) [95].

  2. 2.

    Power law evolution  There are up to two different possible realizations of the power law evolution (\(a \sim t^{1/2}\)), which are represented by the isolated fixed points \({\mathcal {P}}_6\) and \({\mathcal {P}}_7\). \({\mathcal {P}}_6\) is always physical for all the three fluids whereas \({\mathcal {P}}_7\) is relevant for cosmology only in the Redlich–Kwong scenario and restricting \(-\frac{2}{3} \le \beta \le -\frac{1}{3}\).

  3. 3.

    Big-Rip singularity  The fixed point \({{\mathcal {P}}}_3\), which is physically well-defined only considering the Redlich–Kwong fluid, represents a big-rip singularity which is asymptotically approached at the finite timeFootnote 7

    $$\begin{aligned} t_s = \frac{4}{3(\beta -1)H_0}\,. \end{aligned}$$
    (34)

    In fact, we can note that the scale factor is diverging by looking at its time evolution; the energy density is also diverging because of (20) and taking into account that \(y=2z\ne 0\), and this comes also with a divergence in the pressure because of the form of the equation of state (9a). Therefore, all the conditions for the occurrence of a Big-Rip singularity are fulfilled [96,97,98,99]. As the limiting case of \(\beta =1\) is approached, which we showed corresponds to a bifurcation with the De-Sitter-like cosmology, the time at which this singularity occurs is shifted at infinity. For \(\beta \ne 1\), \(t_s \sim 1/ H_0\) and the singularity time is comparable to the age of the Universe. Keeping in mind the parameter range in Table 2, we can also see from Table 1 that both the effective and the matter parameters \(w_\mathrm{eff},w<-1\) for this point, where for the latter \(w=-\beta \) as from (21a). Therefore this fixed point also corresponds to a phantom dominated phase at which the Redlich–Kwong fluid itself behaves like a phantom fluid. Furthermore, the adiabatic speed of sound for the Redlich–Kwong fluid, which can be computed from (9a),

    $$\begin{aligned} c_s^2 = \frac{\partial p}{\partial \rho }= \frac{[(2\sqrt{2} -3) \alpha \rho -1] \beta (\alpha \rho -1)}{[(\sqrt{2}-1) \alpha \rho +1]^2 }\,, \end{aligned}$$
    (35)

    once specified to \({{\mathcal {P}}}_3\) via (20) delivers

    $$\begin{aligned} c_s^2 = \frac{(2 \sqrt{2} -3) \beta }{ (\sqrt{2} -1)^2 }=-\beta \,, \end{aligned}$$
    (36)

    which is smaller than \(-1\) in the range of interest of \(\beta \).

Table 2 Taking into account that \(\alpha , \, \zeta >0\), the necessary conditions for promoting the solutions listed in Table 1 from mathematical to physical are derived demanding \(0\le \Omega \le 1\). The limits \(\alpha \rightarrow 0\) and \(\zeta \rightarrow 0\) correspond to ideal fluid and General Relativity, respectively. The points \({\mathcal {P}}_4\) and \({\mathcal {P}}_5\) are not included in this Table because they belong to a region of the phase in which the deceleration parameter is always positive

The stability nature of the fixed points is listed in Table 3 and detailed calculation is presented in Appendix B. It is possible to note that under the assumption that \(\alpha ,\zeta >0\), only the parameter \(\beta \), which is related to the adiabatic speed of sound within the fluid, affects the stability nature of the finite isolated fixed point.

Table 3 Stability nature of the finite fixed points. When investigating the stability of a fixed point it is important to keep in mind the range of \(\beta \) for which the fixed point exists. The abbreviation c.m.a. stands for “ Center Manifold Analysis”

3.3 Phase space analysis at infinity

Compactification of an unbound phase space is necessary to search for any possible fixed point that lies at its infinity: thanks to this procedure the fixed points at infinity are mapped to the boundary of the corresponding compact phase space. In general all the dynamical variables can tend to infinity, which means the phase space of the theory can exhibit a unlimited extent in all the directions. There are different prescriptions for f(R) cosmologies (see e.g. [38] for a generic f(R) theory and [37] for the particular \(R+\zeta R^n\) theory) for compactifying the phase space in all the directions. However, in this Sect. we introduce a new compactification technique which directly exploits the physical viability conditions we previously derived in (33). As we will show below, one can use these constraints to define some invariant submanifolds that border the physically viable region of the phase space and then we are left with only one direction in which the phase space need to be compactified.

From a mathematical point of view, the dynamical system (23) is singular on the plane \(y=z\). Since this plane is one of the boundaries of the region of the phase space we are interested in, this singularity can be regularized by introducing a new time variable \(\tau \) such that

$$\begin{aligned} d\tau =\frac{dN}{y-z}\,, \end{aligned}$$
(37)

in terms of which the dynamical system can be re-written as

$$\begin{aligned} \frac{dy}{d\tau }= & {} \frac{y(7y - 8z - 3y^2 + 3yz + y\Omega )}{2} \,, \end{aligned}$$
(38a)
$$\begin{aligned} \frac{dz}{d\tau }= & {} \frac{y^3+(\Omega -7z-1)y^2+2(4z+5-\Omega )yz-2z^2(z-\Omega +5)}{2} \,, \nonumber \\ \end{aligned}$$
(38b)
$$\begin{aligned} \frac{d\Omega }{d\tau }= & {} \Omega (y-z)(2-3w(y,z,\Omega )-3y+z-\Omega ) \,. \end{aligned}$$
(38c)

Now one can write

$$\begin{aligned} \frac{d}{d\tau }(y-z)= & {} -(y-z)[2y^2 - y(3z+4) \nonumber \\&+ z(-\Omega +z+5)], \end{aligned}$$
(39a)
$$\begin{aligned} \frac{d}{d\tau }(y-2z)= & {} -\frac{1}{2}(y-2z)[5y^2 + y(\Omega -7z-9) \nonumber \\&+ 2z(-\Omega +z+5)], \end{aligned}$$
(39b)

which show that the planes \(y=z\) and \(y=2z\) are invariant submanifolds as well. As discussed in Sect. 3.1, these two planes are equivalent to the two limits \(\zeta \rightarrow 0\) and \(\zeta \rightarrow +\infty \) respectively. To the best of our knowledge this is the first time that the physical viability conditions which follow from the absence of ghost and tachyonic instabilities are recast as invariant submanifolds on the phase space of quadratic gravity. Linear stability analysis reveals that the invariant submanifold \(y=z\) is always attracting whereas the invariant submanifold \(y=2z\) is attracting (repelling) for \(y^2 +z^2 > 5(1-\Omega )^2\) (\(y^2 +z^2 < 5(1-\Omega )^2\)); detailed mathematical analysis is given in “Appendix D”.

Before proceeding any further, it is important to comment that the dynamical system in Eq. (38) should not be used to determine the fixed points, because time redefinitions like (37) may introduce artificial solutions which are not appearing in the original dynamical system. For example, one can notice that the system in Eq. (38) has two lines of fixed points given by,

$$\begin{aligned} {\mathcal {L}}_1\equiv & {} (y=0=z,\,0\le \Omega \le 1) \quad \mathrm{and} \nonumber \\ {\mathcal {L}}_2\equiv & {} (y=z,\,\Omega =1)\,, \end{aligned}$$
(40)

both of which do not occur in the original dynamical system (23). These fictitious fixed points are a pure mathematical artefact due to the time redefinition (37). We stress that this and the following steps are purely mathematical treatments aimed towards compactifying the phase space by introducing appropriate invariant submanifolds. All the finite fixed point analysis should be carried out before these steps.

Along with \(\Omega =0\), the physically relevant region of the phase space is therefore bounded by three invariant submanifolds. Since in this region the dynamical variable \(\Omega \) is itself bounded (\(0\le \Omega \le 1\)), as demonstrated in Sect. 3.1, one needs only to compactify the radial direction in the yz plane. For achieving this goal we first switch to plane polar coordinates in the y-z plane

$$\begin{aligned} y:=r\cos {\theta },\quad z:=r\sin {\theta }\,, \end{aligned}$$
(41)

subject to the restrictions

$$\begin{aligned} 0 \le r < \infty ,\quad \tan ^{-1}\frac{1}{2} \le \theta \le \frac{\pi }{4}. \end{aligned}$$
(42)

The dynamical system (38) in terms of the r-\(\theta \)-\(\Omega \) variables (41) becomes

$$\begin{aligned} \frac{dr}{d\tau }= & {} r^2 \left[ r \cos ^4 \theta +\left( \frac{3(\Omega -1)}{2} -2r \sin \theta \right) \cos ^3 \theta \right. \nonumber \\&+\frac{(1-\Omega )\sin \theta -3r}{2}\cos ^2\theta \nonumber \\&\left. \!+(4r\sin \theta +5-\Omega )\cos \theta +(\Omega -5)\sin \theta -r \right] \nonumber \\ \end{aligned}$$
(43a)
$$\begin{aligned} \frac{d\theta }{d\tau }= & {} -2r^2 \cos ^4 \theta \nonumber \\&+\frac{1-\Omega -2r\sin \theta }{2}r\cos ^3\theta \nonumber \\&+\frac{5r+3(1-\Omega ) \sin \theta }{2}r\cos ^2\theta \nonumber \\&+(\Omega -1-r\sin \theta )r\cos \theta \,, \end{aligned}$$
(43b)
$$\begin{aligned} \frac{d\Omega }{d\tau }= & {} r\Omega (\cos \theta -\sin \theta )(2-3w(r,\theta ,\Omega )\nonumber \\&-3r\cos \theta +r\sin \theta -\Omega )\,, \end{aligned}$$
(43c)

where the fluid equation of state parameters (21) entering the latter equation are given by

$$\begin{aligned} w(r,\theta ,\Omega )= & {} \frac{2\zeta r(2\sin \theta -\cos \theta )^2 - (\sqrt{2}-1)\alpha \Omega (\cos \theta -\sin \theta )}{2\zeta r(2\sin \theta -\cos \theta )^2 + (\sqrt{2}-1)\alpha \Omega (\cos \theta -\sin \theta )}\beta \nonumber \\&(\text {Redlich--Kwong}),\end{aligned}$$
(44a)
$$\begin{aligned} w(r,\theta ,\Omega )= & {} \frac{2\beta \zeta r(2\sin \theta -\cos \theta )^2}{2\zeta r(2\sin \theta -\cos \theta )^2 + \alpha \Omega (\cos \theta -\sin \theta )} \nonumber \\&(\text {Modified Berthelot})\, , \end{aligned}$$
(44b)
$$\begin{aligned} w(r,\theta ,\Omega )= & {} \frac{2\beta \zeta r(2\sin \theta -\cos \theta )^2}{4\zeta r(2\sin \theta -\cos \theta )^2 - \alpha \Omega (\cos \theta -\sin \theta )}\nonumber \\&\times \exp \left[ 2 - \frac{\alpha \Omega (\cos \theta -\sin \theta )}{\zeta r(2\sin \theta -\cos \theta )^2}\right] \,\,\,\,\,\,\,(\text {Dietrici})\, . \end{aligned}$$
(44c)

As we have previously remarked, the introduction of the artificial line of fixed points \({\mathcal {L}}_1\equiv (r=0)\) is clearly confirmed by inspecting the system in Eq. (43). We should remove this fictitious fixed point by another time redefinition

$$\begin{aligned} d\tau ^* = r d\tau \,, \end{aligned}$$
(45)

so that the dynamical system becomes

$$\begin{aligned} \frac{dr}{d\tau ^*} =&r \left[ r \cos ^4 \theta +\left( \frac{3(\Omega -1)}{2} -2r \sin \theta \right) \cos ^3 \theta \right. \nonumber \\&+\frac{(1-\Omega )\sin \theta -3r}{2}\cos ^2\theta \nonumber \\&\left. +(4r\sin \theta +5-\Omega )\cos \theta +(\Omega -5)\sin \theta -r \right] \nonumber \\ \end{aligned}$$
(46a)
$$\begin{aligned} \frac{d\theta }{d\tau ^*}= & {} -2r \cos ^4 \theta +\frac{1-\Omega -2r\sin \theta }{2}\cos ^3\theta \nonumber \\&+\frac{5r+3(1-\Omega ) \sin \theta }{2}\cos ^2\theta \nonumber \\&+(\Omega -1-r\sin \theta )\cos \theta \,, \end{aligned}$$
(46b)
$$\begin{aligned} \frac{d\Omega }{d\tau ^*}= & {} \Omega (\cos \theta -\sin \theta )(2-3w(r,\theta ,\Omega )\nonumber \\&-3r\cos \theta +r\sin \theta -\Omega )\,. \end{aligned}$$
(46c)

The radial direction can be compactified by introducing the new compact variable [36, 39, 40]

$$\begin{aligned} {\mathcal {R}}:=\frac{r}{1+r}\,, \end{aligned}$$
(47)

so that \(r=0\) coincides with \({\mathcal {R}}=0\) and \(r=\infty \) is mapped onto \({\mathcal {R}}=1\). In terms of \({\mathcal {R}}\) the dynamical system to investigate is

$$\begin{aligned} \frac{d{\mathcal {R}}}{d\tau ^*}= & {} -\frac{{\mathcal {R}}}{2}\Big [ -2 {\mathcal {R}} \cos ^4\theta \nonumber \\&+[4{\mathcal {R}} \sin \theta +3(1-\Omega )(1-{\mathcal {R}})]\cos ^3\theta \nonumber \\&+[3{\mathcal {R}}-(1-\Omega )(1-{\mathcal {R}})\sin \theta ]\cos ^2\theta \nonumber \\&-[8{\mathcal {R}}\sin \theta +2(5-\Omega )(1-{\mathcal {R}})]\cos \theta \nonumber \\&+2(5-\Omega )(1-{\mathcal {R}})\sin \theta +2{\mathcal {R}} \Big ]\,, \end{aligned}$$
(48a)
$$\begin{aligned} \frac{d\theta }{d\tau ^*}= & {} \frac{\cos \theta }{2(1-{\mathcal {R}})}\Big [-4{\mathcal {R}}\cos ^3\theta \nonumber \\&+[(1-\Omega )(1-{\mathcal {R}})-2{\mathcal {R}}\sin \theta ]\cos ^2\theta \nonumber \\&+[3(1-\Omega )(1-{\mathcal {R}})\sin \theta +5{\mathcal {R}}]\cos \theta \nonumber \\&-2{\mathcal {R}}\sin \theta -2(1-\Omega )(1-{\mathcal {R}}) \Big ]\,, \end{aligned}$$
(48b)
$$\begin{aligned} \frac{d\Omega }{d\tau ^*}= & {} \frac{\Omega (\cos \theta -\sin \theta )}{(1-{\mathcal {R}})} \Big [(\sin \theta -3\cos \theta ){\mathcal {R}}\nonumber \\&+(2-\Omega -3w({\mathcal {R}},\theta ,\Omega ))(1-{\mathcal {R}}) \Big ] \,, \end{aligned}$$
(48c)

with

$$\begin{aligned}&w({\mathcal {R}},\theta ,\Omega ) = \frac{2\zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2 - (\sqrt{2}-1)\alpha \Omega (1-{\mathcal {R}})(\cos \theta -\sin \theta )}{2\zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2 + (\sqrt{2}-1)\alpha \Omega (1-{\mathcal {R}})(\cos \theta -\sin \theta )}\beta \,\,\,\,\,\,\,(\text {Redlich--Kwong}), \end{aligned}$$
(49a)
$$\begin{aligned}&w({\mathcal {R}},\theta ,\Omega ) = \frac{2\beta \zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2}{2\zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2 + \alpha \Omega (1-{\mathcal {R}})(\cos \theta -\sin \theta )} \,\,\,\,\,\,\,(\text {Modified Berthelot}), \end{aligned}$$
(49b)
$$\begin{aligned}&w({\mathcal {R}},\theta ,\Omega ) = \frac{2\beta \zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2}{4\zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2 - \alpha \Omega (1-{\mathcal {R}})(\cos \theta -\sin \theta )}\exp \left[ 2 - \frac{\alpha \Omega (1-{\mathcal {R}})(\cos \theta -\sin \theta )}{\zeta {\mathcal {R}}(2\sin \theta -\cos \theta )^2}\right] \,\,\,\,\,\,\,(\text {Dietrici}).\nonumber \\ \end{aligned}$$
(49c)

We can note that all the three fluid equations of state remain well-behaved at infinity, i.e. have finite limits as \({\mathcal {R}}\rightarrow 1\). The latter dynamical system has a pole at \({\mathcal {R}}=1\), i.e. is apparently singular at the boundary. This can again be eradicated by defining a new time variable \(\eta \) as

$$\begin{aligned} d\eta =\frac{d\tau ^*}{1-{\mathcal {R}}}\,. \end{aligned}$$
(50)

Therefore, the dynamical system governing the evolution of the compatified variables can be written as

$$\begin{aligned} \frac{d{\mathcal {R}}}{d\eta }= & {} -\frac{{\mathcal {R}} (1-{\mathcal {R}})}{2}\Big [ -2 {\mathcal {R}} \cos ^4\theta +[4{\mathcal {R}} \sin \theta \nonumber \\&+3(1-\Omega )(1-{\mathcal {R}})]\cos ^3\theta \nonumber \\&+[3{\mathcal {R}}-(1-\Omega )(1-{\mathcal {R}})\sin \theta ]\cos ^2\theta \nonumber \\&-[8{\mathcal {R}}\sin \theta +2(5-\Omega )(1-{\mathcal {R}})]\cos \theta \nonumber \\&+2(5-\Omega )(1-{\mathcal {R}})\sin \theta +2{\mathcal {R}} \Big ]\,, \end{aligned}$$
(51a)
$$\begin{aligned} \frac{d\theta }{d\eta }= & {} \frac{\cos \theta }{2}\Big [-4{\mathcal {R}}\cos ^3\theta \nonumber \\&+[(1-\Omega )(1-{\mathcal {R}})-2{\mathcal {R}}\sin \theta ]\cos ^2\theta \nonumber \\&+[3(1-\Omega )(1-{\mathcal {R}})\sin \theta +5{\mathcal {R}}]\cos \theta \nonumber \\&-2{\mathcal {R}}\sin \theta -2(1-\Omega )(1-{\mathcal {R}}) \Big ]\,, \end{aligned}$$
(51b)
$$\begin{aligned} \frac{d\Omega }{d\eta }= & {} \Omega (\cos \theta -\sin \theta ) \Big [(\sin \theta -3\cos \theta )R\nonumber \\&+(2-\Omega -3w({\mathcal {R}},\theta ,\Omega ))(1-{\mathcal {R}}) \Big ]. \end{aligned}$$
(51c)

Since only the r-direction can be infinite, all the asymptotic fixed points should correspond to \(r\rightarrow \infty \) (or \({\mathcal {R}}\rightarrow 1\)). Therefore we need to identify the fixed points in the \({\mathcal {R}}\)-\(\theta \)-\(\Omega \) phase space which fulfill \({\mathcal {R}}=1\). Setting \({\mathcal {R}}=1\) in (51), we obtain

$$\begin{aligned} \frac{d{\mathcal {R}}}{d\eta }\bigg \vert _{{\mathcal {R}}\rightarrow 1}= & {} 0\,, \end{aligned}$$
(52a)
$$\begin{aligned} \frac{d\theta }{d\eta }\bigg \vert _{{\mathcal {R}}\rightarrow 1}= & {} \frac{\cos \theta }{2}(1-\sin 2\theta )(\cos \theta -2 \sin \theta )\,, \end{aligned}$$
(52b)
$$\begin{aligned} \frac{d\Omega }{d\eta }\bigg \vert _{{\mathcal {R}}\rightarrow 1}= & {} \Omega (\cos \theta -\sin \theta )(\sin \theta -3\cos \theta )\,. \end{aligned}$$
(52c)

Interestingly, the evolution at spatial infinity is not explicitly sensitive to the modeling of the cosmic fluid as it was observed in the case of \(R^n\) gravity [36] because w does not enter anylonger the dynamical system (however we remind that we have used previously our particular equations of state for checking that they well behave at infinity). A further information that can be obtained from the analysis at infinity is that \({\mathcal {R}}\rightarrow 1\) is an invariant submanifold. To determine the cosmology corresponding to this submanifold first we note that using (20) one can write

$$\begin{aligned} \lim _{r\rightarrow \infty } H^2= & {} \lim _{r\rightarrow \infty } \frac{\cos \theta -\sin \theta }{6\zeta r \cos \theta (2\sin \theta -\cos \theta )} = 0\,, \end{aligned}$$
(53a)
$$\begin{aligned} \lim _{r\rightarrow \infty } {\dot{H}}= & {} \lim _{r\rightarrow \infty } \frac{(\cos \theta -\sin \theta )(r\cos \theta -2)}{6\zeta r\cos \theta (2\sin \theta -\cos \theta )} \nonumber \\= & {} \frac{1}{6\zeta }\left( \frac{\cos \theta -\sin \theta }{2\sin \theta -\cos \theta }\right) \,, \end{aligned}$$
(53b)
$$\begin{aligned} \lim _{r\rightarrow \infty } \rho= & {} \lim _{r\rightarrow \infty } \frac{\Omega (\cos \theta -\sin \theta )}{2r\zeta (2\sin \theta -\cos \theta )^2} = 0\,, \end{aligned}$$
(53c)

within the range \(\tan ^{-1}\left( \frac{1}{2}\right) \le \theta <\frac{\pi }{4}\). \({\dot{H}}\) is positive at all points on this hypersurface whereas H, \(\rho \) vanish. This is exactly the condition for a matter-less nonsingular bounce. We remark that had we not compactified the phase space, we would have not been able to discover this bounce solution in our cosmological models for the reasons discussed below Eq. (17). Keeping in mind the range of \(\theta \) given in (42), asymptotic dynamical analysis reveals the following features:

  • The asymptotic invariant submanifold accounted for by \({{\mathcal {R}}}=1\) is a repelling submanifold. Detailed calculation regarding the stability of this submanifold is presented in Appendix D. Therefore the nonsingular bouncing solutions that lie on this submanifold may constitute past epochs of the universe.

  • The point \({\mathcal {P}}_i\equiv ({\mathcal {R}},\theta ,\Omega )=(1,\tan ^{-1}\frac{1}{2},0)\) is an isolated fixed point at infinity. This fixed point, although represents a nonsingular bounce, does not necessarily need to be matter-less, as at this point \(\tan \theta =\frac{1}{2}\). In fact, as was pointed out in [92], matter-less nonsingular bounce in f(R) gravity requires the equation \(RF(R)-f(R)=0\) to have a positive root \(R_b\), which is not satisfied in case of \(R + \zeta R^2\) gravity. Linear stability analysis reveals \({\mathcal {P}}_i\) is a saddle point. Stability calculation is presented in “Appendix D”.

3.4 Evolution on the \(y=2z\) invariant submanifold

The submanifold \(y=2z\) corresponds to the limit \(\zeta \rightarrow \infty \) which accounts for the high energy regime in which the gravitational field is so strong that the theory is dominated by the \(R^2\) term. From (39b) it is seen that \(y=2z\) is an invariant submanifold for the dynamics of the system. This submanifold is of attracting nature for (detailed calculations presented in “Appendix D”)

$$\begin{aligned} y^2 + z^2> 5(1-\Omega )^2\Leftrightarrow & {} r> \sqrt{5}(1-\Omega ) \qquad \nonumber \\\Leftrightarrow & {} \Omega > 1 -\frac{1}{\sqrt{5}}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) , \end{aligned}$$
(54)

and of repelling nature for

$$\begin{aligned} y^2 + z^2< 5(1-\Omega )^2\Leftrightarrow & {} r< \sqrt{5}(1-\Omega ) \nonumber \\\Leftrightarrow & {} \Omega < 1 -\frac{1}{\sqrt{5}}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) . \end{aligned}$$
(55)

In terms of the variables r-\(\theta \)-\(\Omega \) (or \({\mathcal {R}}\)-\(\theta \)-\(\Omega \) for the compact case) this submanifold corresponds to \(\theta =\tan ^{-1}(1/2)\). From (44) or (49), for the fluid equation of state parameter we get

$$\begin{aligned} \lim _{\theta \rightarrow \tan ^{-1}(1/2)} w = {{\left\{ \begin{array}{ll} - \beta &{}\quad (\text {Redlich--Kwong}),\\ 0 &{}\quad [\text {(Modified) Berthelot}],\\ 0 &{}\quad (\text {Dietrici}), \end{array}\right. }} \end{aligned}$$
(56)

which shows that the (modified) Berthelot and Dieterici fluids behave like presureless dust (which may account for dark matter), and the Redlich–Kwong one behaves like an ideal fluid in which the non-linearities are suppressed. Phase space plot on the compactified version of this submanifold plane is shown in Fig. 1 for the cases of equations of state corresponding to dark matter (e.g. pressureless dust), stiff fluid and a cosmological constant. We remark that stiff fluids are canonically equivalent to massless scalar fields [100], and some cosmological models indeed predict an epoch of the universe in which they are the dominating energy content [101, 102].

Fig. 1
figure 1

Phase trajectories on the compactified R-\(\Omega \) plane with \(\theta =\tan ^{-1}(1/2)\), which corresponds to the \(y=2z\) submanifold, i.e. the \(R^2\) regime, for (a) \(w=-1\), (b) \(w=0\), (c) \(w=1\). In this limit the equations of state for (modified) Berthelot and Dietrici fluids reduce to that of pressureless dust, so that they correspond to only figure (b). The equation of state for the Redlich–Kwong fluid in this limit reduces to \(p=-\beta \rho \), so that this can correspond to either cases (a)(c) for the parameter choice \(\beta =1,0,-1\). The red curve corresponds to the boundary between the attracting part (right side of the curve) and repelling part (left side of the curve) of the submanifold. The fixed points \({\mathcal {P}}_1\), \({\mathcal {P}}_6\) and \({\mathcal {P}}_i\) lie on this submanifold

On this invariant submanifold the dynamical equations can be reduced to:

$$\begin{aligned} \frac{dz}{d\tau }= & {} z [\Omega +3 (1-z)] \,,\nonumber \\ \frac{d\Omega }{d\tau }= & {} \Omega (2-\Omega -5z -3w). \end{aligned}$$
(57)

For the case of stiff matter, we can find the orbit in the phase space by solving the differential equation

$$\begin{aligned} \frac{d \Omega }{dz}=\frac{\Omega (1+5z +\Omega )}{z (3z -3 -\Omega )} \,, \end{aligned}$$
(58)

which delivers the implicit solution

$$\begin{aligned}&\frac{[1+z^2+z(\Omega -2)]^2 [z^2 +2(\Omega -1)z+(1+\Omega )^2]}{[z^3+(2\Omega -3)z^2+(\Omega ^2-\Omega +3)z-\Omega -1)]^2} =J_1\,,\nonumber \\ \end{aligned}$$
(59)

where \(J_1\) is a constant of integration. The quantity \(J_1(z, \, \Omega )\) is conserved along a particular orbit, but has different values for different orbits, and therefore it can be interpreted as the total “energy” of the Universe. The cosmological evolution must respect the principle of energy conservation: we can interpret Eq. (59) as a sort of “ energy conservation equation” which is providing a law describing how the energy of the cosmic fluid accounted for by \(\Omega \) is converted into the “ geometrical energy” accounted for by the Ricci scalar R; this result is especially relevant for the description of the inflationary epoch in which the quadratic term in the curvature is dominating. Furthermore, in the case of a stringy fluid with \(w=-\frac{1}{3}\), which may describe some topological defects or monopoles arising in the early universe [103], by integrating the differential equation

$$\begin{aligned} \frac{d \Omega }{dz}=\frac{\Omega (5z -3 +\Omega )}{z(3z -\Omega -3)}\,, \end{aligned}$$
(60)

we obtain the implicit orbit equation

$$\begin{aligned} \frac{[z^3+2(\Omega -1) z^2+(\Omega ^2-6\Omega +1)z+4\Omega ] (z+\Omega )^2}{z [z^2+(2\Omega -1)z+\Omega ^2-3 \Omega ]^2} =J_2 \,,\nonumber \\ \end{aligned}$$
(61)

where \(J_2\) is a constant of integration. Also for the radiation case \(w=\frac{1}{3}\) it is possible to integrate analytically the evolution equation

$$\begin{aligned} \frac{d \Omega }{dz}=\frac{\Omega (5z -1 +\Omega )}{z(3z -\Omega -3)}\,, \end{aligned}$$
(62)

and we obtain the implicit orbit equation

$$\begin{aligned} \frac{z (z-1 +\Omega )^4}{\Omega ^3} =J_3 \,, \end{aligned}$$
(63)

where \(J_3\) is another constant of integration.

3.5 Evolution on the \(\Omega =0\) submanifold

It appears either from (23c) or from (48c) that the plane \(\Omega =0\) is an invariant submanifold for the cosmic dynamics. Taking into account that the physically viable region is constituted by the wedge \(0<z<y<2z\), we depict the phase orbits in this invariant submanifold in Fig. 2 by using the evolution equations written in polar coordinates (51a)–(51b). In this way we can get a graphical confirmation that the dynamics is indeed bounded inside this region and that the boundary at spatial infinity \({{\mathcal {R}}}=1\) acts as a source for the cosmic dynamics containing possible past epochs of the universe. Unlike the case of the invariant submanifold \(y=2z\) discussed in Sect. 3.4, the dynamics on the invariant submanifold \(\Omega =0\) does not depend on the particular modeling of the cosmic fluid. However, the stability nature of this invariant submanifold is sensitive to the value of the parameter \(\beta \) as demonstrated in Appendix D, and more in detail it is attracting (repelling) according to \(2-3\beta -3y+z<0\) (\(>0\)) for the Redlich–Kwong and (modified) Berthelot fluids and \(2-3e^2\beta /2-3y+z<0\) (\(>0\)) for the Dietrici fluid.

Fig. 2
figure 2

In panel (a) we show the phase dynamics in the \(\Omega =0\) submanifold accounted for by the evolution Eqs.  (51a)–(51b), whilst in panel (b) we focus our attention on the viable region bounded between the lines \(0<z<y<2z\). This analysis provides a graphical confirmation that the submanifold \({{\mathcal {R}}}=1\) acts as a source for the dynamics, and that the cosmic evolution is indeed contained within the physical region

3.6 Evolution on the \({\mathcal {R}}=1\) submanifold

\({\mathcal {R}}=1\) is an invariant submanifold at the infinity of the phase space. We can find the equation for the orbit \(J=J(\theta , \, \Omega )\) at the infinity of the phase space by solving the partial derivative equation

$$\begin{aligned} \frac{d J(\theta , \, \Omega )}{d\eta }\equiv & {} \frac{\partial J(\theta , \, \Omega )}{\partial \theta }\frac{d\theta }{d\eta } \nonumber \\&+ \frac{\partial J(\theta , \, \Omega )}{\partial \Omega }\frac{d\Omega }{d \eta }=0\,. \end{aligned}$$
(64)

Implementing (52) we find

$$\begin{aligned} J(\theta , \, \Omega )={{\mathcal {F}}} \left( \frac{\Omega (1-\tan \theta )^4}{(2\tan \theta -1)^5} \right) \,, \end{aligned}$$
(65)

where \({{\mathcal {F}}}\) can be any arbitrary function. For reasons of mathematical simplicity, we choose:

$$\begin{aligned} J(\theta , \, \Omega )= \frac{\Omega (1-\tan \theta )^4}{(2\tan \theta -1)^5}\,. \end{aligned}$$
(66)

We note that the quantity \(J(\theta , \, \Omega )\) is a positive quantity within our range of \(\theta \), which is conserved along a particular orbit but can have different values for different orbits. This quantity can again be interpreted as the total “energy” of the Universe and the cosmological evolution must respect the principle of energy conservation. Therefore, the orbits on this submanifold are a family of curves obeying to the equation

$$\begin{aligned} \Omega =\frac{J (2\tan \theta -1)^5}{(1-\tan \theta )^4}\,, \end{aligned}$$
(67)

where J is a constant. We stress as a consistency check that the same result also follows by integrating a differential equation for \(\frac{d\Omega }{d\theta }\) derived by dividing side by side (52c) with (52b). In terms of the original dynamical variables one can write the equation of the orbits as

$$\begin{aligned} \Omega =\frac{J (2z-y)^5}{y(y-z)^4}\,. \end{aligned}$$
(68)

Finally, by using (16) this condition can be recast in terms of the energy density, of the Hubble function and of its first derivative as:

$$\begin{aligned} \rho ( 2H^2 +\dot{H})^4 -{{{\tilde{J}}}}H^2=0\,, \end{aligned}$$
(69)

where we have introduced the new constant

$$\begin{aligned} {{{\tilde{J}}}}=\frac{3J}{6^4 \zeta }\,. \end{aligned}$$
(70)

This result allows us to confirm independently what written below Eq. (53a): since \(H=0\) and \(\dot{H} \ne 0\) we get that the submanifold \({{\mathcal {R}}}=1\) corresponds to a matterless cosmological epoch. However, this should not be taken naively to imply that \(\Omega =0\) because this latter quantity comes with a factor H in the denominator and indeed this is true only on the hypersurface \(y=2z\) as it can be understood from (68).

3.7 Cosmographic analysis

We will now discuss some observational properties of the universe in correspondence of the physical equilibrium points listed in Table 1 by computing the corresponding three cosmographic parameters, namely the deceleration, jerk and snap parameters [104, 105]:

$$\begin{aligned} q\equiv & {} -\frac{1}{aH^2}\cdot \frac{d^2 a}{dt^2}=-1-\frac{\dot{H}}{H^2}\,, \end{aligned}$$
(71a)
$$\begin{aligned} j\equiv & {} \frac{1}{aH^3}\cdot \frac{d^3 a}{dt^2}=\frac{{\ddot{H}}}{H^3} -3q -2\,, \end{aligned}$$
(71b)
$$\begin{aligned} s\equiv & {} \frac{1}{aH^4}\cdot \frac{d^4 a}{dt^2}= \frac{ \dddot{H}}{H^4}+4j+3q(q+4)+6\,. \end{aligned}$$
(71c)

It has been shown that the cosmographic parameters are related to each other by [106, Eq. (15)], [107, Eq. (21)]:

$$\begin{aligned}&j = 2q^2 + q - \frac{dq}{dN}\,, \end{aligned}$$
(72a)
$$\begin{aligned}&s = \frac{dj}{dN} - j(2 + 3q)\,. \end{aligned}$$
(72b)

The cosmographic parameters are connected to the luminosity distance via [104, 108,109,110,111]:

$$\begin{aligned} d_L(z)\,\simeq & {} \,\frac{z}{H_0} \left[ 1+\frac{(1-q_0)z}{2}+\frac{(-1+q_0+3 q_0^2 +j_0)z^2}{6}\nonumber \right. \\&\left. +\frac{(2-2q_0-15 q_0^2 -15 q_0^3 +5 j_0 +10 q_0 j_0 +s_0)z^3}{24} \right] \nonumber \\ \end{aligned}$$
(73)

and to the cosmic history of the universe as:

$$\begin{aligned} H(z)\,\simeq & {} \, H_0 \left[ 1+(1+q_0)z+\frac{(j_0 - q_0^2)z^2}{2} \nonumber \right. \\&\left. +\frac{(3q^2_0 + 3q^3_0 - j_0(3 + 4q_0) - s_0)z^3}{6}\right] \,, \end{aligned}$$
(74)

where a subscript ‘0’ denotes that the quantity has been evaluated at the present time. In this Sect. instead we will estimate the cosmographic parameters characterizing the relevant equilibrium configurations. We exhibit our findings in Table 4. We will achieve this goal by recasting the dimensionless cosmographic parameters q, j, and s in terms of the dimensionless variables introduced in (16). Using the inter-relations between the cosmographic parameters (72), we can write

$$\begin{aligned} q= & {} 1-y\,, \end{aligned}$$
(75a)
$$\begin{aligned} j= & {} 3 -5y +2y^2 +\frac{dy}{dN}\,, \end{aligned}$$
(75b)
$$\begin{aligned} s= & {} -j(2+3q) -(5-4y)\frac{dy}{dN} +\left( \frac{dy}{dN}\right) _{,y}\frac{dy}{dN}\nonumber \\&+\left( \frac{dy}{dN}\right) _{,z}\frac{dz}{dN} +\left( \frac{dy}{dN}\right) _{,\Omega }\frac{d\Omega }{dN}\,. \end{aligned}$$
(75c)

Calculating the right hand side of the above equations using the dynamical evolution (23), we can provide explicit expressions for the cosmographic parameters in terms of the phase space coordinates:

$$\begin{aligned} q= & {} 1-y\,, \end{aligned}$$
(76a)
$$\begin{aligned} j= & {} 3 -y +\frac{1}{2}y^2 -\frac{1}{2}\left( \frac{y^2}{y-z}\right) (1-\Omega )\,, \end{aligned}$$
(76b)
$$\begin{aligned} s= & {} -15 +10y -\frac{1}{2}y^2\nonumber \\&-\frac{y^3}{y-z} +\frac{1}{2}\left( \frac{y^2}{y-z}\right) (3 -2\Omega -3w(y,z,\Omega )\Omega )\,.\nonumber \\ \end{aligned}$$
(76c)

These expressions can be directly generalized to include the fixed points at the infinity of the phase space by switching to the compact phase space coordinates

$$\begin{aligned} y = \left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \cos \theta \,, \quad z = \left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \sin \theta \,. \end{aligned}$$
(77)

Substituting in Eq. (76) we get the following explicit expressions for the cosmographic parameters in terms of the compact phase space coordinates:

$$\begin{aligned} q= & {} 1 -\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \cos \theta \,, \end{aligned}$$
(78a)
$$\begin{aligned} j= & {} 3 -\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \cos \theta +\frac{1}{2}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) ^2 \cos ^2 \theta \nonumber \\&-\frac{1}{2}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \left( \frac{\cos ^2 \theta }{\cos \theta - \sin \theta }\right) (1-\Omega )\,, \end{aligned}$$
(78b)
$$\begin{aligned} s= & {} -15 +10\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \cos \theta \nonumber \\&-\frac{1}{2}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) ^2 \cos ^2 \theta \nonumber \\&-\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) ^2 \left( \frac{\cos ^3 \theta }{\cos \theta - \sin \theta }\right) \nonumber \\&+\frac{1}{2}\left( \frac{{\mathcal {R}}}{1-{\mathcal {R}}}\right) \nonumber \\&\times \left( \frac{\cos ^2 \theta }{\cos \theta - \sin \theta }\right) (3 -2\Omega -3w({\mathcal {R}},\theta ,\Omega )\Omega )\,. \end{aligned}$$
(78c)

First of all, we easily get that (76a) implies that \(y=\)constant submanifolds correspond to cosmic moments with the same value of the deceleration parameter. Possible Minkowski solutions necessarily lie on \(y=1\), and therefore our models do not contain them as equilibrium configurations (this resolves the ambiguity whether the De-Sitter-like cosmologies we have identified in Sect. 3.2 can come with \(H=const.=0\)). The expression of the cosmographic parameters in terms of compact variables also allows us to show that the cosmographic quantities are diverging at spatial infinity of the phase space which is consistent with having a bounce there characterized by \(d_L \rightarrow \infty \). We would like to mention that a cross-check procedure for computing the jerk parameter which does not rely on inter-relations is the following. We implement (20) into (16a) and then solve for the second time derivative of the Hubble function:

$$\begin{aligned} {\ddot{H}}= \frac{(8-x)y^2-8(z+2)y+16z}{72 \zeta y (y-2z)}\sqrt{\frac{6(z-y)}{\zeta y (y-2z)}}\,, \end{aligned}$$
(79)

from which x can be eliminated thanks to the constraint (22):

$$\begin{aligned} {\ddot{H}}= & {} \frac{(9+z-\Omega -y)y^2-8(z+2)y+16z}{72 \zeta y (y-2z)}\nonumber \\&\times \sqrt{\frac{6(z-y)}{\zeta y (y-2z)}}\,. \end{aligned}$$
(80)

Finally, the jerk parameter is obtained just by algebraic manipulations. We get:

$$\begin{aligned} j= & {} \frac{(x-2)y^2+2(z+3)y-6z}{2(y-z)}\nonumber \\= & {} \frac{y^3+(\Omega -z-3)y^2+2(z+3)y-6z}{2(y-z)}\,. \end{aligned}$$
(81)

Interestingly, the jerk parameter is regular on \(y=2z\) because the divergence in \({\ddot{H}}\) has been cured by the likewise divergence in H. For estimating it on \(y=z\ne 0\) it is appropriate to choose a different set of variables taking into account that in such case we fall back in the General Relativity framework.

The values we get for the deceleration parameter imply that phase transitions between epochs in which the expansion of the universe is accelerating and decelerating are allowed in our class of models. In particular, at least one equilibrium point comes with \(q>0\) and at least two with \(q<0\) for each fluid model. Comparison between available astrophysical datasets and the predicted values of the cosmographic parameters can constrain the theory parameters of f(R) theories [107, 112]. A cosmographic interpretation of the Gold SNeIa dataset suggests that \(q_0 \simeq - 0.90\) and \(j_0 \simeq 2.7\) [113, 114]. It should be noted that due to the presence of \(w(y,z,\Omega )\) in the expression for the cosmographic parameter s (76c), the present-day epoch would correspond to different triples \((y,z,\Omega )\) in the phase space. However, the phase space point representing today universe is located in the region \(y<1\). Information on physically relevant trajectories in the phase space can therefore be obtained by noticing that from the expression of the jerk parameter in terms of the dynamical system variables (81) we get

$$\begin{aligned} \frac{\partial j}{\partial \Omega }= & {} \frac{y^2}{2(y-z)},\nonumber \\ \frac{\partial j}{\partial z}= & {} \frac{y^2 (\Omega -1)}{2(y-z)^2}, \end{aligned}$$
(82)

implying that the jerk parameter is an increasing function with respect to \(\Omega \) and decreasing with respect to z.

Table 4 This Table exhibits the values of the deceleration parameter q, jerk parameter j and snap parameter s for the physically-relevant configurations listed in Table 1. We refer to the main text on details about the mathematical steps involved in these computations. We remark that for a correct interpretation of these results it is necessary to take into account the appropriate range of validity for the parameter \(\beta \) for each equilibrium point separately, as summarized in Table 2

4 Singularities classification

In this section we will investigate the possible occurrence of finite-time singularities in the class of Friedmannian f(R) cosmologies we have previously introduced for clarifying whether the different modelings of the cosmic fluid and the modifications beyond general relativity to the gravity sector affect them. In what follows we will denote with \(t_s\) the time at which a singularity may occur. Applying a literature scheme [96, 97], we will be interested in the following five different possible types of singularity:

  1. 1.

    Big rip singularity or Type I is characterized by \(\lim _{t \rightarrow t_s} a(t) = \infty \), \(\lim _{t \rightarrow t_s} \rho _\mathrm{eff}(t) = \infty \), \(\lim _{t \rightarrow t_s} |P_\mathrm{eff}(t)| = \infty \) [98, 99];

  2. 2.

    Sudden singularity or Type II is characterized by \(\lim _{t \rightarrow t_s} a(t) = a_s\), \(\lim _{t \rightarrow t_s} \rho _\mathrm{eff}(t) = \rho _s\), \(\lim _{t \rightarrow t_s} |P_\mathrm{eff}(t)| = \infty \) [115,116,117,118];

  3. 3.

    Big freeze singularity or Type III is characterized by \(\lim _{t \rightarrow t_s} a(t) = a_s\), \(\lim _{t \rightarrow t_s} \rho _\mathrm{eff}(t) = \infty \), \(\lim _{t \rightarrow t_s} |P_\mathrm{eff}(t)| = \infty \) [119];

  4. 4.

    Generalized sudden singularity or Type IV is characterized by \(\lim _{t \rightarrow t_s} a(t) = a_s\), \(\lim _{t \rightarrow t_s} \rho _\mathrm{eff}(t) = \rho _s\), \(\lim _{t \rightarrow t_s} |P_\mathrm{eff}(t)| = P_s\), \(\lim _{t \rightarrow t_s} H^{(i)}(t) = \infty \), \(i=2,...\) [117, 118, 120, 121];

  5. 5.

    w singularity or Type V is characterized by \(\lim _{t \rightarrow t_s} a(t) = a_s\), \(\lim _{t \rightarrow t_s} \rho _\mathrm{eff}(t) = 0\), \(\lim _{t \rightarrow t_s} |P_\mathrm{eff}(t)| = 0\), \(\lim _{t \rightarrow t_s} w_\mathrm{eff} = \lim _{t \rightarrow t_s} \frac{P_\mathrm{eff}(t)}{\rho _\mathrm{eff}(t)}=\infty \) [122, 123].

In this classification, we have denoted with \(a_s\), \(\rho _s\) and \(P_s\) some finite constant values of the scale factor, the effective energy density and its corresponding pressure at time \(t_s\). We recall that in our analysis we will assume positive \(\alpha \) and \(\zeta \), while we will not make any assumptions on the sign of \(\beta \). We also remark that we are working with the effective values of the energy density, pressure and equation of state parameter which encode information both on the actual matter fluid and the curvature effects, as done for example in [124,125,126,127].

Before analyzing the possible occurrence of a finite-time singularity in a generic point of the phase space, we investigate the situation in correspondence of the isolated fixed points reported in Table 1. By looking at the evolution of the scale factor, they can exhibit three different types of cosmological evolution: de Sitter-like (\({{\mathcal {P}}}_1\) and \({{\mathcal {P}}}_2\) for all the three types of fluids), radiation (\({{\mathcal {P}}}_6\) for all the three types of fluids, and \({{\mathcal {P}}}_7\) for Redlich–Kwong), and power-law (\({{\mathcal {P}}}_3\) for Redlich–Kwong).

  • The de Sitter-like cosmologies do not correspond to any finite-time singularity because the effective energy density, pressure and equation of state parameter are finite constants.

  • In the case of an “effective” radiation domination, the scale factor (\(a\sim t^{1/2}\)) would approach \(a_s=0\) at the time \(t=0\) in correspondence of which \(\rho _\mathrm{eff},P_\mathrm{eff}\sim 1/t \rightarrow \infty \), and therefore a finite-time (recalling that the present-day time is \(t_0>0\)) Type III singularity occurs in the past.

  • The isolated fixed point \({{\mathcal {P}}}_3\) in the Redlich–Kwong scenario can correspond to a Type I singularity occurring at a finite time \(t_s\) (34) in future if \( 1<\beta \le 17/9\). We note that in \({{\mathcal {P}}}_3\)

    $$\begin{aligned} \rho _\mathrm{eff}=3H^2=\frac{4}{3(\beta -1)(t_s -t)}\,, \end{aligned}$$
    (83)

    which diverges also for \(\beta \rightarrow 1\); however this does not imply a finite-time singularity as can be seen from Eq. (34).

We will now investigate whether some type of finite-time singularity can occur in some other regions of the phase space. By using the definition of effective energy density (7a), and the relationships between the Hubble function and the dimensionless variables (20), and (41), we have

$$\begin{aligned} \rho _\mathrm{eff}= & {} \frac{y-z}{2\zeta y(2z -y)}\nonumber \\= & {} \frac{\cos \theta -\sin \theta }{2\zeta r \cos \theta (2\sin \theta -\cos \theta )}\,. \end{aligned}$$
(84)

Furthermore, by using Eqs. (16b)–(41) we can get the effective equation of state parameter defined in (8), and pressure in terms of dimensionless variables as:

$$\begin{aligned}&w_\mathrm{eff}=\frac{1-2y}{3}=\frac{1-2r \cos \theta }{3}\,, \end{aligned}$$
(85)
$$\begin{aligned}&P_\mathrm{eff}=\frac{(y-z)(1-2y)}{6\zeta y(2z -y)}=\frac{(\cos \theta -\sin \theta )(1-2r\cos \theta )}{6\zeta r \cos \theta (2\sin \theta -\cos \theta )}\, .\nonumber \\ \end{aligned}$$
(86)

First of all, we note that on the planes \(y=0\) and \(y=2z\), both the effective energy density (84) and effective pressure (86) are diverging, so that two of the requirements for having either a Type I or a Type III singularity are fulfilled. We also remark that in these regions of the phase space both the Hubble function and its first derivative are diverging, as we can understand from Eq. (20), and therefore we have a true curvature singularity in which the Ricci scalar (4) is blowing up.

More in detail, everywhere on the plane \(y=0\) the effective fluid behaves like radiation, implying a Type III singularity since \(a\sim t^{1/2}\) (see also the equilibrium points \({{\mathcal {P}}}_6\) in Table 1 for all the three types of fluids, and \({{\mathcal {P}}}_7\) for Redlich–Kwong); this implies also that both energy density and pressure are diverging as \(\rho _\mathrm{eff}, P_\mathrm{eff} \sim H \sim t^{-1} \sim 1/a^2 \sim (1+z)^2 \) (where this latter z denotes the redshift). Therefore, assuming that the present-day is at the finite-time \(t_0>0\), a Type III singularity occurs in the past at the time \(t=0\).

For understanding the behavior of the singularity on the line \(y=2z\), we recall that a Type I singularity would require \(w_\mathrm{eff}<-1\) [128], i.e. \(y>2\). Therefore the plane \(y=2\) separates the line \(y=2z\) into two parts on whose sides a Type I or a Type III singularity can occur; this finding is consistent with the evolution of the scale factor exhibited in Table 1, and the previous discussion about the equilibrium point \({{\mathcal {P}}}_3 \) for the Redlich–Kwong fluid. We can provide a rough estimate of the time \(t_s\) at which these singularities occur by approximating \(y \approx y_s\) in a small neighborhood of the line \(y=2z\) assuming that the present-time \(t_0\) configuration is contained there. This implies that \(\frac{d(1/H)}{dt} \approx 2-y_s\). Thus, \(H(t) \approx \frac{H_0}{1+(2-y_s)(t-t_0)H_0}\) which diverges at \(t_s \approx t_0 + \frac{1}{(y_s -2)H_0}\) showing that the Type I singularity would be a future singularity, while the Type III a past singularity.

On the other hand, for having a finite energy density, but a diverging pressure we would need a diverging equation of state parameter. By looking at (85), we see that this is possible at and only at infinity, that is for \(r \rightarrow \infty \). In fact, in such a regime, by using Eq. (86) we get

$$\begin{aligned} \lim _{r \rightarrow \infty } |P_\mathrm{eff}|=\frac{\cos \theta -\sin \theta }{3 \zeta (2\sin \theta -\cos \theta )}\,, \end{aligned}$$
(87)

which can diverge if and only if \(\theta =\arctan (1/2)\). Thus, a Type II singularity may occur only at the point \({{\mathcal {P}}}_i\). Moreover, in Sect. 3.3 we have showed that \(H=0\) there, i.e. we have a well-behaving de Sitter-like scale factor and a finite (zero) effective energy density fulfilling all the conditions for having a Type II singularity. We remark that should we have considered the pressure of the actual matter fluid only, a Type II singularity may have arisen in the Dieterici framework only [25].

Moreover, by looking at the second time derivative of the Hubble function in terms of the dimensionless variables given in Eq. (80), we see that a Type IV singularity may occur either along \(y=0\) or along \(y=2z\). This is the mildest possible singularity because it does not imply geodesic incompletness nor diverging curvature scalars. However, in these regions of the phase space also the energy density is diverging as it can be understood from Eq. (84) violating (at least) one of the requirements in the definition of a Type IV singularity; as previously discussed also the Ricci scalar is diverging in such circumstances violating the conditions for a Type IV singularity. Interestingly, this analysis shows that the effective energy density and pressure arising from gravity modifications cannot mimic those of linearly interacting dark matter - dark energy where the latter is modeled according to the Redlich–Kwong or the (modified) Berthelot fluid, as in those cases a type IV singularity is allowed for certain strengths of the coupling term [25].

Finally, by looking at (85) we see that a Type V singularity may occur only at spatial infinity for which \(r \rightarrow \infty \); this would be consistent with having also a diverging deceleration parameter there as we have found in Sect. 3.3. Then, by recalling (87) we see that the effective pressure can vanish if and only if \(\theta =\frac{\pi }{4}\). Under these assumptions also \(\rho _\mathrm{eff}=0\), and taking into account the discussion of Sect. 3.6 we further have a finite scale factor fulfilling all the requirements for a Type V singularity. This result follows from the gravity modifications and constitutes an important difference than General Relativity in which a Type V singularity has been excluded for the three types of Redlich–Kwong, (modified) Berthelot and Dieterici fluids [25]. In fact, we can observe that such type of singularity persists also in the limiting case of \(\rho ,P \rightarrow 0\), i.e. of absence of an actual cosmic fluid.

5 Discussion on generic behavior

Out of the global dynamical analysis of the system that we have presented in this paper, we note that the finite fixed points \({\mathcal {P}}_1\), \({\mathcal {P}}_6\) and the asymptotic fixed point \({\mathcal {P}}_i\) always exist for all the three fluids irrespective of whatever values we choose for the model parameters \(\alpha \), \(\beta \), \(\zeta \), whereas all the other fixed points either exist for a certain fluid or for a specific range of values for the model parameters, and coincide with either \({\mathcal {P}}_1\) or \({\mathcal {P}}_6\) for certain values of those model parameters. The fixed points \({\mathcal {P}}_1\), \({\mathcal {P}}_6\) and \({\mathcal {P}}_i\) therefore characterize some generic features of the cosmological model in quadratic gravity consisting of the three fluids under consideration. We note that all these three fixed points lie at the line of intersection of the planes \(\Omega =0\) and \(y=2z\). We stress that \(\Omega =0\) does not necessarily imply a vacuum solution if either \(r=0\) or \(y=2z\), so that these three fixed points, although lying on the \(\Omega =0\) plane, should not necessarily correspond to vacuum solutions of the \(R+\zeta R^2\) gravity theory. Another point to note is that, as we had discussed before, the plane \(y=2z\) corresponds to the limit \(\zeta \rightarrow \infty \), so that the points lying on this plane can be interpreted to be the solutions of \(f(R)=R^2\) theory of gravity. As shown in [36], irrespective of the fluid under consideration, the phase space of \(R^n\) (\(n\ge 2\)) gravity is always 2-dimensional, which is consistent with our interpretation.

Below we explicitly point out the generic dynamical features of the scenario that we have considered.

  • \({\mathcal {P}}_1\) is a De-Sitter solution that lies on the line of intersection of the planes \(\Omega =0\) and \(y=2z\). This point represents the exact De-Sitter solution of \(R^2\) gravity, which is the basis of Starobinski’s inflationary scenario [78]. Since it is always a non-hyperbolic fixed point one needs to do a center manifold analysis to determine the stability, which is done in Appendix C. From Eq. (C5) we see that two of the eigenvectors of the Jacobian at that point lie on the \(\Omega =0\) plane. The eigenvector corresponding to the negative eigenvalue is along the line \((y=2z,\,\Omega =0)\), which implies that the De-Sitter solution in \(R^2\) gravity is an attractor. The eigenvector corresponding to the zero eigenvalue is along the line \(y+z=3\), and the center manifold analysis reveals that the dynamics is always away from the fixed point along this direction. In the complete \(R+ \zeta R^2\) theory, this corresponds to an exit from the De-Sitter phase.

  • \({\mathcal {P}}_i\) is a nonsingular bouncing solution (\(H=0\), \({\dot{H}}>0\)) as discussed in Sect. 3.3. As demonstrated in Appendix E, this point is a saddle: repelling in the direction normal to the surface \({\mathcal {R}}\rightarrow 1\) and attracting in the directions normal to the planes \(\Omega =0\) and \(y=2z\). The trajectories flowing from \({\mathcal {P}}_i\) to \({\mathcal {P}}_1\) can be interpreted as early universe solutions with an inflationary phase following a nonsingular bounce.Footnote 8 The flow at \({\mathcal {P}}_1\) away from it along the line \(y+z=3\) in this case corresponds to the “graceful exit”. This is consistent with the well known result that Starobinski’s inflationary scenario is a transient attractor in \(R + \zeta R^2\) gravity [24].

  • \({\mathcal {P}}_6\) is an “effective” radiation dominated phase (\(w_\mathrm{eff}=\frac{1}{3}\)). The trajectories flowing from \({\mathcal {P}}_6\) to \({\mathcal {P}}_1\) can be interpreted as late time solutions with a transition from a radiation dominated epoch to a late time accelerating epoch corresponding to dark energy domination. The flow at \({\mathcal {P}}_1\) away from it along the line \(y+z=3\) in this case implies an end to the accelerated phase of expansion, which, in GR, is possible only if the cosmological constant changes sign.

Apart from these generic features, there are some other interesting points worthwhile for explicitly commenting upon:

  • An interesting thing to note is that the same fixed point \({\mathcal {P}}_1\) can be interpreted as either an inflationary epoch or a late time acceleration epoch, depending on which of the phase trajectories we choose to consider.

  • It is also worth mentioning here that we do not get any fixed point corresponding to a matter dominated epoch because we have not considered any dust fluid that may correspond to the CDM. A matter dominated epoch requires \(w_\mathrm{eff}=0\) or equivalently \(y=\frac{1}{2}\). We note that although any trajectory flowing from \({\mathcal {P}}_6\) to \({\mathcal {P}}_1\) crosses the plane \(y=\frac{1}{2}\), there is no actual fixed point with \(y=\frac{1}{2}\), and therefore no matter dominated “phase” in the picture. It is however interesting that an “effective” radiation-like epoch is arising even without explicitly including any ultra-relativistic fluid in the picture.

  • As clear from Tables 2-3, for specific ranges of the values of the model parameter \(\beta \), the fixed points \({\mathcal {P}}_2\) and/or \({\mathcal {P}}_3\) can exist and can also be stable. In such cases there might be more than one De-Sitter phases in the complete evolution of certain cosmological solutions. The trajectories that encounter two De-Sitter fixed points (\({\mathcal {P}}_1\) and \({\mathcal {P}}_2\) or \({\mathcal {P}}_3\)), with \({\mathcal {P}}_1\) being saddle and \({\mathcal {P}}_2\) (or \({\mathcal {P}}_3\)) being stable, are particularly interesting. It should also be noted that \({\mathcal {P}}_2\) (or \({\mathcal {P}}_3\)), when exists, can only be reached after \({\mathcal {P}}_1\). For such solutions \({\mathcal {P}}_1\) can represent Starobinski’s curvature driven inflation, whereas \({\mathcal {P}}_2\) (or \({\mathcal {P}}_3\)) can represent a future attractor corresponding to the late time acceleration.

  • It is worthwhile to note that the other two model parameters, namely \(\alpha \) and \(\zeta \), do not affect neither the existence nor the stability nature of the fixed points, as long as they are assumed to be positive. These two parameters quantify the deviations from ideal fluid and from GR respectively. Existence and stability of fixed points depend only on the model parameter \(\beta \), which characterizes the equation of state parameter of the fluid in its ideal limit. The parameter \(\alpha \) however is crucial in relation to the bifurcation of the De-Sitter fixed points. It is precisely the non-ideal nature of the fluid (\(\alpha \ne 0\)) that makes it possible to obtain two separate De-Sitter fixed points \({\mathcal {P}}_1\) and \({\mathcal {P}}_2\), hence providing a scope for describing the early and the late time De-Sitter epochs at one go.

  • The only case in which a big-rip singularity can arise in finite future is for the Redlich–Kwong fluid with \(\beta >1\). In this case the De-Sitter fixed point \({\mathcal {P}}_2\) is a saddle, implying that the late time De-Sitter phase is an intermediate cosmological phase and not an attractor. In this particular case the true future attractor is \({\mathcal {P}}_3\), which is a big-rip singularity.

The generic features and other interesting points listed in this section are the take home messages from our present study.

6 Conclusion

In this paper, we have investigated some cosmological models governed by a modified Friedman and a modified Raychaudhuri equation (11) equivalent to the following algebraic relations between the cosmographic parameters:Footnote 9

$$\begin{aligned} \rho \,= & {} \, 3H^2 \Omega [1 +12 \zeta H^2 (q-1) ] \,, \qquad \nonumber \\ \rho +P(\rho ) \,= & {} \, 12 H^4[6 +q^2 +8q \nonumber \\&+s+ \zeta (j -q -2q^2)] -2 H^2(q +1)\,, \end{aligned}$$
(88)

which can be summarized into the a single expression in which the parameter \(\zeta \) does not enter directly:

$$\begin{aligned}&3\Omega (q-1) [\rho +P(\rho )] \,\nonumber \\&\quad =\, 36 H^2\left[ (q-1)(q^2+8 q+s+6)H^2+\frac{2+q-j}{12} \right] \Omega \nonumber \\&\qquad +\rho (j-q-2 q^2) \,. \end{aligned}$$
(89)

Whether this evolution of the rate of expansion can tame some of the problems related to the Hubble tension [131,132,133] is beyond the purpose of the present paper, but already at this stage we have demonstrated that these models come with many desirable features: they exhibit an inflationary epoch admitting a graceful exit, a radiation dominated epoch in which light elements may form [134], and a late-time De Sitter epoch consistent with supernovae observations [135, 136]. Furthermore, more than one De Sitter epoch in the cosmological history can also be predicted from thermodynamical arguments [137].

We have obtained these results by applying dynamical system techniques making use of both the linear stability analysis and of center manifold analysis to a Friedman universe filled with three different non-ideal fluids separately in \(f(R)=R+\zeta R^2\) gravity. We have adopted a set of dimensionless variables proposed in [33] on which we have derived the physical restrictions (33) for preserving the theory from ghost and tachyonic instabilities, obtaining nevertheless a model with a rich variety of cosmological behaviors as previously mentioned. It is also interesting to note that the difference between the curvature energy density and the actual matter content energy density, which can be computed from (20), reads as:

$$\begin{aligned} \rho _C -\rho =3H^2 -2\rho =\frac{(y-z)(2z -y -2y\Omega )}{2\zeta y (2z -y)^2}\,. \end{aligned}$$
(90)

Therefore, the two energy densities are equal on the line \(2z -y-2y \Omega =0\), which describes a configuration that can actually arise within the physical range (33). Whether this can tame some aspects of the coincidence problem [138] will be explored in future publications, but we should remark that this result has not required to introduce any ad hoc interaction terms between the two fluids by modifying by hands the Bianchi identities unlike in [139,140,141], and therefore we can appreciate already at this stage that this potential solution would not be affected by inconsistent directions of such energy flow. For example as mentioned in [138], the solar system has formed at the epoch in which the abundance of dark energy is of the same order of magnitude of the abundance of regular matter so that a local gravitational collapse can occur in a globally accelerated expanding universe, and in our picture the roles of those two fluids would be played by a gravitational effect and by an actual matter fluid separately.

We have as well derived a connection between the dynamical system variables we have adopted and the cosmographic deceleration, jerk and snap parameters. Two equilibria points \({{\mathcal {P}}}_1\) and \({{\mathcal {P}}}_2\) come with the same values of these cosmographic parameters, and while one of them (\({{\mathcal {P}}}_2\)) admits a well-defined energy density of the cosmic fluid, in the case of the other (\({{\mathcal {P}}}_1\)) it exhibits the indefinite form 0/0. Thus, in future we will investigate whether the same dimensionless variables used here can be connected as well to the positions of the CMBR peaks for removing this ambiguity. We have extended the dynamical system analysis up to infinity by introducing an appropriate compactification of the phase space. As far as the Redlich–Kwong, (modified) Berthelot, and Dieterici fluids are considered, the region at infinity of the phase space does not carry only an abstract geometrical interpretation, but it corresponds to a regime in which the equation of state for the cosmic fluid reduces to \(P\simeq \beta \rho \), as it can be seen from (44). Thermodynamically, this means that the interactions between the fluid constituents are suppressed as it would happen in the limit \(\alpha \rightarrow 0\). This transition to the ideal behavior of \(P=w(\rho )\rho \) fluids has already been met in cosmology [8, 9, 142], and it has been interpreted as a form of asymptotic freedom analogue to the one which characterizes the quark-gluon plasma [143, 144], although in this case is occurring at low rather then high energy densities.

Finally, the dynamical system approach has given us the opportunity of identifying the regions of the phase space which are free from any of the known five finite-time cosmological singularity. In our cosmological models Type II and Type V singularities can occur in the past only in correspondence of the nonsingular bounce at the infinity of the phase space, the latter being a direct consequence of the modifications to the gravity sector. A Type I singularity can occur in the future along the line \(y=2z\), while a Type III in the past in correspondence of the radiation dominated epochs. Our cosmological models are not affected by a Type IV singularity. Our analysis was completely classical and whether quantum gravity corrections á la Wheeler-DeWitt affect this picture will be clarified in a future project, as for example done in [145]. Other interesting future projects may consist in analyzing the astrophysical data about recombination epoch, 21-cm line excess at cosmic dawn, and Lyman \(\alpha \) forest by exploiting the existence of a radiation-dominated epoch in our models; this can tame the previously mentioned disagreement between the thermodynamical Le Chatelier-Braun principle and the fact that a dark matter epoch should have come before the dark energy one [67, 68] since those phenomena are usually addressed via interacting scenarios [146,147,148].