1 Introduction

Unexpected late time accelerating expansion of the universe is interpreted in the framework of general relativity by the presence of a peculiar cosmic fluid with negative pressure, the dark energy. The nature of dark energy is still a mystery and remains an active area of research. The simplest explanation was the cosmological constant, leading to the \(\Lambda\)CDM model. Although being the best fit for most of the data, the cosmological constant approach suffers many problems [2,3,4]. An example is the lack of physical origin. The cosmological constant was introduced theoretically by Einstein in 1917 in his gravitational field equations [5]. As a constant, this term is interpreted as the intrinsic energy density of the vacuum, and in turn, finds its origin in the quantum field theory (QFT) of particles and fields. QFT, on the other hand, predicts a vacuum energy density (VED) disastrously larger than the current observed critical density of the universe, from which the VED is one part. Unfortunately, models tried to explain the value of the observed VED all failed, and an obstacle is placed in the way, leading Weinberg to formulate his “no-go theorem” [6]. Another problem is the present-time coincidence of the measured order of magnitude of the VED and the matter-energy density, leading to the famous cosmological coincidence problem. Such problems have motivated a host of other alternatives. Dynamical energy models associated with scalar fields, quintessence, are one of the most studied candidates for dark energy [7, 8].

On the other hand, the dark side of the universe contains another mysterious element, dark matter, a peculiar matter which is non-baryonic and interacts gravitationally. The unknown nature of dark energy and dark matter motivated the idea of the unification of these two dark sectors. Models that adopted this idea introduced a single fluid, dubbed dark fluid, with an equation of state that enables a smooth transition from the dark matter domination era to the dark energy domination era. Chaplygin gas model and its generalizations are examples of these models [9, 10]. Another example is the new unified dark fluid model (UDF) proposed by the present author [1].

The above models aim to modify the energy-momentum tensor on the right-hand side of the Einstein field equations. Another line of thought assumes modification on the left-hand side of the equations. In this case, cosmic acceleration is considered to be a consequence of gravitational physics. The class of models adopted in this approach is known as modified gravity models [11,12,13,14,15,16,17,18,19,20]. One of the extensively studied classes of this approach is the f(R) gravity models [21,22,23,24,25,26,27]. In these models, an arbitrary function f(R) replaces the Ricci scalar R in the Einstein-Hilbert action. In that sense, Einstein’s general relativity is recovered by considering \(f(R)=R\). Some modified f(R) gravities have been proposed to describe the late time acceleration of the universe [22, 28]. Others can unify the late acceleration and the early inflation and grant a successful transition from the matter domination phase to the late time acceleration phase of the universe [29,30,31,32,33]. Moreover, modified gravity can play the role of dark matter [34,35,36]. Cosmological observations and solar system tests can constrain such models. Reconstruction schemes for modified gravity theories in general and the f(R) gravity, in particular, can be found in [37,38,39,40,41,42,43,44]. A comprehensive review on modified gravity theories covering the latest developments in the subject can be found in [45].

This work aims to reconstruct the new cosmological unified dark fluid model, UDF, in the framework of f(R) gravity. The UDF model was suggested by the present author in 2018 [1]. It introduces a single unified dark fluid with a particular equation of state that enables the fluid to smoothly evolve from the matter era to the dark energy era. The work was extended by adding viscosity to the fluid in 2019 [46]. Recently, the model was tested against observational data from local \(H_0\) measurements, type Ia supernovae, observational Hubble data, baryon acoustic oscillations, and cosmic microwave background [47]. The Akaike Information Criterion (AIC) results revealed that this UDF model is substantial and is favored by the observational data used over the \(\Lambda\)CDM model.

The paper is organized as follows: in Sect. 2 we present a brief description of the scalar-tensor theory and its connection to the f(R) gravity. In Sect. 3 we review the new cosmological UDF model under consideration. In Sect. 4 we reconstruct this UDF model in the framework of f(R) gravity and discuss the function viability. In Sect. 5 we study the inflationary behavior of the function and compare our results with the recent data from Planck 2018. In the last Section, we make a brief conclusion.

2 Metric f(R) Gravity Versus Scalar Tensor Theories

One of the simplest models of modified gravity is the f(R) gravity. The general 4-dimensional action is

$$\begin{aligned} S_{grav}=\frac{1}{2 \kappa ^2} \int d^4 x\; \sqrt{-g}\; f(R)\; +\; S_m\left( g_{\mu \nu }, \Psi _m\right) \end{aligned}$$
(1)

Where \(\kappa ^2=8 \pi G\), \(S_m\) is the matter action and \(\Psi _m\) is the matter fields. By varying the action (1) with respect to \(g_{\mu \nu }\) the field equations can be obtained, namely,

$$\begin{aligned} R_{\mu \nu }\; f'(R)\; - \frac{1}{2} g_{\mu \nu } f(R)\; - \nabla _\mu \nabla _\nu f'(R)\; + g_{\mu \nu } \square f'(R)\;=\;T_{\mu \nu } \end{aligned}$$
(2)

Where \(T_{\mu \nu }\) is the matter energy-momentum tensor. Considering units where \(8 \pi G\;=\;1\), the contraction of eq. (2) gives

$$\begin{aligned} 3\; \square f'(R)\; +\; R\; f'(R)\; -\; 2\; f(R) \;=\; \rho \; -\; 3\; P \end{aligned}$$
(3)

Where we used the relation

$$\begin{aligned} T\;=\; g^{\mu \nu }\; T_{\mu \nu }\;= \rho \; -\; 3\; P \end{aligned}$$
(4)

and \(\rho\) and P are the energy density and pressure of matter, respectively.

The non-vanishing \(\square f'(R)\) term in eq.(3) indicates that there exists a propagating scalar degree of freedom, named “scalaron”, whose dynamics are governed by this equation. For vacuum solution, the \(\square f'(R)\) term vanishes, while Ricci scalar turns to be constant, and we get

