1 Introduction

Since the accelerated expansion of the universe is discovered by Type Ia supernovae (SNe Ia) [1, 2] and ensured by two independent probes baryon acoustic oscillations (BAO) [3, 4] and cosmic microwave background (CMB) radiation [5,6,7], the elegant standard six-parameter cosmological model, \(\Lambda \)-cold dark matter (\(\Lambda \)CDM) has achieved great success in explaining the physical phenomena at both small and large scales. Up to now, the nature of both dark energy (DE) and dark matter (DM) is still mysterious and unclear, and we just know phenomenologically the following several basic properties of them: (i) DE is a cosmic fluid with an effective equation of state (EoS) \(\omega \approx -1\), which violates the strong energy condition; (ii) DE obeys a too much smaller clustering property than DM and is homogeneously permeated in the universe at cosmological scale; (iii) effects of DM clustering have been measured to 2–3% precision by several large weak lensing experiments including the Kilo-Degree Survey (KiDS) [8], the Dark Energy Survey (DES) [9] and the Subaru Hyper-Suprime Camera (HSC) [10]. Recently, the Planck-2018 CMB final release [5] with improved measurement of the reionized optical depth has confirmed, once again, the validity of the simple \(\Lambda \)CDM cosmology in describing the evolution of the universe. However, this model is not as perfect as we imagine and faces at least two intractable problems, namely the cosmological constant and coincidence problems. The former indicates that the observed value for vacuum energy density is far smaller than its theoretical estimation, i.e., the so-called 120-orders-of-magnitude inconsistence that makes the physical explanation of vacuum very confusing, while the latter is why energy densities of DE and DM are of the same order of magnitude today, since their energy densities are so different from each other during the evolution of the universe. Meanwhile, the \(\Lambda \)CDM model also faces at least two important tensions emerged from recent cosmological observations, namely the Hubble constant (\(H_0\)) and matter fluctuation amplitude (\(\sigma _8\)) tensions, where the former is more severe than the latter. The \(H_0\) tension is that the direct measurement of today’s cosmic expansion rate from the Hubble Space Telescope (HST) is over 4\(\sigma \) level higher than the indirectly derived value from the Planck-2018 CMB measurement, while the \(\sigma _8\) one indicates that today’s matter fluctuation amplitude in linear regime measured by several low redshift probes including weak gravitational lensing [11], cluster counts [12] and redshift space distortions [13] is still lower than that indirectly measured by the Planck-2018 CMB data [5]. It is nature that one may query the correctness of \(\Lambda \)CDM in characterizing the background evolution and structure formation of the universe. As a consequence, a wide variety of cosmological models based on some physical mechanism have been proposed to explain the late-time cosmic acceleration. Most recently, due to severer \(H_0\) tension and richer data from large scale galaxy survey than before [14], cosmologists have a stronger motivation and more interests to resolve or even solve these tensions by confronting existing cosmological models or constructing new ones with current observations. It is worth noting that possible systematic errors or independent determinations on \(H_0\) and \(\sigma _8\) from new probes can also alleviate these tensions. To resolve \(H_0\) and \(\sigma _8\) tensions, in previous works, many authors always combine CMB data with BAO, SNe Ia, local \(H_0\) observation to give tight constraints on a specific model. We argue that, more or less, this kind of constraint can only give an indirect answer for cosmological tensions, and that the most direct method is to check the model dependence of Planck-2018 CMB data.

In this study, our motivation is to explore whether one of the simplest extensions of general relativity (GR), f(R) gravity [15, 16], can relieve current \(H_0\) and \(\sigma _8\) tensions. In f(R) gravity, the modified Friedmann equations can be obtained by varying a generalized Lagrangian which is a function of the Ricci scalar R. Although many authors have constrained specific f(R) models with joint cosmological observations in recent years, there is still a lack of a direct test of the ability to alleviate \(H_0\) and \(\sigma _8\) tensions for f(R) gravity in light of Planck CMB data. Especially, due to three reasons: (i) the data of Planck-2018 full mission is released; (ii) \(H_0\) tension becomes more serious than before; (iii) richer data from large scale galaxy survey to study DM clustering is gradually obtained, this is an urgent issue needed to be addressed. By implementing numerical analysis, we find that the Hu-Sawicki f(R) gravity cannot reduce \(H_0\) and \(\sigma _8\) tensions.

