Abstract
In this work, we reconstruct the cosmological unified dark fluid model proposed previously by Elkhateeb (Astrophys Space Sci 363(1):7, 2018) in the framework of _f_(_R_) gravity. Utilizing the equivalence between the scalar-tensor theory and the _f_(_R_) gravity theory, the scalar field for the dark fluid is obtained, whence the _f_(_R_) function is extracted and its viability is discussed. The _f_(_R_) functions and the scalar field potentials have then been extracted in the early and late times of asymptotically de Sitter spacetime. The ability of our function to describe early time inflation is also tested. The early time scalar field potential is used to derive the slow roll inflation parameters. Our results of the tensor-to-scalar ratio _r_ and the scalar spectral index \(n_s\) are in good agreement with results from Planck-2018 TT+TE+EE+lowE data for the model parameter \(n > 2\).