$$\begin{aligned} \; R\; f'(R)\; -\; 2\; f(R) \;=\; 0 \end{aligned}$$
(5)

The occurrence of the scalaron field realizes the idea of Branse-Dicke (BD) theory, where a scalar field mediates gravity along with the metric tensor field [48,49,50]. To establish this connection, let’s start with the f(R) gravity action (1). One can introduce a scalar field \(\chi\) with the scalar-tensor action integral [51]

$$\begin{aligned} S_{ST}=\frac{1}{2 \kappa ^2} \int d^4 x\; \sqrt{-g}\; \left[ f(\chi ) + \left( R\; -\; \chi \right) \; f'(\chi )\right] \; +\; S_m\left( g_{\mu \nu }, \Psi _m\right) \end{aligned}$$
(6)

Variation of this action with respect to the scalar field \(\chi\) yields the relation

$$\begin{aligned} \left( R\; -\; \chi \right) \;f''\; =\; 0 \end{aligned}$$
(7)

As a consequence, \(\chi \; =\; R\) provided that \(f''\; \ne \; 0\).

Now let’s redefine the field \(\chi\) through another fields \(\Phi\) and \(\varphi\) such that

$$\begin{aligned} \Phi \;=\; f'(\chi ) \end{aligned}$$
(8)

and [42]

$$\begin{aligned} \varphi \;=\; f'(\chi ) \;-\; 1 \end{aligned}$$
(9)

So that \(\Phi =\varphi +1\). Accordingly, action (6) reduces for the filed \(\Phi\) to

$$\begin{aligned} S_{ST}=\frac{1}{2 \kappa ^2} \int d^4 x\; \sqrt{-g}\; \left( \Phi \; R\; - \; V(\Phi )\right) \; +\; S_m\left( g_{\mu \nu }, \Psi _m\right) \end{aligned}$$
(10)

where

$$\begin{aligned} V(\Phi ) \;=\; \Phi \; \chi \; -\; f\left( \chi (\Phi )\right) \end{aligned}$$
(11)

Notice that the same action is obtained for the field \(\varphi\) due to eq.(7).

Recalling that the BD action has the form

$$\begin{aligned} S_{BD}=\frac{1}{2 \kappa ^2} \int d^4 x\; \sqrt{-g}\; \left( \Phi \; R\; -\; \frac{\omega }{\Phi } \nabla _{\mu } \phi \nabla ^\mu \Phi \;- \; V(\Phi )\right) \; +\; S_m\left( g_{\mu \nu }, \Psi _m\right) \end{aligned}$$
(12)

where \(\omega\) is a constant known as the BD parameter. One can see that action (10) represents the BD action for \(\omega =0\). Variation of action (10) with respect to the metric results in the field equation for the field \(\Phi\), namely

$$\begin{aligned} G_{\mu \nu }\; \Phi \; - \nabla _\mu \nabla _\nu \Phi \; + g_{\mu \nu } \square \Phi \; + \frac{1}{2} g_{\mu \nu } V(\Phi )\; =\;T_{\mu \nu } \end{aligned}$$
(13)

Noting that the field equation for f(R) gravity, eq.(2), can be rewritten as

$$\begin{aligned} G_{\mu \nu }\; f'(R)\; - \frac{1}{2} g_{\mu \nu } f(R)\; + \frac{1}{2} g_{\mu \nu } \;R\; f'(R)\; - \nabla _\mu \nabla _\nu f'(R)\; + g_{\mu \nu } \square f'(R)\;=\;T_{\mu \nu } \end{aligned}$$
(14)

Equations (13) and (14) for the field equations of BD theory and f(R) gravity show a one-to-one correspondence provided that

$$\begin{aligned} f'(R) = \Phi = \varphi +1 . \end{aligned}$$
(15)

3 The Cosmological UDF Model

The UDF model is a barotropic unified dark fluid characterized by the equation of state (EoS)

$$\begin{aligned} P\;=\; -\rho \;+\; \frac{\alpha \; \rho ^m}{1 \;+\; \beta \; \rho ^n}. \end{aligned}$$
(16)

The two asymptotes of this EoS are power laws for the density. In consequence, the fluid evolves smoothly from dust at early times to dark energy at late times. One can constrain some of the model parameters by studying the asymptotic behavior of its EoS. Following [47], we get

$$\begin{aligned} m \;=\; n \;+\; 1\; ; \;\;\;\;\;\;\;\;\;\;\;\;\;\; \alpha \;=\; \beta \end{aligned}$$
(17)

Defining

$$\begin{aligned} \tilde{\beta } \;=\; \beta ^{-\frac{1}{n}} \end{aligned}$$
(18)

which has the dimensions of \(H^2\); \(\left[ \tilde{\beta }\right] = \left[ H^2\right]\). The EoS of the UDF model can then be written as

$$\begin{aligned} P\;=\; -\rho \;+\; \frac{\rho ^{n+1}}{\tilde{\beta }^n \;+\; \rho ^n} \end{aligned}$$
(19)

Using this in the conservation equation for the energy density

$$\begin{aligned} \frac{d \rho }{d t}\;=\; -3\; \frac{\dot{a}}{a} \left( \rho \;+\; P\right) \end{aligned}$$
(20)

we get the relation governing the evolution of the energy density as a function of the scale factor,

$$\begin{aligned} \rho (a) = \rho _0 \left( \frac{a}{a_0}\right) ^{-3} e^{-\frac{\tilde{\beta }^n}{n \rho _0^n}} \; \textrm{exp}\left\{ \frac{1}{n} W\left[ \left( \frac{a}{a_0}\right) ^{3n} \left( \frac{\tilde{\beta }}{\rho _0}\right) ^n e^{\frac{\tilde{\beta }^n}{\rho _0^n}}\right] \right\} \end{aligned}$$
(21)

Where W is the Lambert W function. The parameters n and \(\tilde{\beta }\) can be constrained using observational data.

On the other hand, the energy density and pressure for the scalar field are given by

$$\begin{aligned} \rho _\varphi = \frac{1}{2} \dot{\varphi }^2 \;+\; V(\varphi ) \end{aligned}$$
(22)
$$\begin{aligned} P_\varphi = \frac{1}{2} \dot{\varphi }^2 \;-\; V(\varphi ) \end{aligned}$$
(23)

Adding (22) and (23), and using eqn.(19) we get

$$\begin{aligned} \dot{\varphi }^2 = \rho \;+\; P \;=\; \frac{\rho ^{n+1}}{\tilde{\beta }^n \;+\; \rho ^n} \end{aligned}$$
(24)

Now using

$$\begin{aligned} \dot{\varphi } \;=\; \frac{d\varphi }{d\rho } \frac{d\rho }{dt} \end{aligned}$$
(25)

together with (20) and (24), we get

$$\begin{aligned} \frac{d\varphi }{d\rho } \;=\; \mp \frac{1}{\sqrt{3}} \left( \frac{\tilde{\beta }^n \;+\; \rho ^n}{\rho ^{n+2}}\right) ^\frac{1}{2} \end{aligned}$$
(26)

This has the solution

$$\begin{aligned} \varphi (\tilde{\rho }) \;=\; \pm \frac{2}{n \sqrt{3}} \left( \textrm{arcsinh}{\left( \sqrt{\tilde{\rho }^n}\right) }-\sqrt{\frac{\tilde{\rho }^n+1}{\tilde{\rho }^n}}\right) \;+\; C \end{aligned}$$
(27)

Where \(\tilde{\rho }\;=\; \rho /\tilde{\beta }\) is dimensionless, and C is the integration constant.

The potential V, on the other hand, is given from (22) and (23) to be

$$\begin{aligned} V= & {} \frac{1}{2} \left( \rho \;-\; P\right) \;=\; \frac{1}{2} \left( 2\;\rho \;-\; \frac{\rho ^{n+1}}{\tilde{\beta }^n \;+\; \rho ^n}\right) \end{aligned}$$
(28)
$$\begin{aligned}= & {} \frac{1}{2} \tilde{\beta }\;\tilde{\rho } \left( \frac{2\;+\;\tilde{\rho }^{n}}{1 \;+\; \tilde{\rho }^n}\right) \end{aligned}$$
(29)

Where we used eqn.(19).

4 Reconstruction of f(R) Gravity from the UDF Model

The generalized Friedmann equations in the f(R) gravity can be obtained from the time-time and space-space components of the field equation (2). In the flat FLRW spacetime these reads

$$\begin{aligned}{} & {} \left( \frac{\dot{a}}{a}\right) ^2 = \frac{1}{3\;F} \left[ \rho \; - \frac{1}{2} \left( f-R\; F\right) \; -3\;H\;\dot{F}\right] \end{aligned}$$
(30)
$$\begin{aligned}{} & {} \left( 2\;\frac{\ddot{a}}{a} \;+\;H^2\right) = \frac{-1}{2\;F} \left[ 2\; \ddot{F} \;+\; 4\;H\;\dot{F} \; +\; f \;-\; R\; F \right] \;-\;\frac{1}{F}\;P \end{aligned}$$
(31)

with \(F(R)=f'(R)\). While the Ricci scalar is given by

$$\begin{aligned} R \;=\; 6\left( 2\;H^2 \;+\; \dot{H} \right) \end{aligned}$$
(32)

We can then define a curvature density and a curvature pressure as

$$\begin{aligned} \begin{aligned} \rho _{curv}&= \left( \frac{R\; F -f-6\;H\;\dot{F}}{2\;F} \right) \\ P_{curv}&= \left( \frac{2\; \ddot{F} \;+\; 4\;H\;\dot{F} \; +\; f \;-\; R\; F}{2\;F} \right) \end{aligned} \end{aligned}$$
(33)

The generalized Friedmann equations (30) and (31) now take the form

$$\begin{aligned} \begin{aligned} H^2&=\frac{1}{3} \; \rho _{eff} \\ \frac{\ddot{a}}{a}&=\frac{-1}{6} \left( \rho _{eff} \;+\; 3\;P_{eff}\right) \end{aligned} \end{aligned}$$
(34)

Where

$$\begin{aligned} \rho _{eff} \;=\; \bar{\rho } \;+\; \rho _{curv} \;\;\;\;\;\;\;\; \& \;\;\;\;\;\;\;\; p_{eff} \;=\; \bar{P} \;+\; P_{curv} \end{aligned}$$
(35)

with \(\bar{\rho }\) and \(\bar{P}\) are given by the regular matter-components density and pressure, \(\rho\) and P, divided by F. The Ricci scalar can now be written as

$$\begin{aligned} \begin{aligned} R&= \rho _{eff} \;-\; 3\;p_{eff} \\&= (1\;-\;3\;\omega _{eff}) \; \rho _{eff} \;=\; \gamma \; \rho _{eff} \end{aligned} \end{aligned}$$
(36)

where \(\omega _{eff}\) is the equation of state parameter, and \(\gamma\) is defined by \((1\;-\;3\;\omega _{eff})\). Neglecting the contribution of any other kind of matter, we can identify \(\rho _{curv}\) and \(P_{curv}\) in Eq. (33) with the density and pressure of the unified dark fluid UDF. The equation of state parameter can then be found from Eq. (19) to be

$$\begin{aligned} \omega _{eff} = -1\ \;+\; \frac{\rho ^{n}}{\tilde{\beta }^n \;+\; \rho ^n} \end{aligned}$$
(37)

Using this in (36), we get

$$\begin{aligned} R= & {} \; 4\; \rho \;-\; \frac{3\;\rho ^{n+1}}{\tilde{\beta }^n \;+\; \rho ^n} \end{aligned}$$
(38)
$$\begin{aligned}= & {} \tilde{\beta }\;\tilde{\rho } \left( \frac{4\;+\;\tilde{\rho }^{n}}{1 \;+\; \tilde{\rho }^n}\right) \end{aligned}$$
(39)

Which is rearranged to give

$$\begin{aligned} \left( 1 \;+\; \tilde{\rho }^n\right) \; R \;-\; 4\; \tilde{\beta }\;\tilde{\rho } \;-\; \tilde{\beta }\;\tilde{\rho }^{n+1} \;=\;0 \end{aligned}$$
(40)

The field function \(\varphi\) can then written from (27) as

$$\begin{aligned} \varphi (R) \;=\; \pm \frac{2}{n \sqrt{3}} \left[ \textrm{arcsinh} \left( {\sqrt{\left( \frac{R}{\gamma \; \tilde{\beta }} \right) ^n}} \right) -\sqrt{1 + \left( \frac{R}{\gamma \; \tilde{\beta }} \right) ^{-n}}\right] \;+\; C \end{aligned}$$
(41)

Using (15), we then have

$$\begin{aligned} \begin{aligned} f(R)&= R \pm \frac{2}{n \sqrt{3}} \left\{ \left( \textrm{arcsinh} \sqrt{\left( \frac{R}{\gamma \tilde{\beta }}\right) ^n}\right) R \right. - {_2}F_1\left( -\frac{1}{2},-\frac{1}{n};1-\frac{1}{n};-\left( \frac{R}{\gamma \tilde{\beta }}\right) ^{-n}\right) \; R \\&\quad \left. - \frac{n\; R}{(n+2)} \; \sqrt{\left( \frac{R}{\gamma \tilde{\beta }}\right) ^{n}} \; {_2}F_1\left( \frac{1}{2},\frac{1}{2}+\frac{1}{n};\frac{3}{2}+\frac{1}{n};-\left( \frac{R}{\gamma \tilde{\beta }}\right) ^n \right) \right\} \;+\; C_1 \end{aligned} \end{aligned}$$
(42)

where the function \(_2F_1(a,b;c;z)\) is the Gaussian hypergeometric function.

The viability of f(R) demands that \(f'(R) > 0\) and \(f''(R) > 0\) for \(R \ge R_0\) where \(R_0\) is the Ricci scalar at the present epoch [15, 23, 24, 28, 52]. These conditions guarantee stability under perturbation, ensure keeping sign of the effective Newtonian coupling, and avoid the negativity of the squared mass of the scalaron field. Testing our f(R) we find that while \(f'(R) > 0\) for both ± sign functions, \(f''(R) < 0\) for the \(-ve\) sign one, meaning that the \(-ve\) sign function is not viable. Accordingly, only the function with the \(+ve\) sign will be considered. In the following, We study the behavior of our f(R) function in the early and late universe.

4.1 Late Universe

For late universe, where \(\tilde{\rho }\) is small, relation (27) gives

$$\begin{aligned} \varphi (\tilde{\rho }) \;\approx \; -\; \frac{2}{n \sqrt{3}} \frac{1}{\sqrt{\tilde{\rho }^n}} \end{aligned}$$
(43)

So that

$$\begin{aligned} \tilde{\rho } \;\approx \; \frac{4}{3\;n^2}\; \varphi ^{-2/n} \end{aligned}$$
(44)

On the other hand, we have from (39)

$$\begin{aligned} R \;\approx \; 4\; \tilde{\beta }\;\tilde{\rho } \end{aligned}$$
(45)

So that

$$\begin{aligned} \varphi (R) \;\approx \; -\; \frac{2}{n \sqrt{3}} \frac{1}{\sqrt{R^n/(4\;\tilde{\beta })^n}} \end{aligned}$$
(46)

While treating \(V(\tilde{\rho })\) in (29) for small \(\tilde{\rho }\), we get

$$\begin{aligned} V(\tilde{\rho }) \approx \tilde{\beta }\;\tilde{\rho } \end{aligned}$$
(47)

So that

$$\begin{aligned} V(\varphi ) \;\approx \; -\frac{4\;\tilde{\beta }}{3\;n^2}\; \varphi ^{-2/n} \end{aligned}$$
(48)

Using eq. (46) in (15) and integrate, we get

$$\begin{aligned} f(R) \;=\;R \;+\; \frac{4\;(4\;\tilde{\beta })^{n/2}}{n\;(n-2)\;\sqrt{3}}\; R^{(1-n/2)} \end{aligned}$$
(49)

This is a common form for f(R). For \(n < 2\) this function takes the general form

$$\begin{aligned} f(R) = R \; - \; \alpha \; R^k \; ; \;\;\; k < 1 , \alpha > 0 \end{aligned}$$
(50)

This form of f(R) was studied in detail in [23]. It was found that this model gives rise to a damped oscillation around the matter era and can reach a stable de Sitter point.

On the other hand, for \(n>2\) eq. (49) has the general form

$$\begin{aligned} f(R) = R \; + \; \alpha \; R^{-k} \; ; \;\;\; k> 0 , \alpha > 0 \end{aligned}$$
(51)

This form for f(R) was proposed by [14, 53] to give rise to late time acceleration. It was also studied in detail in [23], where it was shown that this model does not reach a stable accelerated attractor after the matter epoch.

Friedmann equations associated with this f(R) function are given from the field Eq. (2) to be

$$\begin{aligned} H^2= \frac{2^{n/2} n \sqrt{3} \beta ^{n/2} \left( 8 H^4+4 H^2 \dot{H} n+H \ddot{H} (n-2)+2 \dot{H}^2\right) }{(n-2) \left( 2 H^2+\dot{H}\right) \left( 2^{\frac{n}{2}+1} \sqrt{3} \beta ^{n/2}-3^{\frac{n}{2}+1} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) } \end{aligned}$$
(52)

and

$$\begin{aligned} \begin{aligned} \frac{\ddot{a}}{a}&= \left( \frac{-2^{\frac{n}{2}-1} \sqrt{3} n \beta ^{n/2}}{2(n-2) \left( 2 H^2+\dot{H}\right) ^2 \left( \sqrt{3} 2^{\frac{n}{2}+1} \beta ^{n/2}-3^{\frac{n}{2}+1} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) }\right) \Bigg [ -64 H^6 \\&\quad -16 H^4 \dot{H} (n+4) -20 H^3 \ddot{H} (n-2) -4 H^2 \left( \dddot{H} (n-2)+2 \dot{H}^2 \left( -2 n^2+3 n+8\right) \right) \\&\quad +2 H \ddot{H} \dot{H} \left( 4 n^2-5 n-6\right) -2 \dddot{H} \dot{H} n+4 \dddot{H} \dot{H}+\ddot{H}^2 \left( n^2-4\right) -8 \dot{H}^3 n+8 \dot{H}^3\Bigg ] \end{aligned} \end{aligned}$$
(53)

The effective energy density and pressure associated with this gravity function are then given by

$$\begin{aligned} \rho _eff= & {} \frac{2^{n/2} 3 n \sqrt{3} \beta ^{n/2} \left( 8 H^4+4 H^2 \dot{H} n+H \ddot{H} (n-2)+2 \dot{H}^2\right) }{(n-2) \left( 2 H^2+\dot{H}\right) \left( 2^{\frac{n}{2}+1} \sqrt{3} \beta ^{n/2}-3^{\frac{n}{2}+1} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) } \end{aligned}$$
(54)
$$\begin{aligned} P_eff= & {} \left( \frac{\sqrt{3} 2^{\frac{n}{2}-1} n \beta ^{n/2}}{(n-2) \left( 2 H^2+\dot{H}\right) ^2 \left( \sqrt{3} 2^{\frac{n}{2}+1} \beta ^{n/2}-3^{\frac{n}{2}+1} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) }\right) \nonumber \\{} & {} \times \Big [-16 H^4 \dot{H} (2 n+5) -24 H^3 \ddot{H} (n-2)\nonumber \\{} & {} -4 H^2 \left( \dddot{H} (n-2)+2 \dot{H}^2 \left( -2 n^2+4 n+9\right) \right) \nonumber \\{} & {} -96 H^6 +4 H \ddot{H} \dot{H} \left( 2 n^2-3 n-2\right) -2 \dddot{H} \dot{H} n+4 \dddot{H} \dot{H}\nonumber \\{} & {} +\ddot{H}^2 \left( n^2-4\right) -8 \dot{H}^3 n+4 \dot{H}^3\Big ] \end{aligned}$$
(55)

While the equation of state parameter will be

$$\begin{aligned} \omega _{eff}= & {} \frac{1}{\left( 8 H^4+4 H^2 \dot{H} n+H \ddot{H} (n-2)+2 \dot{H}^2\right)} \Big[-2 \left( 2 H^2+\dot{H}\right) ^2 \nonumber \\{} & {} -\frac{1}{3}(n-2) \left( 8 H^2 \dot{H}+6 H \ddot{H}+\dddot{H}+4 \dot{H}^2\right) + \frac{(n-2) (n+2) (4 H \dot{H}+\ddot{H})^2}{6 \left( 2 H^2+\dot{H}\right)} \Big] \end{aligned}$$
(56)

For the continuity equation \(\nabla ^\mu T^{eff}_{\mu \nu }=0\), we have

$$\begin{aligned} \begin{aligned} \dot{\rho _{eff}}&= \left( \frac{-3\left( 2^{\frac{n}{2}-1}\right) n\;H\; \beta ^{n/2}}{\left( 2 H^2+\dot{H}\right) ^2 \left( 2^{\frac{n}{2}+1} \beta ^{n/2}-3^{\frac{n+1}{2}} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) }\right) \Bigg [16 H^4 \dot{H}-12 H^3 \ddot{H} \\&\quad -4 H^2 \left( \dddot{H}-2 \dot{H}^2 (2 n+3)\right) +2 H \ddot{H} \dot{H} (4 n+5)-2 \dot{H} \left( \dddot{H}+4 \dot{H}^2\right) +\ddot{H}^2 (n+2)\Bigg ] \end{aligned} \end{aligned}$$
(57)

and

$$\begin{aligned} \begin{aligned} \rho _{eff} \;+\;P_{eff}&= \left( \frac{\left( 2^{\frac{n}{2}-1}\right) n\; \beta ^{n/2}}{\left( 2 H^2+\dot{H}\right) ^2 \left( 2^{\frac{n}{2}+1} \beta ^{n/2}-3^{\frac{n+1}{2}} n \left( 2 H^2+\dot{H}\right) ^{n/2}\right) } \right) \\&\quad \Bigg [ 16 H^4 \dot{H}-12 H^3 \ddot{H} \\&\quad -4 H^2 \left( \dddot{H}-2 \dot{H}^2 (2 n+3)\right) +2 H \ddot{H} \dot{H} (4 n+5)\\&\quad s-2 \dot{H} \left( \dddot{H}+4 \dot{H}^2\right) +\ddot{H}^2 (n+2)\Bigg ] \end{aligned} \end{aligned}$$
(58)

Which verifies the continuity equation, which can be written in the form

$$\begin{aligned} \dot{\rho _{eff}} \;+\; 3\; H\; \left( \rho _{eff} \;+\;P_{eff}\;\right) \;=\;0 \end{aligned}$$
(59)

4.2 Early Universe

For the early universe, we assume that \(\tilde{\rho } \rightarrow \infty\), so that

$$\begin{aligned} \sqrt{\frac{\tilde{\rho }^n+1}{\tilde{\rho }^n}} \approx 1 \end{aligned}$$
(60)

In this case, eq. (27) reads

$$\begin{aligned} \varphi (\tilde{\rho }) \;\approx \; \pm \; \frac{2}{n \sqrt{3}} \left( \textrm{arcsinh}{\left( \sqrt{\tilde{\rho }^n}\right) }-1\right) \;+\; C \end{aligned}$$
(61)

This can be inverted to give

$$\begin{aligned} \tilde{\rho } \;\approx \; \textrm{sinh}^\frac{2}{n} \left( 1 \;\pm \; \frac{n\sqrt{3}}{2} \varphi \right) \end{aligned}$$
(62)

While from (39) \(R \approx \tilde{\beta }\;\tilde{\rho } \;=\; \rho\), so that relation (61) gives

$$\begin{aligned} \varphi (R) \;\approx \; \pm \; \frac{2}{n \sqrt{3}} \left( \textrm{arcsinh} \sqrt{\left( \frac{R}{\tilde{\beta }}\right) ^n}-1\right) \;+\; C \end{aligned}$$
(63)

Treating (29) for large \(\tilde{\rho }\), we get

$$\begin{aligned} V(\tilde{\rho }) \approx \frac{1}{2} \tilde{\beta }\;\tilde{\rho } \end{aligned}$$
(64)

Using (62) we get

$$\begin{aligned} V(\varphi ) \;=\; \frac{1}{2} \tilde{\beta }\; \textrm{sinh}^\frac{2}{n} \left( 1 \;\pm \; \frac{n\sqrt{3}}{2} \varphi \right) \end{aligned}$$
(65)

Now using (63) in (15) and integrate, we get

$$\begin{aligned} \begin{aligned} f(R)&= R \pm \frac{2}{n \sqrt{3}}\left( \textrm{arcsinh}\sqrt{\left( \frac{R}{\tilde{\beta }}\right) ^n} - 1 \right) R\\&\quad - \frac{n}{(n+2)} \; \sqrt{\left( \frac{R}{\gamma \tilde{\beta }}\right) ^{n}} \; {_2}F_1\left( \frac{1}{2},\frac{1}{2}+\frac{1}{n};\frac{3}{2}+\frac{1}{n};-\left( \frac{R}{\gamma \tilde{\beta }}\right) ^n \right) R \;+\; C_1 \end{aligned} \end{aligned}$$
(66)

The Gaussian hypergeometric function \(_2F_1(a,b;c;z)\) decays to zero for large negative values of z. Since we deal with a function describing the early times, we can ignore this part and consider

$$\begin{aligned} f(R) = R \pm \frac{2}{n \sqrt{3}}\left( \textrm{arcsinh}\sqrt{\left( \frac{R}{\tilde{\beta }}\right) ^n} - 1\right) \;R\;+\;C_1 \end{aligned}$$
(67)

Again the viability of f(R) requires disregarding the \(-ve\) sign function. Accordingly, the viable f(R) is given by

$$\begin{aligned} f(R) = R + \frac{2}{n \sqrt{3}}\left( \textrm{arcsinh}\sqrt{\left( \frac{R}{\tilde{\beta }}\right) ^n} - 1\right) \;R\;+\;C_1 \end{aligned}$$
(68)

A quick test for the function in (68) reveals that the \(\mathrm arcsinh\)-term tends to be a logarithmic function as R increases, which is a slowly varying function, so that \(f(R) \sim C\; R\) for large R. This may permit the function to describe the inflationary era.

Friedmann equations for this function are given by

$$\begin{aligned} H^2= \frac{3n \sqrt{\tilde{R}^n} \left( 2 \left( 2 H^2+\dot{H}\right) ^2 \left( \tilde{R}^n+1\right) - H (4 H \dot{H}+\ddot{H}) \left( 2 \left( \tilde{R}^n+1\right) +n\right) \right) }{R (\tilde{R}^n+1)^{3/2} \left( \frac{n \sqrt{\tilde{R}^n}}{ \sqrt{\tilde{R}^n+1}} +2 \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) + n \sqrt{3} -2 \right) } \end{aligned}$$
(69)

and

$$\begin{aligned} \begin{aligned} \frac{\ddot{a}}{a}&= \left( \frac{n \tilde{R}^n}{6 R^2 \sqrt{\tilde{R}^n} \left( \tilde{R}^n+1\right) ^2 \left( n \sqrt{\tilde{R}^n} +\sqrt{3} n \sqrt{\tilde{R}^n+1} -2 \sqrt{\tilde{R}^n+1} +2 \sqrt{\tilde{R}^n+1} \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) \right) }\right) \\&\times \Bigg [36 H^2 \dot{H} \left[ 12 \dot{H} \left( n^2 (2 \tilde{R}^n-1)+4 (\tilde{R}^n+1)^2\right) -R \left( \tilde{R}^n+1\right) \left( 2 \tilde{R}^n+n+2\right) \right] \\&+9 H \ddot{H} \left[ 24 \dot{H} \left( n^2 \left( 2 \tilde{R}^n-1\right) +4 \left( \tilde{R}^n+1\right) ^2\right) -5 R \left( \tilde{R}^n+1\right) \left( 2 \tilde{R}^n+n+2\right) \right] \\&+R \left( \tilde{R}^n+1\right) \left[ -9 \dddot{H} \left( 2 \tilde{R}^n+n+2\right) -36 \dot{H}^2 \left( 2 \tilde{R}^n+n+2\right) +R^2 \left( \tilde{R}^n+1\right) \right] \\&+27 \ddot{H}^2 \left[ n^2 \left( 2 \tilde{R}^n-1\right) +4 \left( \tilde{R}^n+1\right) ^2\right] \Bigg ] \end{aligned} \end{aligned}$$
(70)