This work is organized as follows. In the next section, we introduce the basic equations of f(R) gravity and a specific f(R) model to be investigated in this analysis. In Sect. 3, we display the data and analysis method. In Sect. 4, the numerical results are presented. The discussions and conclusions are exhibited in the final section.

2 f(R) gravity

To construct a modified theory of gravity, one can introduce some terms such as \(R^2\), \(R^{\mu \nu }R_{\mu \nu }\), \(R^{\mu \nu \alpha \beta }R_{\mu \nu \alpha \beta }\), or \(R\square ^nR\), when quantum corrections are taken into account. In f(R) gravity, different from the above high-order derivative gravity, the modification is just a function of Ricci scalar R. f(R) gravity was firstly introduced by Buchdahl [15] in 1970 and the readers can find more details in recent reviews [16, 17]. The action is written as

$$\begin{aligned} S=\int d^4x\sqrt{-g}\left[ R+f(R)+{\mathcal {L}}_m\right] , \end{aligned}$$
(1)

where f(R), \({\mathcal {L}}_m\) and g denote a function of R, the standard matter Lagrangian and the trace of the metric, respectively. By varying Eq. (1), one can obtain the modified Einstein field equation

$$\begin{aligned} G_{\mu \nu }+f_RR_{\mu \nu }+\left( \Box f_R-\frac{f}{2}\right) g_{\mu \nu }-\nabla _\mu \nabla _\nu f_R=8\pi GT_{\mu \nu }, \end{aligned}$$
(2)

where \(f_R\equiv df/dR\) denotes an extra scalar degree of freedom, i.e., the so-called scalaron and \(T_{\mu \nu }\) is energy–momentum tensor. In a spatially flat Friedmann–Robertson–Walker (FRW) universe, the equation of background evolution in f(R) gravity is expressed as

$$\begin{aligned} H^2+\frac{f}{6}-\left( H^2+H\frac{dH}{dN}\right) f_R+H^2\frac{dR}{dN}f_{RR}=\frac{8\pi G}{3} \rho _m, \end{aligned}$$
(3)

where \(f_{RR}\equiv df_R/dR\), \(N\equiv \mathrm {ln}\,a\), H is Hubble parameter, a is scale factor and \(\rho _m\) is matter energy density.

We are also of interests to study the perturbations in f(R) gravity and just consider the linear part here. For sub-horizon modes (\(k\gtrsim aH\)) in the quasi-static approximation, the linear growth of matter density perturbations is shown as [18]

$$\begin{aligned} \frac{\mathrm {d}^2\delta }{\mathrm {d}a^2}+ \left( \frac{1}{H}\frac{\mathrm {d}H}{\mathrm {d}a}+ \frac{3}{a}\right) \frac{\mathrm {d}\delta }{\mathrm {d}a}- \frac{3\Omega _{m}H_0^2a^{-3}}{(1+f_R)H^2}\left( \frac{1-2X}{2-3X}\right) \frac{\delta }{a^2}= 0,\nonumber \\ \end{aligned}$$
(4)

where \(\Omega _{m}\) denotes the effective matter density ratio at present. The function X has the following form

$$\begin{aligned} X(k,a) = -\frac{2f_{RR}}{1+f_R}\left( \frac{k}{a}\right) ^2. \end{aligned}$$
(5)

It is noteworthy that the function X in Eq. (4) induces a scale dependence of linear growth factor \(\delta (k,a)\) in f(R) gravity, when the growth factor is just a function of scale factor a in GR.

