1 Introduction

Newton’s gravitational constant is treated as a constant both in Newton’s gravitational theory and general relativity. Over one hundred years after Newton proposed its definition, Henry Cavendish measured the value of \(G=6.754\pm 0.041 \times 10~\mathrm{N} \cdot \mathrm{m}^2/\mathrm{kg}^2\) with torsion scale experiment. Since then, kinds of methods are used to determine Newton’s constant more precisely. In 2019, the Committee on Data for Science and Technology (CODATA) gives its recommended value of \(G =6.67430 \times 10^{-11}~\mathrm{m}^3\text {kg}^{-1}\,\text {s}^{-2}\) (named CODATA 2018) and the standard uncertainty is \(1.5 \times 10^{-15}~\text {m}^3\,\text {kg}^{-1}\,\text {s}^{-2}\), which means \(2.2 \times 10^{-5}\) relative uncertainty. In the laboratory, cold atom interferometry is also used to detect Newton’s constant [1]. In cosmology, the cosmic microwave background (CMB) [2,3,4,5,6,7], big bang nucleosynthesis (BBN) [8,9,10], type Ia supernovae (SNIa) [11,12,13,14,15] and gravitational waves [14, 16] can provide different measurements of Newton’s constant at corresponding epochs of our universe. Obviously, there is a problem whether Newton’s constant is always a constant really or not. Theoretically, it is acceptable to be both time- or space-dependent in some theories of modified gravity [17,18,19]. For example, the scalar-tensor theories predict a time-dependent G. The cosmological observation provides a method to study the Newton’s constant varying with redshift.

Any change in Newton’s constant have influence on the expansion history of our universe, especially at the redshift of recombination, which leaving a footprint on the CMB power spectra. Combing the precise observation of Planck collaboration [20], Newton’s constant during the CMB epoch can be restricted. SNIa measurement, as the standard candles, are usually used to study the accelerated expansion, too. Newton’s constant affects its peak luminosity through the Chandrasekhar mass by \(M_\mathrm{Ch} \propto G^{-3/2}\) mostly. The latest SINa data, PANTHEON samples [21], detected the light curves of 1048 SNIa covering the redshift range \(0<z<2.3\) and provides a way to limit Newton’s constant at low redshift. Therefore, we constrain the varying Newton’s constant with the CMB power spectra and the SNIa peak luminosity and probe its dynamics.

Besides, the Hubble constant \(H_0\) indicates the expansion of the universe directly. Plank collaboration claimed \(H_0= 67.4 \pm 0.5 \) km s\(^{-1}\) Mpc\(^{-1}\) after its final data release [20]. However, the SH0ES project yielded the best estimate as \(H_0= 74.03 \pm 1.42 \) km s\(^{-1}\) Mpc\(^{-1}\) (named R19), which is 4.4\(\sigma \) different from Planck [22]. \(H_0\) tension may result from systematic errors of measurements. Errors of both the SH0ES and Planck data are studied in recent years [23,24,25,26]. However, other alternative data show a similar discrepancy with the CMB measurement. Another possibility is that \(H_0\) tension implies new physics beyond the \(\Lambda \)CDM model. Some experts attempt to solve the tension by extending the base \(\Lambda \)CDM model simply, such as the dark energy (DE) equation of state w, the effective number of relativistic species \(N_{\mathrm{eff}}\), the total mass of neutrinos \(\Sigma m_{\nu }\), and so on [27,28,29,30,31,32]. Moreover, modifying early universe physics and changing late-time cosmology influence Hubble constant significantly. From this view, dynamical DE [33,34,35,36,37,38], early DE [39,40,41,42], interacting DE [43,44,45,46], dark radiation [47, 48], scalar fields [49, 50], and many other components are considered to solve \(H_0\) tension. Unfortunately, it has not been well solved till now. Owing to the effect of Newton’s constant on the Hubble parameter H(z), we expect a solution of \(H_0\) tension by modifying G. Recently, Ref. [51] has discussed the varying G in the scalar-tensor theory of gravity, which influences the expansion history of our universe before recombination epoch. They gave the result of \(H_0=69.2_{-0.75}^{+0.62}\) km s\(^{-1}\) Mpc\(^{-1}\). And Ref. [52] also finds a larger value for \(H_0\) by an evolving gravitational constant. Here, we simply set G as a free parameter in the base \(\Lambda \)CDM model to enlarge the value of \(H_0\).