Where \(\tilde{R} = R/\beta\). The effective energy density and pressure are then given by

$$\begin{aligned} \rho _{eff}\;=\; \frac{9 n \sqrt{\tilde{R}^n} \left( 2 \left( 2 H^2+\dot{H}\right) ^2 \left( \tilde{R}^n+1\right) - H (4 H \dot{H}+\ddot{H}) \left( 2 \left( \tilde{R}^n+1\right) +n\right) \right) }{R (\tilde{R}^n+1)^{3/2} \left( \frac{n \sqrt{\tilde{R}^n}}{ \sqrt{\tilde{R}^n+1}} +2 \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) + n \sqrt{3} -2 \right) } \end{aligned}$$
(71)

and

$$\begin{aligned} \begin{aligned} P_{eff}\;=&-\left( \frac{n\;\sqrt{\tilde{R}^n}}{4\;R^2 (\tilde{R}^n+1)^2 \left( n \sqrt{3} \sqrt{\tilde{R}^n+1} -2 \sqrt{\tilde{R}^n+1}+2 \sqrt{\tilde{R}^n+1} \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) +n \;\sqrt{\tilde{R}^n}\right) }\right) \\&\times \Bigg [36 (4 H \dot{H}+\ddot{H})^2 \left( 4 (\tilde{R}^n+1)^2+2\; n^2 \tilde{R}^n \right) +2 (\tilde{R}^n+1)^2 R^3 \\&\;-12\; R (\tilde{R}^n+1) \left[ \left( 4 H \ddot{H}+\dddot{H}+4 \dot{H}^2\right) +2 H (4 H \dot{H}+\ddot{H})\right] \left( 2\tilde{R}^n+n+2\right) \Bigg ] \end{aligned} \end{aligned}$$
(72)