In general, a viable f(R) model should be responsible for the inflationary behavior in the very early universe, reproduce the late-time cosmic acceleration, pass the local gravity test, and satisfy the stability conditions. To efficiently investigate cosmological tensions in f(R) gravity, we consider the viable Hu-Sawicki f(R) model (hereafter HS model) [19] in this work and it is given by

$$\begin{aligned} f(R)=-\frac{2\Lambda R^n}{R^n+\mu ^{2n}}, \end{aligned}$$
(6)

where \(\mu \) and n are free parameters characterizing this model. By adopting \(R\gg \mu ^2\), the approximate f(R) function shall be written as

$$\begin{aligned} f(R)=-2\Lambda -\frac{f_{R0}}{n}\frac{R_0^{n+1}}{R^n}, \end{aligned}$$
(7)

where \(R_0\) is the present-day value of Ricci scalar and \(f_{R0}=f_R(R_0)=-2\Lambda \mu ^2/R_0^2\). For the purpose of constraining this model with data, one should first obtain the evolution of background and perturbation by inserting Eq. (7) into Eqs. (3) and (4).

To the best of our knowledge, there are three main methods to confront f(R) gravity with cosmological observations. The first is numerically solving the above equations in a direct way [20,21,22,23,24,25,26,27,28,29]. The second is adopting an approximate framework to obtain the analytic solutions of the above equations and this method, to a large extent, can save computational cost [30,31,32,33,34]. The third one is studying the effects of viable f(R) gravity on the large scale structure formation by using N-body and hydrodynamical simulations [35]. Note that the last method always spend more computational cost and storage space than two previous ones.

Fig. 1
figure 1

The constrained 2-dimensional parameter spaces (\(H_0\), \(\Omega _{m0}\)) and (\(\log _{10}f_{R0}\), \(H_0\)) from the “C” dataset are shown for HS f(R) models with \(n=1\) (red), 2 (green), 3 (grey), 4 (orange) and free n (blue), respectively. The grey dashed line and magenta bands denote \(H_0=74.03\pm 1.42\) km s\(^{-1}\) Mpc\(^{-1}\) measured by the HST [14]

3 Data and method

Since our aim is to study whether HS f(R) gravity can alleviate the \(H_0\) and \(\sigma _8\) tensions, first of all, we use the following two main datasets.

CMB Although the mission of the Planck satellite is completed, its meaning for cosmology and astrophysics is extremely important. It has measured many aspects of formation and evolution of the universe such as matter components, topology and large scale structure effects. Here we shall use updated Planck-2018 CMB temperature and polarization data including likelihoods of temperature at \(30\leqslant \ell \leqslant 2500\) and the low-\(\ell \) temperature and polarization likelihoods at \(2\leqslant \ell \leqslant 29\), namely TTTEEE\(+\)lowE, and Planck-2018 CMB lensing data [5]. We denote this dataset as “C”.

RSD To study the alleviation of \(\sigma _8\) tension in f(R) gravity, we adopt the redshift space distortions (RSD) as our reference probe which is sensitive to large scale structure formation. Specifically, we use the so-called “Gold-2018” growth-rate dataset [36]. This dataset is denoted as “R”.

Furthermore, to break the parameter degeneracy and give tight constraints on free parameters of HS model, we also employ the following four probes.

BAO By measuring the position of these oscillations in the matter power spectrum at different redshifts, the BAO, a standard cosmological ruler, can place constraints on the expansion history of the universe after decoupling and break the parameter degeneracy better. It is unaffected by errors in the nonlinear evolution of the matter density field and other systematic uncertainties. Specifically, we take the 6dFGS sample at the effective redshifts \(z_{eff}= 0.106\) [37], the SDSS-MGS one at \(z_{eff}= 0.15\) [38] and the BOSS DR12 dataset at three effective redshifts \(z_{eff}= 0.38,\) 0.51 and 0.61 [39]. Specifically, to constrain the HS f(R) gravity, we use the background quantity \(D_A/r_d\) as a function of scale factor a in the numerical analysis, where \(D_A\) and \(r_d\) are angular diameter distance and comoving BAO scale, respectively. To calculate the comoving sound horizon \(r_d\), we use the fitting formula given by Ref. [40]. This dataset is identified as “B”.