This paper is organized as follows. In Sect. 2.1, we rescale Newton’s constant by introducing \(\lambda _2\) and sketch out its influence on the CMB power spectra. In Sect. 2.2, the effect of Newton’s constant on the peak luminosity of SNIa is presented. We show our results in Sect. 3. We turn to CAMB and the Markov Chain Monte Carlo (MCMC) package CosmoMC [53]. The CMB data, BAO data and the SNIa measurement are used to constrain the varying Newton’s constant in Sect. 3.1. Then the data combination of CMB, BAO and uncalibrated SNIa is applied to study the \(H_0\) tension with a constant G in Sect. 3.2.

Finally, a brief summary and discussion are included in Sect. 4.

2 Effects of Newton’s gravitational constant on cosmological observations

To weigh the effects of Newton’s gravitational constant on some cosmological observations, we rescale \(G_N =6.6738 \times 10^{-11}~\text {m}^3\,\text {kg}^{-1}\,\text {s}^{-2}\) with several dimensionless parameter \(\lambda _i\), \(i=0,1,2\), then the new definition of Newton’s constant is

$$\begin{aligned} G= {\left\{ \begin{array}{ll} \lambda _0^2G_N,&{}\text {for}\ z<0.1;\\ \lambda _1^2G_N,&{}\text {for}\ 0.1\le z<2.3;\\ \lambda _2^2G_N,&{}\text {for}\ 2.3\le z.\\ \end{array}\right. } \end{aligned}$$

Here, G indicates the effective values of Newton’s constant for each bins actually. Then the Friedmann equation is

$$\begin{aligned} \mathcal {H}^2=\left( \frac{\dot{a}}{a}\right) ^2= {\left\{ \begin{array}{ll} \dfrac{8\pi }{3}a^2 \lambda _0^2 G_N \rho ,&{}\text {for}\ z<0.1;\\ \dfrac{8\pi }{3}a^2 \lambda _1^2 G_N \rho ,&{}\text {for}\ 0.1\le z<2.3;\\ \dfrac{8\pi }{3}a^2 \lambda _2^2 G_N \rho ,&{}\text {for}\ 2.3\le z, \end{array}\right. } \end{aligned}$$

where \(\mathcal {H}\) is the Hubble rate , a is the scale factor, \(\rho \) is the total energy density in the universe and overdot means the differentiation over the conformal time \(\tau \). When we rescale \(\tau \) as

$$\begin{aligned} d\tau \rightarrow \lambda _i d\tau =\frac{\lambda _i dt}{a}=\frac{da}{a^2 \sqrt{8\pi /3 G_N\rho }}, \end{aligned}$$

the integrand of cosmic distances are independent of \(\lambda _i\). Therefore, we cannot use the cosmic distances only, like the BAO measurements with Eisenstein’s baryon drag epoch \(z_d\) [54], to constrain Newton’s gravitational constant, but we can turn to other non-gravity interactions to constrain G.

2.1 Effects of Newton’s gravitational constant on CMB during the recombination

To the first order, the Boltzmann equations of the baryons and photons in the conformal Newtonian gauge reads

$$\begin{aligned} \dot{\delta }_\gamma= & {} -{4\over 3}\theta _\gamma +4\dot{\phi } \,,\nonumber \\ \dot{\theta }_\gamma= & {} \frac{1}{4} k^2 \delta _\gamma + k^2 \psi + a n_e \sigma _T (\theta _b-\theta _\gamma ) \,,\nonumber \\ \dot{\delta }_b= & {} -\theta _b + 3\dot{\phi } \,, \nonumber \\ \dot{\theta }_b= & {} -{\dot{a}\over a}\theta _b + c_s^2 k^2\delta _b + {4\bar{\rho }_\gamma \over 3\bar{\rho }_b} an_e\sigma _T (\theta _\gamma -\theta _b) + k^2\psi \,, \end{aligned}$$

where \(\delta = \delta \rho /\bar{\rho }\) is the density fluctuation, \(\theta \) is the velocity perturbation for a given mode k, \(\phi \) and \(\psi \) represent the scalar mode of metric perturbations, \(\sigma _T\) is the cross-section of Thomson scattering, n is the number density and \((c_s^2)^{-1}=3\left( 1+\dfrac{3 \bar{\rho }_b}{4\bar{\rho }_{\gamma }}\right) \) is the sound speed of baryons. The subscript e represents electrons, \(\gamma \) is photons and b means baryons. If the two Thomson scattering terms in Eq. (4) are ignored, the replacement of \(\tau \) by \(\lambda _i \tau \) must accompanies a replacement of k by \(k/\lambda _i\) for keeping Eq. (4) (or CMB observations) unchanged. Therefore, the transformation of \(\tau \rightarrow \lambda _i\tau \) also cannot be observed through perturbations because the transformation of \(k \rightarrow k/\lambda _i\) can be compensated by adjusting the scalar spectral index \(n_s\) appropriately if large-scale structure clustering measurements are not considered. Fortunately, there exists Coulomb interaction. So the only way that \(\lambda _i\) influences the CMB anisotropy spectrum is affecting the number of free electrons \(n_e\) during the recombination epoch, hence the ionization fraction \(x_e= n_e/n_\mathrm{H}=x_p+x_\mathrm{HeII}\) during the same epoch. Here, \(n_\mathrm{H}\) is the total number density of H nuclei, \(x_p\) is the ionization fraction of H and \(x_{\text {HeII}}\) presents that of He. According to Ref. [55], the modified evolution of \(x_p\) and \(x_\mathrm{HeII}\) can be obtained by solving the following ordinary differential equations (ODEs)

Fig. 1
figure 1

\(L/L_0\) as a function of \(G/G_N\)

Table 1 The 68\(\%\) limits for the cosmological parameters in two models for different purpose. Notice that \(\lambda _1(\lambda '_1)\) indicates \(\lambda _1\) is a function of \(\lambda '_1\)
$$\begin{aligned} \frac{d x_p}{dz}= & {} \frac{f_1(x_e,x_p,n_\mathrm{H},T_\mathrm{M})}{H(\lambda _2,z)(1+z)}, \end{aligned}$$
$$\begin{aligned} \frac{d x_\mathrm{HeII}}{dz}= & {} \frac{f_2(x_e,x_\mathrm{HeII},n_\mathrm{H},T_\mathrm{M})}{H(\lambda _2,z)(1+z)}, \end{aligned}$$
$$\begin{aligned} \frac{d T_\mathrm{M}}{dz}= & {} \frac{f_3(x_e,T_\mathrm{M},T_\mathrm{R})}{H(\lambda _2,z)(1+z)}+\frac{2T_\mathrm{M}}{(1+z)}, \end{aligned}$$

where \(T_\mathrm{M}\) (or \(T_\mathrm{R}\)) is the matter (or radiation) temperature, the specific expressions of \(f_1\), \(f_2\) and \(f_3\) are given in Ref. [55]. From above ODEs, we can find that \(x_e\) evolves slower for \(\lambda _2>1\), hence a latter photo-decoupling time \(z_*\) and baryon drag epoch \(z_d\). Therefore, we can use the data combination of CMB and BAO measurements to constrain \(\lambda _2\).

2.2 Effects of Newton’s gravitational constant on the SNIa

Since the effects of \(\lambda _2\) on CMB is confined to \(n_e\) during the recombination epoch, there is a possibility that the deviation of Newton’s constant from \(G_N\) is not equal to \(\lambda _2\) at other different epochs. Therefore, it’s necessary to introduce new parameters to quantify the potential deviation from \(G_N\) after the recombination epoch, especially if the constraints on the deviation are not from CMB observations.

Fig. 2
figure 2

The constraints on \(\lambda '_1\), \(\lambda _2\) and \(M_B^1\) from the data combination of CMB, BAO and SNIa. Also we present the constraints on \(n_s\) \(H_0\) and \(\theta _\mathrm{MC}\) which are affected most by the former three parameters

Newton’s constant influences the light curve of SNIa via the Chandrasekhar mass \(M_\mathrm{Ch} \propto G^{-3/2}\) mainly. If the Newton’s constant G increases, the peak luminosity of light curve L raises and its width drops [11]. In this section, we introduce a new parameter \(\lambda '_1= L/L_0\) to quantify the deviation of L from \(L_0\) resulting from the deviation of G from \(G_N\). Figure 1 shows a sketch of \(\lambda '_1=L/L_0\) as a function of \(G/G_N\), from which we can derive \(G/G_N\) from any given \(\lambda '_1\). The two parameters are almost linearly. In other words, the derivation of \(\lambda '_1\) from 1 is nearly equivalent to the difference between G and \(G_N\). If we use the final redshifts, corrected magnitudes \(\mu +M_B\) and the host galaxy mass \(M_{\text {host}}\) of PANTHEON samples [21] to constrain cosmological parameters, the combination of \(\mu +M_B\) can be related to \(\lambda '_1\) as

$$\begin{aligned} \mu +M_{B}= & {} 5\log _{10}\left[ \dfrac{d_{L}}{\text {Mpc}}\right] +25+M_{B}^{1} -2.5\log _{10}\lambda '_{1}+\Delta _{M} \nonumber \\= & {} 5\log _{10}\left[ \dfrac{d_{L}}{\text {Mpc}} \right] +25 \nonumber \\&\quad +M_{\odot }-2.5\log _{10} \big [\lambda '_{1} L_{0}/L_{\odot }\big ] +\Delta _{M} \end{aligned}$$

and \(\Delta _M\) is related to \(M_{\text {host}}\),

$$\begin{aligned} \Delta _M= {\left\{ \begin{array}{ll} 0,&{} \text {for}\ M_\text {{host}}<10^{10} M_{\odot }, \\ -0.08 \text {mag},&{} \text {for}\ M_\text {{host}}\ge 10^{10} M_{\odot }.\\ \end{array}\right. } \end{aligned}$$

Due to the degeneracy between \(\lambda '_1\) and \(L_0\) (or \(M_B^1\)), we ignore the term of \(-2.5\log _{10}\lambda '_1\) for \(z<0.1\) and use samples at this redshift span to constrain \(L_0\) (or \(M_B^1\)).Footnote 1 Then samples from \(z>0.1\) will be used to constrain \(\lambda '_1\).

3 Results

3.1 Varying G with redshift

Firstly, we consider an extension of \(\Lambda \)CDM model with another two free parameters \(\lambda '_1\) (or \(\lambda _1\)) and \(\lambda _2\) to probe the dynamics of G. Based on the previous discussion, \(\lambda '_1\) and \(\lambda _2\) are used to measure the varying Newton’s constant G during the period of SNIa measurement (\(z\sim 0.1{-}2.3\)) and the recombination epoch (\(z\sim 1100\)) respectively. In summarize, the free parameters needed to be fitted are \(\{ \Omega _b h^2,\Omega _c h^2, 100\theta _{\text {MC}}, \tau _{\text {re}}, \ln (10^{10}) A_s, n_s, \lambda '_1,\lambda _2 \}\). Here \(\Omega _b h^2\) and \(\Omega _c h^2\) are today’s density of baryonic matter and cold dark matter respectively, \(100\theta _{\text {MC}}\) is 100 times the ratio of the angular diameter distance to the large scale structure sound horizon, \(\tau _{\text {re}}\) is the optical depth, \(n_s\) is the scalar spectrum index, and \(A_s\) is the amplitude of the power spectrum of primordial curvature perturbations. We refer to CAMB and CosmoMC [53] and use the data combination of the latest CMB data released by the Planck collaboration in 2018, Planck 2018 TT,TE,EE\(+\)lowE\(+\)lensing [20], the BAO data including MGS [56], 6DF [57] and DR12 [58] and the PANTHEON sample consisting of 1048 SNIa measurements. The results are summarized in the first column of Table 1. \(\lambda _2\) is \(0.971_{-0.047}^{+0.043}\) and \(\lambda '_1\) is \(1.003\pm 0.015 \) at 68\(\%\) CL. According to Fig. 1, it indicates that the Newton’s constant \(G=G_N\) is still acceptable both during the recombination epoch and in the late-time universe till now. There is no evidence indicating the dynamic property of the Newton’s constant. The Hubble constant \(H_0\) reads \(67.78 \pm 0.48 \) km s\(^{-1}\) Mpc\(^{-1}\) at 68\(\%\) CL, which is in agreement with the result \(67.4\pm 0.5 \) km s\(^{-1}\) Mpc\(^{-1}\) of Planck 2018. The 68\(\%\) limits for \(M_B^1\) is \(-19.363\pm 0.020\) mag, which is smaller than the previous constraint \(-19.13\pm 0.01\) [14]. The triangular plot of \(\lambda '_1, M_B^1, \lambda _2, H_0, 100\theta _\mathrm{MC}\) and \(n_s\) is also shown in Fig. 2. \(\lambda '_1\) has positive correlation with \(M_B^1\) as shown in Eq. (8), but it’s almost independent of other parameters. By comparison, \(\lambda _2\) is much more complicated. It has strong and negative relationship with \(100\theta _{\text {MC}}\) and \(H_0\) due to its affect on \(z_*\). The correlation between \(\lambda _2\) and \(n_s\) results from the transformation of \(k \rightarrow k/\lambda _2\).

3.2 \(H_0\) tension and constant G with redshift

Then, we try to solve the Hubble tension with a varying Newton’s constant by consider an simple extension of \(\Lambda \)CDM model with another one free parameter \(\lambda _0=\lambda _1=\lambda _2\). We use the data combination of Planck 2018 TT,TE,EE\(+\)lowE\(+\)lensing, the BAO data (6DF, MGS and DR12) and uncalibrated PANTHEON sample. The results are shown in the second column of Table 1: \(\lambda _i = 0.999 \pm 0.014\) and \(H_0=67.62^{+1.24}_{-1.25} \pm \) km s\(^{-1}\) Mpc\(^{-1}\) at 68\(\%\) CL. Our results indicate that Newton’s constant \(G =(6.65635_{-0.18560}^{+0.18766} ) \times 10^{-11}\,\text {m}^3\,\text {kg}^{-1}\,\text {s}^{-2}\) at 68\(\%\) CL, which is consistent with the value of CODATA 2018. However, the \(H_0\) tension can’t be solved with this method.

4 Summary and discussion

In this paper, we investigate how Newton’s constant influences the CMB power spectra and the light curve of SINa. So the CMB data and SINa measurement can put a constraint on the Newton’s constant. Combining the Planck data released in 2018, the BAO data and PANTHEON samples, we run CAMB and CosmoMC with a varying G during the recombination epoch and the redshift ranges of SINa measurement. \(G=G_N\) is located in the 68\(\%\) CL ranges of the two periods. We find no evidence of the dynamic property of Newton’s constant.

In addition, considering the effect of Newton’s constant on the expansion history of our universe, we have a try to solve the \(H_0\) tension by freeing G based on the \(\Lambda \)CDM model. Adopting the combination of Planck 2018 TT,TE,EE+lowE+lensing+uncalibrated PANTHEON+BAO, we obtain \(\lambda _i = 0.999 \pm 0.014\) and \(H_0=67.62^{+1.24}_{-1.25}\) km s\(^{-1}\) Mpc\(^{-1}\) at 68\(\%\) CL. With this method, the \(H_0\) tension can’t be solved. At the same time, our results show that Newton’s constant from this model is consistent with the value given by CODATA 2018.