The equation of state parameter will be

$$\begin{aligned} \begin{aligned} \omega _{eff}\;=&-\left( \frac{1}{R \left( \tilde{R}^n+1\right) \left( R^2 (\tilde{R}^n+1) -18 H \left( 2 (\tilde{R}^n+1)+n\right) \left( 4 H \dot{H}+\ddot{H}\right) \right) }\right) \\&\times \Bigg [ 18\left( 4 H \dot{H}+\ddot{H}\right) ^2 \left( 4 \left( \tilde{R}^n+1\right) ^2+n^2 \left( 2\; \tilde{R}^n-1\right) \right) \\&+ R^3 (\tilde{R}^n+1)^2 -\;3\;R \left( \tilde{R}^n+1\right) \left( 2 (\tilde{R}^n+1)+n\right) \left( 8 H^2 \dot{H}+6 H \ddot{H}+\dddot{H}+4 \dot{H}^2\right) \Bigg ] \end{aligned} \end{aligned}$$
(73)

For verification of the continuity equation, we have

$$\begin{aligned} \begin{aligned} \dot{\rho }=&\,\left( \frac{27\; n\; H \sqrt{\tilde{R}^n}}{\tilde{R}^2\; (\tilde{R}^n+1)^2 \left( n \sqrt{ \tilde{R}^n}+ n \sqrt{3} \sqrt{\tilde{R}^n+1} -2 \sqrt{\tilde{R}^n+1}+2 \sqrt{\tilde{R}^n+1} \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) \right) }\right) \\&\times \Bigg [16 (\tilde{R}^n+1) H^4 \dot{H} \left( 2 (\tilde{R}^n+1)+n\right) -12 (\tilde{R}^n+1) H^3 \ddot{H} \left( 2 (\tilde{R}^n+1)+n\right) \\&-4 H^2 \Bigg ((\tilde{R}^n+1) \dddot{H} (2 (\tilde{R}^n+1)+n)- 2 \dot{H}^2 \left( -(\tilde{R}^n+1) n+6 (\tilde{R}^n+1)^2+2\;n^2 (2 \tilde{R}^n-1)\right) \Bigg ) \\&+\ddot{H}^2 \left( 4 (\tilde{R}^n+1)^2+n^2 (2\tilde{R}^n-1)\right) +2 H \ddot{H} \dot{H} \left( -3 (\tilde{R}^n+1) n+10 (\tilde{R}^n+1)^2+4\;n^2 (2 \tilde{R}^n-1)\right) \\&-2 (\tilde{R}^n+1) \dot{H} (2 (\tilde{R}^n+1)+n) (\dddot{H}+4 \dot{H}^2)\Bigg ] \end{aligned} \end{aligned}$$
(74)