SNe Ia SNe Ia, the so-called standard candle, is a powerful distance indicator to study the background evolution of the universe, particularly, the Hubble parameter and EoS of DE. In this analysis, we use the largest SNe Ia “Pantheon” sample today, which integrates the SNe Ia data from the Pan-STARRS1, SNLS, SDSS, low-z and HST surveys and encompasses 1048 spectroscopically confirmed points in the redshift range \(z \in [0.01, 2.3]\) [41]. In our numerical analysis, we use the full Pantheon sample and marginalize over the absolute magnitude parameter M. We refer to this dataset as “S”.

Cosmic Chronometers As a complementary probe to investigate the late-time evolution of the universe, we also include the cosmic chronometers in our numerical analysis. Specifically, we employ 30 chronometers to constrain the HS model [42]. Hereafter we denote this dataset as “H”.

Fig. 2
figure 2

The constrained 2-dimensional parameter spaces (\(\Omega _m\), \(\sigma _8\)) from the “C” (red) and “R” (blue) datasets are shown for \(\Lambda \)CDM, HS f(R) models with \(n=1\) and free n, respectively

It is worth noting that we take the first method (see Sect. 2), namely numerically solving the background and perturbation equations, to implement constraints on HS f(R) model. In order to obtain the posterior probability density distributions of model parameters, we incorporate the modified equations governing the evolution of background and perturbation of HS f(R) model into the public online packages CAMB and CosmoMC [43, 44]. Specifically, we roughly calculate the Hubble expansion rate H(a) and the linear growth factor \(\delta (k,a)\) at each step of a, and use a interpolating scheme to obtain the solutions H(a) and \(\delta (k,a)\) with varying a. As a consequence, we can numerically obtain the corresponding cosmological observables to be confronted with data. The latter package can be used for implementing a standard Bayesian analysis via the Markov Chain Monte Carlo (MCMC) method to infer the posterior probability density distributions of parameters. We use the Gelman–Rubin statistic \(R-1=0.1\) as the convergence criterion of MCMC analysis. Meanwhile, to analyze the MCMC chains, we take the public package GetDist [45]. For HS f(R) model, we choose the following prior ranges for different parameters: \(\Omega _bh^2 \in [0.005, 0.1]\), \(\Omega _ch^2 \in [0.001, 0.99]\), \(100\theta _{MC} \in [0.5, 10]\), \(\mathrm {ln}(10^{10}A_s) \in [2, 4]\), \(n_s \in [0.8, 1.2]\) \(\tau \in [0.01, 0.8]\), \(\log _{10} f_{R,0} \in [-9, 1]\) and \(n \in [0, 20]\).

To investigate comprehensively both \(H_0\) and \(\sigma _8\) tensions in HS model, we carry out the following numerical analysis. For \(H_0\) tension, respectively, we constrain five models, i.e., \(n=1, 2, 3, 4\) and free n with the “C” dataset when keeping the typical parameter \(\log _{10} f_{R,0}\) free. For \(\sigma _8\) tension, we just present the constraining results of the representative case \(n=1\) and the general one free n from “C” and “R” datasets, respectively. We also display the comprehensive constraints on two models (\(n=1\) and free n) by using the data combination “CBSHR”. The corresponding \(\chi ^2\) expressions for all the datasets can be found in Ref. [5].

4 Numerical results