and

$$\begin{aligned} \begin{aligned} \rho _{eff}+P_{eff}\;=&-\left( \frac{9\; n\; \sqrt{\tilde{R}^n}}{\tilde{R}^2\; (\tilde{R}^n+1)^2 \left( n \sqrt{ \tilde{R}^n}+ n \sqrt{3} \sqrt{\tilde{R}^n+1} -2 \sqrt{\tilde{R}^n+1}+2 \sqrt{\tilde{R}^n+1} \sinh ^{-1}\left( \sqrt{\tilde{R}^n}\right) \right) }\right) \\&\times \Bigg [16 (\tilde{R}^n+1) H^4 \dot{H} \left( 2 (\tilde{R}^n+1)+n\right) -12 (\tilde{R}^n+1) H^3 \ddot{H} \left( 2 (\tilde{R}^n+1)+n\right) \\&-4 H^2 \Bigg ((\tilde{R}^n+1) \dddot{H} (2 (\tilde{R}^n+1)+n)- 2 \dot{H}^2 \left( -(\tilde{R}^n+1) n+6 (\tilde{R}^n+1)^2+2\;n^2 (2 \tilde{R}^n-1)\right) \Bigg ) \\&+\ddot{H}^2 \left( 4 (\tilde{R}^n+1)^2+n^2 (2\tilde{R}^n-1)\right) +2 H \ddot{H} \dot{H} \left( -3 (\tilde{R}^n+1) n+10 (\tilde{R}^n+1)^2+4\;n^2 (2 \tilde{R}^n-1)\right) \\&-2 (\tilde{R}^n+1) \dot{H} (2 (\tilde{R}^n+1)+n) (\dddot{H}+4 \dot{H}^2)\Bigg ] \end{aligned} \end{aligned}$$
(75)

Which verifies the continuity equation.

5 Inflationary Behavior

5.1 Inflation Observables

Fig. 1
figure 1

Potential function at different values of n

let’s now study the ability of our constructed f(R) function, to describe the inflationary era. our potential function as derived in (65) is

$$\begin{aligned} V(\varphi ) \;=\; \frac{1}{2} \tilde{\beta }\; \textrm{sinh}^\frac{2}{n} \left( 1 \;\pm \; \frac{n\sqrt{3}}{2} \varphi \right) \end{aligned}$$

This potential function is displayed in Fig. 1. Now we will test this potential for slaw roll inflation. The slow roll parameters due to a given potential are given by

$$\begin{aligned} \begin{aligned} \epsilon_{V}&= \frac{M_P^2}{2} \left( \frac{V_{,\varphi }}{V}\right) ^2\\ \eta_{V}&= M_P^2 \left[ \frac{V_{,\varphi \varphi }}{V} - \frac{1}{2} \left( \frac{V_{,\varphi }}{V}\right) ^2 \right] \end{aligned} \end{aligned}$$
(76)

Using our potential in eq. (65), we get

$$\begin{aligned} \epsilon _V = \frac{3}{2 \left[ (1-\frac{n \sqrt{3}}{2} \varphi )^2+1\right] \left[ \sinh ^{-1}(1-\frac{n \sqrt{3}}{2} \varphi )\right] ^2}\;M_P^2 \end{aligned}$$
(77)