For the purpose of studying the alleviation of two important cosmological tensions in the framework of HS f(R) models, our main numerical results are displayed in Figs. 1 and 2 and marginalized constraining results are presented in Tables 1 and 2. We find that the \(H_0\) values (see Table 1) derived from Planck-18 data in five HS models are now \(4.14\sigma \), \(4.23\sigma \), \(4.12\sigma \), \(4.21\sigma \) and \(4.16\sigma \) lower than that directly measured by the HST, and that these new \(H_0\) values relieve hardly the existing \(4.39\sigma \) tension under the assumption of \(\Lambda \)CDM. This implies that HS gravity behaves very similar to \(\Lambda \)CDM at the background level. To some extent, one can predict its \(H_0\) behavior via Eq. (7). In Fig. 1, we have exhibited the constrained 2-dimensional parameter spaces (\(\Omega _m\), \(\sigma _8\)) for five HS models, it is easy to see the large \(H_0\) gap between CMB and HST observations. Only using the CMB data, we conclude that \(H_0\) is insensitive to typical model parameter \(\log _{10}f_{R0}\) in all five models (see the right panel of Fig. 1). To investigate the \(\sigma _8\) tension, in Fig. 2, first of all, we display the constrained \(\Omega _m\)-\(\sigma _8\) plane for \(\Lambda \)CDM as a reference. Then, we present constrained \(\Omega _m\)-\(\sigma _8\) planes for the commonly used HS model with \(n=1\) and for the complete HS model with free n, respectively. We find that the relatively small \(\sigma _8\) discrepancy in both considered HS scenarios with a little larger parameter spaces (\(\Omega _m\), \(\sigma _8\)) cannot be resolved and is still over \(1\sigma \) level. This implies that the HS f(R) gravity cannot reduce current \(H_0\) and \(\sigma _8\) tensions, which is the key result of this work.

Fig. 3
figure 3

The constrained 2-dimensional parameter spaces (\(\log _{10}f_{R0}\), \(\sigma _8\)) from the “C” dataset are shown for HS f(R) models with \(n=1\) (red), 2 (green), 3 (grey), 4 (orange) and free n (blue), respectively

Fig. 4
figure 4

The constrained 2-dimensional parameter spaces (\(\log _{10}f_{R0}\), \(\sigma _8\)) from the data combination “CBSHR” are shown for HS f(R) models with \(n=1\) (red) and free n (blue), respectively. The magenta dashed line denotes \(\log _{10}f_{R0}=-6\)

Fig. 5
figure 5

The constrained 2-dimensional parameter spaces (n, \(\sigma _8\)) are shown for HS f(R) model with free n by using the “C” (red) and “CBSHR” (blue) datasets, respectively

It is also interesting to study the parameter degeneracy between \(\log _{10}f_{R0}\) and \(\sigma _8\). When only using CMB data, for five HS models, one may find that \(\log _{10}f_{R0}\) is positively correlated with \(\sigma _8\), which indicates that stronger deviations in HS f(R) gravity from GR lead to larger effects of matter clustering (see Fig. 3). However, when using the combined dataset CBSHR, this positive correlation disappears and \(\sigma _8\) seems to be insensitive to \(\log _{10}f_{R0}\) (see Fig. 4). Meanwhile, we are also of interests to study the degeneracy between the additional parameter n and \(\sigma _8\), and find that the amplitude of matter clustering is insensitive to n regardless of the use of C or CBSHR datasets (see Fig. 5). Furthermore, to study the degeneracies between parameters better, we exhibit the marginalized constraints on HS f(R) models with \(n=1\) and free n in Figs. 6 and 7, and obtain the following conclusions: (i) to a large extent, the parameter spaces are compressed when combining C with BSHR datasets; (ii) in all cases, two typical parameters \(\log _{10}f_{R0}\) and n are insensitive to other cosmological parameters, which is clarified for the first time in the literature.

We also find that when using only CMB data, the case of free n has the smallest \(\chi ^2=12958.0\) but close to other ones, when using only RSD data, the case of free has a relatively better fitting than HS model with \(n=1\), and that when using the combined datasets CBSHR, these two cases present almost same \(\chi ^2\) value. Therefore, we can not easily distinguish these HS f(R) variants from currently statistical analysis.