and

$$\begin{aligned} \eta _V = \frac{3}{2\left[ \sinh ^{-1}(1-\frac{n \sqrt{3}}{2} \varphi )\right] ^2} \left( \frac{ \left( 2-n\right) }{(1-\frac{n \sqrt{3}}{2} \varphi )^2+1}-\frac{n (1-\frac{n \sqrt{3}}{2} \varphi ) \sinh ^{-1}(1-\frac{n \sqrt{3}}{2} \varphi )}{\left[ (1-\frac{n \sqrt{3}}{2} \varphi )^2+1\right] ^{3/2}}\right)M_P^2 \end{aligned}$$
(78)

At the end of inflation, we have \(\epsilon _V(\varphi _e) \simeq 1\). Using this in eq. (77) and solve numerically for \(\varphi\), we get

$$\begin{aligned} \varphi _e = \frac{0.026834}{n\sqrt{3}} \; M_P \end{aligned}$$
(79)

On the other hand, the duration of the inflation is measured by the number of e-folds, N, given by

$$\begin{aligned} N = \frac{1}{M_P^2} \int _{\varphi _e}^{\varphi _N}{\frac{V(\varphi )}{V_{,\varphi }(\varphi )}} d \varphi \end{aligned}$$
(80)

Using eq. (65), we get