Moreover, in Table 1, we can find that the best constraint \(\log _{10}f_{R0} < -4.02\) at the \(2\sigma \) confidence level originates from the case of \(n=1\) by only using CMB data, while two typical parameters \(\log _{10}f_{R0}\) and n in the free n case cannot be well constrained (see also Figs. 6 and 7). Subsequently, in Table 2, we find that, when using RSD data alone, constraints on typical parameters of HS models are poor and smaller \(\sigma _8\) values are obtained, which indicates that this RSD dataset gives a smaller effect of matter clustering at late times than the CMB observation. Interestingly, although the mean value of the constraint \(H_0=75\pm 10\) km s\(^{-1}\) Mpc\(^{-1}\) from RSD data is consistent with the HST result, it has a much larger uncertainty. Finally, at the \(2\sigma \) confidence level, we give our best constraint on the typical parameter \(\log _{10}f_{R0}<-6.75\) in the case of \(n=1\), while \(\log _{10}f_{R0}<-6.60\) in the free n case. It is worth noting that we still cannot provide good constraint on n even using the joint dataset CBSHR.

It is noteworthy that there are two interesting and tight constraints from large scale structure observations. In Ref. [21], the authors uses the galaxy clustering ratio, a sensitive probe of the nature of gravity in the cosmological regime, gives \({f_{R0}}< 4.6\times 10^{-5}\) at the \(2\sigma \) level. Recently, in Ref. [29], the authors place constraints on chameleon-f(R) gravity from galaxy rotation curves and find that f(R) models within the range \(-7.5<\log _{10}f_{R0}<-6.5\) seem to be favored with respect to \(\Lambda \)CDM. Interestingly, our best constraint just lies in this range and this may give a clue of the correct living range for the HS f(R) gravity.

5 Discussions and conclusions

Table 1 The marginalized constraints on the HS f(R) models with \(n=1\), 2, 3, 4 and free n using the “C” dataset are shown, respectively. For the typical parameter \(\log _{10}f_{R0}\), we quote \(2\sigma \) \((95\%)\) uncertainties or bounds. The symbol “\(\diamondsuit \)” denotes the parameter that cannot be well constrained by observed data
Table 2 The marginalized constraints on the HS f(R) models with \(n=1\) and free n are shown by using the “R” and “CBSHR” datasets, respectively. Similarly, for the typical parameter \(\log _{10}f_{R0}\), we quote \(2\sigma \) \((95\%)\) uncertainties. The symbol “\(\diamondsuit \)” denotes the parameter that cannot be well constrained by observed data
Fig. 6
figure 6

The marginalized constraints on the HS f(R) model with \(n=1\) are shown by using the “C” (red) and “CBSHR” (blue) datasets, respectively

Fig. 7
figure 7

The marginalized constraints on the HS f(R) model with free n are shown by using the “C” (red) and “CBSHR” (blue) datasets, respectively

Recently, the \(H_0\) and \(\sigma _8\) tensions under the standard cosmological paradigm have re-activated a wide variety of alternative cosmological models. However, all the time, there is a lack of direct tests of f(R) gravity in resolving both tensions. To address this urgent issue, we confront the popular HS f(R) gravity with current observations. By testing five specific HS f(R) models with observational datasets, we obtain two main conclusions: (i) HS f(R) gravity cannot resolve both \(H_0\) and \(\sigma _8\) tensions; (i) the typical parameters \(\log _{10}f_{R0}\) and n are insensitive to other cosmological parameters. Meanwhile, in the HS f(R) model with \(n=1\), we give our best constraint \(\log _{10}f_{R0}<-6.75\) at the \(2\sigma \) confidence level.

It is noteworthy that a coupling between matter and geometry in the framework of f(R) gravity may help resolve these tensions, and that other f(R) gravity models may relieve both discrepancies much better than the considered HS f(R) one. We expect that future high-precision CMB and SNe Ia observations and independent probes such as gravitational waves could help reduce or even solve these intractable cosmological tensions.