$$\begin{aligned} \begin{aligned} N&= \frac{1}{M_P^2} \left[ \frac{1}{3 n \sqrt{2}} \left\{ \left( \frac{n \sqrt{3} \varphi }{2}-1\right) ^2 - \left( \sinh ^{-1}\left( 1-\frac{n \sqrt{3}}{2} \varphi \right) \right) ^2 \right. \right. \\&\quad \left. \left. + \; 2 \left( \frac{n \sqrt{3} \varphi }{2}-1\right) \sqrt{2 + \frac{n \sqrt{3} \varphi }{2} \left( \frac{n \sqrt{3} \varphi }{2}-2\right) } \; \sinh ^{-1}\left( 1-\frac{n \sqrt{3}}{2} \varphi \right) \right\} \right] _{\varphi _e}^{\varphi _N} \end{aligned} \end{aligned}$$
(81)

This gives the field \(\varphi _N\) for a given number of e-folds, N, before the end of inflation. The tensor-to-scalar ratio r and the scalar spectral index \(n_s\) can now be calculated for a given N from the relations

$$\begin{aligned} \begin{aligned} r&= 16 \; \epsilon_{V}(\varphi_{N}) \\ n_s&= 1 \; -\; 4\; \epsilon_{V}(\varphi_{N}) + 2\; \eta_{V}(\varphi_{N}) \end{aligned} \end{aligned}$$
(82)

5.2 Observational Constraints

Let’s test the viability of the potential (65), and in consequence the ability of our constructed function to describe inflation. In particular, recent data from Planck 2018 [54] puts an upper bound on the tensor-to-scalar ratio, \(r_{0.002} < 0.1\) up to \(95\%\) CL. This is further tightened by combining with the BICEP2/Keck Array BK15 data to be \(r_{0.002} < 0.056\). The spectral index of the scalar perturbation is determined by the Planck temperature data in combination with the EE measurements at low multipoles to be \(n_s = 0.9626 \pm 0.0057\) at \(68 \%\) CL.

Fig. 2
figure 2

\(n_s - r\) contours for Planck 2018 data [54]. The red patch is the result of our potential due to the constructed f(R) function for \(1.8 \le n \le 6\)

In Fig. 2 we present Planck 2018 contours for the \((n_s, r)\) plane. On top of that, we display the area for these two parameters based on the potential (65) for the model parameter \(1.8 \le n \le 6\). We can see that our results are consistent with those of Planck 2018 TT+TE+EE+lowE data. Particularly, the tensor-to-scalar ratio always satisfies the criteria of Planck even for the tightened result \(r < 0.056\). The scalar spectral index, on the other hand, depends on the model parameter n and is consistent with the Planck data for \(n > 2\).

6 Conclusions

In this work, we exploit the connection between the scalar-tensor theory and the f(R) gravity to reconstruct the new cosmological UDF model, proposed in our previous work, in the framework of f(R) gravity. We derived the field equation of the model, whence constructed its f(R) function and discussed its viability. We also studied the f(R) functions and the scalar field potentials in the asymptotically de Sitter spacetime for the early and late times universe.

We then tested the ability of our constructed f(R) function to describe the early time inflation. The scalar field potential for the early time is used to derive the slow roll inflation parameters. Tensor-to-scalar ratio r and the scalar spectral index \(n_s\) were calculated for different values of the model parameter n and compared to recent observations from Planck 2018 data. We found that our results for the model parameter \(n > 2\) agree with Planck-2018 TT+TE+EE+lowE data.