1 Introduction

Einstein’s curvature-based theory of general relativity (GR) has undeniably been very successful, with its tremendous theoretical consistency and excellent agreements with observational experiments; so much so that, it has obscured the existence of two viable, although equivalent formulations of GR in a curvature-less spacetimes, in which gravity can be completely attributed to either torsion or non-metricity property of that spacetime. In the former case, a metric-compatible affine connection on flat spacetime with torsion substitutes the unique torsion-free and metric-compatible Levi-Civita connection on which GR was originally built. This particular theory, initiated by Einstein himself [1], is called the metric teleparallel theory. The latter case generates symmetric teleparallel theory, formulated based on an affine connection with vanishing curvature and torsion [2]. One can construct the so-called torsion scalar \({\mathbb {T}}\) from the torsion tensor \(T^{\mu }_{\,\,\,\nu \sigma }\) in the metric teleparallel theory and the non-metricity scalar Q from the non-metricity tensor \(Q_{\mu \nu \sigma }\) in its symmetric counterpart. Thereafter, by considering the Lagrangian \({\mathcal {L}}=\sqrt{-g}{\mathbb {T}}\) in the former and \({\mathcal {L}}=\sqrt{-g}Q\) in the latter, the respective field equations can be obtained. However, it is observed that the two theories are equivalent to GR up to a boundary term since both the scalars \({\mathbb {T}}\) and Q equal to the Levi-Civita Ricci scalar \(\mathring{R}\) modulo a total divergence term, given respectively by the notations

$$\begin{aligned} B=2\mathring{\nabla }_\mu T_{\sigma }^{\,\,\,\,\sigma \mu }, \qquad C=\mathring{\nabla }_\mu \left( Q_{\sigma }^{\,\,\,\,\sigma \mu }-Q^{\mu \sigma }_{\quad \sigma }\right) \,. \end{aligned}$$
(1)

Being equivalent to GR, naturally both the metric and symmetric teleparallel theories inherit the same ‘dark sector’ issues as in GR, that is, modifications of the standard model of particle physics or the existence of yet undetected negative energy components to demonstrate the early and late-time accelerating expansion of the universe are necessary. To resolve this issue, modified \(f({\mathbb {T}})\) [3] and f(Q) [4] theories of gravity in the respective genres have been introduced in the same way as \(f(\mathring{R})\) theory was introduced in GR [5,6,7,8,9,10].

Most of the features of the f(T) theories were extensively studied, for a detailed review see [11] and the references therein. In fact, the comparatively immature f(Q) theory gained significant attention too in recent times and being investigated rigorously [12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]. For a detailed survey, one can also look at [29] and the references therein.

Very recently, attempts were made to display the \(f(\mathring{R})\) theory as a particular limit in both metric and symmetric teleparallel theory by incorporating the respective boundary terms B and C in their Lagrangians. The \(f({\mathbb {T}},B)\) [30] and f(QC) [31, 32] theories thus produced, are of the latest interest among the researchers.

Several approaches have been used in the literature to recover the features of \(\Lambda \)CDM using modified theories of gravity. However, the cosmological reconstruction schemes have a unique position among them. For example, Nojiri et al. [33] devised an intriguing strategy for the cosmological reconstruction of f(R) gravity in terms of e-folding. The matter components need an additional degree of freedom, as found by Dunsby et al. [34], for an accurate reconstruction of \(\Lambda \)CDM development under f(R) gravity.

In this work, we aim to study the cosmological reconstruction scheme in the f(QC) gravity theory. Recently, Gadbail et al. [35] investigated the reconstruction scheme in f(Q) gravity, and they adopted two methods to find the explicit Lagrangian form of f(Q), which led to several interesting results. We extended this reconstruction strategy in f(QC) gravity by assuming the additive form \(f(Q,C)=g(Q)+h(C)\), which may demonstrate separately the influence of the boundary term C in f(Q) gravity. Classically, the underlying concept of reconstruction involves a reversal of the conventional process: some theoretically or observationally established physical assumptions (e.g., an assumed form for the spatial scale factor) are utilized, and subsequently, by substituting it into the cosmological equations, additional information is obtained regarding the other unknowns of the theory, in the present case, the arbitrary function f in the Lagrangian.

The present article is organized as follows: in Sect. 2, we present a brief review of the basic formulation of f(QC) gravity theory. In Sect. 3, we present the FLRW cosmology in f(QC) gravity theory. In Sect. 4, we perform a reconstruction strategy in f(QC) gravity that admits the \(\Lambda \)CDM universe. In Sect. 5, we perform the cosmological reconstruction scheme for modified f(QC) gravity in terms of e-folding by assuming various examples of FLRW solutions. Finally, we discuss and summarize the results in Sect. 6.

Throughout the article we have used the notations \(f_Q=\frac{\partial f}{\partial Q}, \quad f_{C}=\frac{\partial f}{\partial C}\). All the expressions with a \(\mathring{(~)}\) is calculated with respect to the Levi-Civita connection \(\mathring{\Gamma }\).

2 f(QC) gravity

As we know, the Levi-Civita connection \(\mathring{\Gamma }^\alpha {}_{\mu \nu }\) is the unique affine connection which satisfies both the metric-comptaibility and torsion-free conditions. We relax this restriction and instead assume a torsion-free and curvature-free affine connection \(\Gamma ^\alpha {}_{\mu \nu }\) to develop the symmetric teleparallel geometry. The torsionless environment makes the affine connection symmetric in its lower indices, hence the term ‘symmetric’. The incompatibility of this affine connection with the metric is characterised by the non-metricity tensor

$$\begin{aligned} Q_{\lambda \mu \nu }:= \nabla _\lambda g_{\mu \nu }=\partial _\lambda g_{\mu \nu }-\Gamma ^{\beta }_{\,\,\,\lambda \mu }g_{\beta \nu }-\Gamma ^{\beta }_{\,\,\,\lambda \nu }g_{\beta \mu }\ne 0 . \end{aligned}$$
(2)

We can always express

$$\begin{aligned} \Gamma ^\lambda {}_{\mu \nu }:= \mathring{\Gamma }^\lambda {}_{\mu \nu }+L^\lambda {}_{\mu \nu }. \end{aligned}$$
(3)

It follows that,

$$\begin{aligned} L^\lambda {}_{\mu \nu } = \frac{1}{2} (Q^\lambda {}_{\mu \nu } - Q_\mu {}^\lambda {}_\nu - Q_\nu {}^\lambda {}_\mu ) . \end{aligned}$$
(4)

We can construct two different types of non-metricity vectors,

$$\begin{aligned} Q_\mu := g^{\nu \lambda }Q_{\mu \nu \lambda } = Q_\mu {}^\nu {}_\nu , \qquad {\tilde{Q}}_\mu := g^{\nu \lambda }Q_{\nu \mu \lambda } = Q_{\nu \mu }{}^\nu . \end{aligned}$$

Likewise, we write

$$\begin{aligned} L_\mu := L_\mu {}^\nu {}_\nu \,, \qquad {\tilde{L}}_\mu := L_{\nu \mu }{}^\nu \,. \end{aligned}$$
(5)

The superpotential (or the non-metricity conjugate) tensor \(P^\lambda {}_{\mu \nu }\) is given by

$$\begin{aligned} P^\lambda {}_{\mu \nu } = \frac{1}{4} \left( -2 L^\lambda {}_{\mu \nu } + Q^\lambda g_{\mu \nu } - {\tilde{Q}}^\lambda g_{\mu \nu } -\delta ^\lambda {}_{(\mu } Q_{\nu )} \right) . \end{aligned}$$
(6)

Finally, the non-metricity scalar Q is defined as

$$\begin{aligned} Q=Q_{\alpha \beta \gamma }P^{\alpha \beta \gamma }. \end{aligned}$$
(7)

From the torsion-free and curvature-free constraints one can further easily obtain the following relations:

$$\begin{aligned}{} & {} \mathring{R}_{\mu \nu }+\mathring{\nabla }_\alpha L^\alpha {}_{\mu \nu }-\mathring{\nabla }_\nu {{\tilde{L}}}_\mu +{{\tilde{L}}}_\alpha L^\alpha {}_{\mu \nu }-L_{\alpha \beta \nu }L^{\beta \alpha }{}_\mu =0\,, \end{aligned}$$
(8)
$$\begin{aligned}{} & {} \mathring{R}+\mathring{\nabla }_\alpha (L^\alpha -{{\tilde{L}}}^\alpha )-Q=0\,. \end{aligned}$$
(9)

As \(Q^\alpha -{{\tilde{Q}}}^\alpha =L^\alpha -{{\tilde{L}}}^\alpha \), from the preceding relation, one also defines the boundary term as

$$\begin{aligned} C=\mathring{R}-Q&=-\mathring{\nabla }_\alpha (Q^\alpha -{{\tilde{Q}}}^\alpha ) \end{aligned}$$
(10)

The action in the f(QC) theory is defined by

$$\begin{aligned} S=\int \left[ \frac{1}{2\kappa }f(Q,C)+{\mathcal {L}}_{M}\right] \sqrt{-g} \,d^{4}x, \end{aligned}$$
(11)

where f is a function on both Q and C; and \({\mathcal {L}}_m\) is a matter Lagrangian.

By varying the action term with respect to the metric we derive the field equation

$$\begin{aligned} \kappa T_{\mu \nu }= & {} -\frac{f}{2}g_{\mu \nu } +\frac{2}{\sqrt{-g}}\partial _\lambda \left( \sqrt{-g}f_Q P^\lambda {}_{\mu \nu } \right) \nonumber \\{} & {} +(P_{\mu \alpha \beta }Q_\nu {}^{\alpha \beta }-2P_{\alpha \beta \nu }Q^{\alpha \beta }{}_\mu ) f_Q\nonumber \\{} & {} +\left( \frac{C}{2} g_{\mu \nu }-\mathring{\nabla }_{\mu }\mathring{\nabla }_{\nu } +g_{\mu \nu }\mathring{\nabla }^\alpha \mathring{\nabla }_\alpha -2P^\lambda {}_{\mu \nu }\partial _\lambda \right) f_C, \nonumber \\ \end{aligned}$$
(12)

which covariantly can be expressed as

$$\begin{aligned} \kappa T_{\mu \nu }= & {} -\frac{f}{2}g_{\mu \nu }+2P^\lambda {}_{\mu \nu }\nabla _\lambda (f_Q-f_C) \nonumber \\{} & {} +\left( \mathring{G}_{\mu \nu }+\frac{Q}{2}g_{\mu \nu }\right) f_Q\nonumber \\{} & {} +\left( \frac{C}{2}g_{\mu \nu }-\mathring{\nabla }_{\mu }\mathring{\nabla }_{\nu } +g_{\mu \nu }\mathring{\nabla }^\alpha \mathring{\nabla }_\alpha \right) f_C. \end{aligned}$$
(13)

We define the effective stress energy tensor as

$$\begin{aligned} T^{\text {eff}}_{\mu \nu }= & {} T_{\mu \nu }+ \frac{1}{\kappa }\left[ \frac{f}{2}g_{\mu \nu }\! -\!2P^\lambda {}_{\mu \nu }\nabla _\lambda (f_Q-f_C) \!-\!\frac{Qf_Q}{2}g_{\mu \nu }\right. \nonumber \\{} & {} \left. -\left( \frac{C}{2}g_{\mu \nu }-\mathring{\nabla }_{\mu }\mathring{\nabla }_{\nu } +g_{\mu \nu }\mathring{\nabla }^\alpha \mathring{\nabla }_\alpha \right) f_C\right] , \end{aligned}$$
(14)

to produce GR-like equation

$$\begin{aligned} \mathring{G}_{\mu \nu }=\frac{\kappa }{f_Q}T^{\text {eff}}_{\mu \nu }\,. \end{aligned}$$
(15)

One can visualise the additional part in (14), arising from the geometric modification during the construction of f(QC) theory to source a fictitious dark energy alike component

$$\begin{aligned} T^{\text {DE}}_{\mu \nu }= & {} \frac{1}{f_Q}\left[ \frac{f}{2}g_{\mu \nu }-2P^\lambda {}_{\mu \nu }\nabla _\lambda (f_Q-f_C) -\frac{Qf_Q}{2}g_{\mu \nu }\right. \nonumber \\{} & {} \left. -\left( \frac{C}{2}g_{\mu \nu }-\mathring{\nabla }_{\mu }\mathring{\nabla }_{\nu } +g_{\mu \nu }\mathring{\nabla }^\alpha \mathring{\nabla }_\alpha \right) f_C\right] . \end{aligned}$$
(16)

As central to all the modified gravity theories, this additional \(T^{\text {DE}}_{\mu \nu }\) component, basically generates negative pressure to drive the late-time acceleration.

In the present paper, we consider a perfect fluid type stress energy tensor given by

$$\begin{aligned} T_{\mu \nu }=pg_{\mu \nu }+(p+\rho )u_\mu u_\nu \end{aligned}$$
(17)

where \(\rho \), p and \(u^\mu \) denote the energy density, pressure and four velocity of the fluid respectively.

Since the affine connection in this theory is a completely independent entity, by taking variation of the action with respect to the affine connection, we obtain the connection field equation

$$\begin{aligned} (\nabla _\mu -{{\tilde{L}}}_\mu )(\nabla _\nu -{{\tilde{L}}}_\nu ) \left[ 4(f_Q-f_C)P^{\mu \nu }{}_\lambda +\Delta _\lambda {}^{\mu \nu }\right] =0\,, \end{aligned}$$
(18)

where

$$\begin{aligned} \Delta _\lambda {}^{\mu \nu }=-\frac{2}{\sqrt{-g}}\frac{\delta (\sqrt{-g} {\mathcal {L}}_M)}{\delta \Gamma ^\lambda {}_{\mu \nu }}, \end{aligned}$$

is the hypermomentum tensor.

3 FLRW cosmology in f(QC) gravity

The “cosmological principle” states that on a large enough scale our Universe is homogenous and isotropic, that is, it is the same at every point and in every direction. Based on this, the most reasonable and theoretically as well as observationally supported model of the present Universe is the spatially flat Friedmann–Lemaitree–Robertson–Walker (FLRW) spacetime given by the line element in Cartesian coordinates

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

where a(t) is said to be the scale factor of the Universe, and its first time derivative is given by the Hubble parameter \(H(t)=\frac{\dot{a}}{a(t)}\). Here \(\dot{()}\) indicates a derivative with respect to cosmic time t. We proceed with the vanishing affine connection \(\Gamma ^\alpha {}_{\mu \nu }=0\) and compute the followings as required

$$\begin{aligned} \mathring{R}=&6(2H^2+\dot{H}), \quad Q=-6H^2, \quad C=6(3H^2+\dot{H}). \end{aligned}$$
(20)

With these data, we derive the Friedmann-like equations as

$$\begin{aligned} \kappa \rho&=\frac{f}{2}+6H^2f_Q-(9H^2+3\dot{H})f_C+3H\dot{f_C} \end{aligned}$$
(21)
$$\begin{aligned} \kappa p&=-\frac{f}{2}-(6H^2+2\dot{H})f_Q-2H\dot{f}_Q\nonumber \\ {}&\quad +(9H^2+3\dot{H})f_C-\ddot{f_C}. \end{aligned}$$
(22)

4 \(\Lambda \)CDM Universe in f(QC) gravity

We reconstruct the f(QC) gravity model in this section to closely resemble the \(\Lambda \)CDM model for various epochs. We may create a real-valued function that gives the specific cosmic development of the \(\Lambda \)CDM model for the non-metricity scalar and boundary term. According to observational cosmology, the \(\Lambda \)CDM model’s description of the Hubble rate in terms of redshift is provided by

$$\begin{aligned} H(z)=\sqrt{\frac{\rho _0}{3}(1+z)^3+\frac{\Lambda }{3}}, \end{aligned}$$
(23)

where \(\rho _0\ge 0\) is the matter density and \(\Lambda \) is a cosmological constant. Here, we attempt to develop the f(QC) gravity theories that most closely resemble the \(\Lambda \)CDM expansion.

Using the relation of scale factor a and redshift z as \(\frac{1}{a}=1+z\), the above equation can be demonstrated as

$$\begin{aligned} \frac{\dot{a}}{a}=\sqrt{\frac{\rho _0}{3a^3}+\frac{\Lambda }{3}}. \end{aligned}$$
(24)

From the above equation, we may get the derivative of the scale factor a(t) with respect to time (t) as

$$\begin{aligned} \dot{a}=\sqrt{\frac{\rho _0}{3a}+\frac{\Lambda }{3}a^2}. \end{aligned}$$
(25)

From the above equation, we can immediately calculate the second derivative of the scale-factor, which is given by

$$\begin{aligned} \ddot{a}=\frac{1}{2}\frac{d}{da}(\dot{a}^2)=\frac{2\Lambda a^3-\rho _0}{6a^2}. \end{aligned}$$
(26)

We know that for a flat FLRW universe, the boundary term C is defined by

$$\begin{aligned} C=6\left( 2\frac{\dot{a}^2}{a^2}+\frac{\ddot{a}}{a}\right) . \end{aligned}$$
(27)

Now, we can rewrite the boundary term C in terms of the scale factor by plugging Eqs. (24) and (26),

$$\begin{aligned} C(a)=\frac{(3\rho _0+6\Lambda \, a^3)}{a^3}. \end{aligned}$$
(28)

With the help of above equation, we write the scale factor in terms of the boundary term C as

$$\begin{aligned} a(C)=\left( \frac{3\rho _0}{C-6\,\Lambda }\right) ^{\frac{1}{3}}. \end{aligned}$$
(29)

Now, the Hubble parameter and Its derivative in terms of boundary term C can be written as

$$\begin{aligned} H(C)=\sqrt{\frac{\rho _0}{3a(C)^3}+\frac{\Lambda }{3}}, \end{aligned}$$
(30)

and

$$\begin{aligned} \dot{H}(C)=\frac{6\Lambda -C}{6}. \end{aligned}$$
(31)

For simplicity, here we assume the class of f(QC) functions as \(f(Q,C)=g(Q)+h(C)\) (additive separable model). The additive separable model contains extensively different cosmological limitations, such as STEGR (\(g= Q\) and \(h=0\)), \(\Lambda \)CDM (\(g+h = 2\Lambda \)), f(Q) gravity (\(h= 0\)), STEGR with a modification allowing the g(Q) and h(C) functions to fully capture the behavior of the boundary term. This type of model has the advantage of producing a decoupled system of ordinary differential equations for the g(Q) and h(C) functions, which are easier to solve. Now, in order to find a class of f(QC) functions, which mimic the \(\Lambda \)CDM expansion, we separate the differential equation by using variable separation approach for Q-space and C-space. In Q-space, we yielding the first-order inhomogeneous differential equation for the function g(Q) as,

$$\begin{aligned} Q\frac{dg(Q)}{dQ}-\frac{g(Q)}{2}+\kappa \rho =K. \end{aligned}$$
(32)

Also, we plug all of the above quantities represented as functions of the boundary term into the Friedmann equation, and in C-space, we yielding another second-order homogeneous differential equation for the function h(C) as

$$\begin{aligned} -(C-3\Lambda )(C-6\Lambda )\frac{d^2h(C)}{dC^2}\!-\!\frac{C}{2}\frac{dh(C)}{dC}\!+\!\frac{h(C)}{2}\!=\!K,\nonumber \\ \end{aligned}$$
(33)

where K is a separable constant. For differential equation (32), Gadbail et al. [35] found the more general functions of non-metricity scalar Q that admit exact \(\Lambda \)CDM expansion history by presumed different fluid components such as dust-like matter, perfect fluid, multifluid, and nonisentropic perfect fluids. So, in this section, our task is to find the general functions of boundary term C admit exact \(\Lambda \)CDM expansion history.

In Eq. (33), we yield the homogeneous second-order differential equation and its solution is

$$\begin{aligned} h(C)= & {} 2K+c_1\,C+c_2\left[ \frac{\sqrt{C-3\Lambda }}{6\Lambda }\right. \nonumber \\{} & {} \left. -\frac{C}{6\sqrt{3}\Lambda ^{3/2}}\,Tanh^{-1}\left( \sqrt{\frac{C-3\Lambda }{3\Lambda }}\right) \right] , \end{aligned}$$
(34)

where \(c_1\) and \(c_2\) are integration constant.

The fluid components have no effect on the differential equation (33). As a result, the following solution for the boundary term C can be valid for all fluid components in the general solution of f(QC). The solution of g(Q) is affected by fluid components (see in Eq. (32)). As a result, Gadbail et al. [35] got several solutions for g(Q) corresponding to different fluid components. Furthermore, if we set \(\Lambda =0\), the solution of f(QC) is real-valued for nonmetricity Q and boundary term C, and therefore there exist classes of a real-valued function f(QC) other than GR that may represent the expansion history of the universe without the cosmological constant. But even a minimal value of the cosmological constant would break this degeneracy, and in that case, the theory would have to reveal a \(\Lambda \)CDM universe.

5 Cosmological reconstruction of modified f(QC) gravity

In this section, we also used the model \(f(Q,C)=g(Q)+h(C)\) and separate the first Friedmann equation for two different variable Q and C as

$$\begin{aligned} \frac{g(Q)}{2}-Q\frac{dg(Q)}{dQ}+\kappa \rho (Q)=0, \end{aligned}$$
(35)

and

$$\begin{aligned} \frac{h(C)}{2}-(9H^2+3\dot{H})\frac{dh(C)}{dC}+3H\dot{C}\frac{d^2h(C)}{dC^2}=0, \end{aligned}$$
(36)

The foregoing equations are represented as functions of the e-foldings number rather than the time t, \(N=log\frac{a}{a_0}\). The variable N is associated with the redshift z by \(e^{-N}=\frac{a_0}{a}=(1+z)\). Since \(\frac{d}{dt}=H\frac{d}{dN}\) and consequently \(\frac{d^2}{dt^2}=H^2\frac{d^2}{dN^2}+H\frac{dH}{dN}\frac{d}{dN}\), one can rewrite Eq. (36) as

$$\begin{aligned} 0= & {} -\frac{h(C)}{2}+3(3H^2+H\,H')\frac{dh(C)}{dC}\nonumber \\{} & {} -18(6H^3H'+H^2(H')^2+H^3H'')\frac{d^2h(C)}{dC^2}. \end{aligned}$$
(37)

Here \(H'=\frac{dH}{dN}\) and \(H''=\frac{d^2H}{dN^2}\).

The matter energy density, denoted by the symbol \(\rho \), may obtained by summing the fluid densities with a constant EoS parameter \(w_i\)

$$\begin{aligned} \rho =\sum _i \rho _{i0}\, a^{-3(1+w_i)}=\sum _i \rho _{i0}\,a_0^{-3(1+w_i)} e^{-3(1+w_i)N}.\nonumber \\ \end{aligned}$$
(38)

Let us express the Hubble parameter in terms of N using the function J(N) as follows:

$$\begin{aligned} H=J(N)=J(-ln(1+z)). \end{aligned}$$
(39)

Then the boundary term C written as \(C=18\,J(N)^2+6\,J'(N)\,J(N)\), where \(N=N(C)\). By using Eq. (39), Eq. (37) can be written as,

$$\begin{aligned} 0= & {} -\frac{h(C)}{2}+3\left( 3\,J(N)^2+J'(N)\,J(N)\right) \frac{dh(C)}{dC}\nonumber \\{} & {} -18\left( 6\,J(N)^3J'(N)+J(N)^2(J'(N))^2\right. \nonumber \\{} & {} \left. +J(N)^3J''(N)\right) \frac{d^2h(C)}{dC^2}, \end{aligned}$$
(40)

which constitutes a differential equation for h(C), where the variable is the boundary term C. Instead of J, if we use \(G(N)=J(N)^2=H^2\), the expression might be simplified slightly:

$$\begin{aligned} 0= & {} -\frac{h(C)}{2}+3\left( 3\,G(N)+\frac{1}{2}G'(N)\right) \frac{dh(C)}{dC}\nonumber \\{} & {} -9\,G(N)\left( 6\,G'(N)+G''(N)\right) \frac{d^2h(C)}{dC^2}. \end{aligned}$$
(41)

Note that the boundary term is given by \(C=18\,G(N)+3\,G'(N)\).

For example, we reconstruct the f(QC) model, reproducing the \(\Lambda \)CDM-era without real matter. The FLRW equation for \(\Lambda \)CDM cosmology in Einstein’s gravity is presented by

$$\begin{aligned} \frac{3}{\kappa ^2}H^2=\frac{3}{\kappa ^2}H_0^2+\frac{\rho _0}{a^3}=\frac{3}{\kappa ^2}H_0^2+\rho _0\,a_0^{-3}e^{-3N}. \end{aligned}$$
(42)

In this scenario, \(H_0\) and \(\rho _0\) are constants. The first component in the RHS represents the cosmological constant, whereas the second term represents cold dark matter (CDM). The (effective) cosmological constant \(\Lambda \) in the current universe is given by \(\Lambda =12H_0^2\). Then follows

$$\begin{aligned} G(N)=H_0^2+\frac{\kappa ^2}{3}\rho _0\,a_0^{-3}e^{-3N}, \end{aligned}$$
(43)

and \(C=18H_0^2+3\kappa ^2\rho _0\,a_0^{-3}e^{-3N}\), which can be solved for N as follows:

$$\begin{aligned} N=-\frac{1}{3}\,ln\left( \frac{C-18H_0^2}{3\kappa ^2\rho _0\,a_0^{-3}}\right) . \end{aligned}$$
(44)

Using Eq. (43), Eq.(41) can be written in the following form:

$$\begin{aligned} 0=-\frac{h}{2}+\frac{C}{2}\frac{dh}{dC}+\left( C-9H_0^2\right) \left( C-18H_0^2\right) \frac{d^2h}{dC^2}. \end{aligned}$$
(45)

The solution of differential equation (45) is

$$\begin{aligned} h(C)= & {} c_1\,C + c_2\left[ \frac{\sqrt{C-9H_0^2}}{18H_0^2}\right. \nonumber \\ {}{} & {} \left. -\frac{C}{54H_0^3} \,tanh^{-1}\left( \frac{\sqrt{C-9H_0^2}}{3H_0}\right) \right] , \end{aligned}$$
(46)

where \(c_{1,2}\) is an arbitrary constant of integration.

For this example, Gadbail et al. [35] have previously reconstructed a f(Q) model that can describe the \(\Lambda \)CDM period without including the effective cosmological constant. As a consequence, we demonstrated that modified f(QC) gravity with boundary condition may describe the \(\Lambda \)CDM era without adding the effective cosmological constant.

Another example is the reconstruction of f(QC) gravity using the FLRW equation for the Einstein gravity system with phantom and non-phantom matter. Whose FLRW equation is

$$\begin{aligned} \frac{3}{\kappa ^2}H^2=\rho _q\,a^{-m}+\rho _p\,a^{m}, \end{aligned}$$
(47)

where \(\rho _p\), \(\rho _q\) and m are positive constants. We can demonstrate that the first component of the R.H.S. in this solution corresponds to a fluid that is non-phantom and has an equation of state (EoS) of \(w=-1+\frac{m}{3}>-1\), whereas the second term has an EoS of \(w=-1-\frac{m}{3}<-1\) which relates to a phantom fluid.

Then since \(G(N)=J(N)^2=H^2\), we find

$$\begin{aligned} G(N)=G_q\,e^{-m N}+G_p\,e^{m N}, \end{aligned}$$
(48)

where \(G_q=\frac{\kappa ^2\rho _q\,a_0^{-m}}{3}\) and \(G_p=\frac{\kappa ^2\rho _q\,a_0^{m}}{3}\) are constants. Then since \(C=18\,G(N)+3\,G'(N)\),

$$\begin{aligned} e^{mN}=\frac{C\pm \sqrt{C^2-4(324-9m^2)G_pG_q}}{2(18+3m)G_p},\,\,\,\,m\ne -6, \end{aligned}$$
(49)

when \(m\ne 6\) and

$$\begin{aligned} e^{6N}=\frac{C}{36 G_p}, \end{aligned}$$
(50)

when \(m=6\). We consider \(m = 6\) case. In this case, the non-phantom matter corresponding to the first term in the RHS of Eq. (47) could be show stiff fluid with \(w =1\). Shortly after the beginning, the universe moved through a stage of exponential expansion known as inflation, and it went through the stiff fluid epoch throughout evolution, when pressure balanced the energy density (\(p=\rho \)). The concept of a primordial stiff matter era initially arose in Zel’dovich’s [36] cosmological model, which assumes the very early cosmos to be formed of a cold gas of baryons with an equation of state \(p=\rho \). Zel’dovich’s goal was to look into the cosmological consequences of an equation of state in which the speed of sound equals the speed of light [37]. In that case, the energy density decreases as \(\rho \propto 1/a^{6}\). In this case, Eq. (41) is given by

$$\begin{aligned} 0=-\frac{h}{2}+\frac{C}{2}\frac{dh}{dC}-18\,C\left( \frac{36}{C}G_pG_q+\frac{C}{36}\right) \frac{d^2h}{dC^2}. \end{aligned}$$
(51)

The solution of differential equation (51) is

$$\begin{aligned} h(C)= & {} c_1\,C+c_2\left[ -\sqrt{C^2+1296\,G_p\,G_q}\right. \nonumber \\{} & {} \left. +C\,tanh^{-1}\left( \frac{C}{\sqrt{C^2+1296\,G_p\,G_q}}\right) \right] . \end{aligned}$$
(52)

For this example, the g(Q) is reconstructed in the reference [35]. They used the case \(m=4\) (radiation case with \(w=\frac{1}{3}\)) to reconstruct the model. Similarly, for the stiff fluid scenario (\(m=6\)), we may reconstruct the g(Q) model and obtain the same sort of result. In this scheme, the reconstructed f(QC) model that can useful to study the inflation era (early universe before radiation-dominated phase) of the universe.

Let us now examine a model in which a phantom-like component is prominent. When a phantom fluid is included, such a system may be simply described in standard General Relativity, where the FLRW equation reads \(H(t)^2=\frac{\kappa ^2}{3}\rho _{ph}\). The phantom character of the fluid is indicated by the subscript ph. As the EoS for the fluid is provided by \(p_{ph} =\omega _{ph}\rho _{ph}\) with \(\omega _{ph}<-1\), by utilizing the conservation equation \({\dot{\rho }}_{ph} + 3\,H(1 + \omega _{ph})\rho _{ph} = 0\), the solution for the FLRW equation \(H(t)^2=\frac{\kappa ^2}{3}\rho _{ph}\) is well known, and it produces \(a(t) = a_0(t_s-t)^{-H_0}\), where \(a_0\) is a constant, \(H_0=-\frac{1}{3(1+\omega _{ph})}\) and \(t_s\) is the so-called Rip time. The solution then depicts the universe that collapses at the Big Rip singularity in the future (\(t_s\)). In f(QC) theory, the same behavior may be obtained without the need of a phantom fluid. It is possible to solve Eqs. (35) and (41), and rebuild the expression for the equation f(QC) that reproduces the solution. The expression for the Hubble parameter as a function of the number of e-folds is given by \(H(N)^2=H_0^2\,e^{2N/H_0}\). Then, Eq. (41), with no matter contribution, takes the form:

$$\begin{aligned} 0=-\frac{h}{2}+\frac{C}{2}\frac{dh}{dC}-\frac{C^2}{A}\frac{d^2h}{dC^2}, \end{aligned}$$
(53)

where \(A=1+3H_0\). This equation is the well-known Euler equation whose solution yields

$$\begin{aligned} h(C)=c_1\,C^{A/2}+c_2\,C. \end{aligned}$$
(54)

Since \(Q=6H^2=6G(N)=6H_0^2\,e^{2N/H_0}\), which can be solved for N as follows:

$$\begin{aligned} N=\frac{H_0}{2}\,ln\left( \frac{Q}{Q_0}\right) . \end{aligned}$$
(55)

Using Eqs. (38) and (55) in Eq. (35), we obtained non-homogeneous differential equation for Q-space, and its solution is

$$\begin{aligned} g(Q)=c\,\sqrt{Q}+\mu \,\sqrt{\frac{Q}{Q_0}}\,ln(Q), \end{aligned}$$
(56)

where \(\mu =\rho _0\,a_0^{-3(1+w_{ph})}\) and c is an integrating constant.

Therefore, the obtained f(QC) model is

$$\begin{aligned} f(Q,C)=c\,\sqrt{Q}+\mu \,\sqrt{\frac{Q}{Q_0}}\,ln(Q)+c_1\,C^{A/2}+c_2\,C.\nonumber \\ \end{aligned}$$
(57)

In this scheme, the reconstructed f(QC) model describes the universe that ends at the Big Rip singularity in the time \(t_s\) (Rip time) without introducing a phantom fluid.

We may now think about the model in which the transition to the phantom epoch takes place. It has been suggested that f(QC) might act as an effective cosmological constant, allowing for a good replication of its present measured value. One can reconstruct the model in which the phantom barrier is passed once late-time acceleration has been reproduced by an effective cosmological constant (for such reconstruction in the presence of an auxiliary scalar, see Ref. [38]). Such a transition, which may take place at the current time, could be achieved in f(QC) gravity. The solution considered can be expressed as:

$$\begin{aligned} H^2=H_1\left( \frac{a}{a_0}\right) ^m+H_0=H_1\,e^{m\,N}+H_0, \end{aligned}$$
(58)

where m, \(H_0\), and \(H_1\) are all positive constants. When a cosmological constant and a phantom fluid are taken into account, this solution can be produced in GR. In this instance, the f(QC) function alone may construct the solution (58) and reproduce the change from the non-phantom to the phantom epoch. Again, the boundary term can be expressed in terms of the e-folds. Then, Eq. (41) takes the form:

$$\begin{aligned} 0= & {} -\frac{h}{2}+\frac{C}{2}\frac{dh}{dC}\nonumber \\{} & {} -m(C-18H_0)\left( \frac{C-18H_0}{m+6}+3H_0\right) \frac{d^2h}{dC^2}. \end{aligned}$$
(59)

The solution of above differential equation is

$$\begin{aligned} h(C)= & {} c_1\,C-c_2\,\frac{2m}{m-6}\,C^{\alpha +\beta }\nonumber \\{} & {} \times F_1\left( \alpha \!-\!\beta ;\!-\!\beta ,\!-\!\alpha ;3\alpha -\beta ;\frac{18 H_0}{C},-\frac{3m\,H_0}{C}\right) ,\nonumber \\ \end{aligned}$$
(60)

where \(\alpha =1/2\) and \(\beta =3/m\). \(F_1\) is an Appell hypergeometric function.

Since \(Q=6H^2=6G(N)=6H_1\,e^{mN}+6H_0\), which can be solved for N as follows:

$$\begin{aligned} N=\frac{1}{m}\,ln\left( \frac{Q-6H_0}{6H_1}\right) . \end{aligned}$$
(61)

Using Eqs. (38) and (61) in Eq. (35), we obtained non-homogeneous differential equation for Q-space, and its solution is

$$\begin{aligned} g(Q)= & {} c\,\sqrt{Q}+\mu \left( \frac{6H_0-Q}{Q-6H_0}\right) ^{\frac{3(1+w)}{m}}\nonumber \\{} & {} \times _2F_{1}\left( -\frac{1}{2},\frac{3(1+w)}{m},\frac{1}{2};\frac{Q}{6H_0}\right) , \end{aligned}$$
(62)

where \(\mu =-2\rho _0\,a_0^{-3(1+w)}\left( \frac{H_1}{H_0}\right) ^{\frac{3(1+w)}{m}}\) and c is an integrating constant.

Following the same reconstruction given above, another example with transitory phantom behavior in f(QC) gravity may be obtained. In this scenario, we take into account the Hubble parameter:

$$\begin{aligned} H^2=H_0\,ln\left( \frac{a}{a_0}\right) +H_1=H_0\,N+H_1, \end{aligned}$$
(63)

where \(H_0\) and \(H_1\) are positive constants. This model includes an effective cosmological constant and a term that will induce a super accelerating phase even if no future singularity occurs. The solution to the model (63) may be represented as a function of time: \(H(t)=\frac{a_0\,H_0}{2(t-t_0)}\). The universe then super accelerates, but as H(t) shows, despite its phantom nature, no future singularity occurs. The differential reconstruction equation is given as

$$\begin{aligned} 0= & {} -\frac{h}{2}+\frac{C}{2}\frac{dh}{dC}\nonumber \\{} & {} -9H_0\left( \frac{C-18H_0}{3}-H_0+6H_1\right) \frac{d^2h}{dC^2}. \end{aligned}$$
(64)

By changing the variable from C to \(x=\frac{C}{6H_0}-\frac{1}{2}\), we can rewrite the above differential equation in the form of Laguerre’s differential equation:

$$\begin{aligned} x\,\frac{d^2h(x)}{dx^2}-\left( x+\frac{1}{2}\right) \frac{dh(x)}{dx}+h(x)=0, \end{aligned}$$
(65)

and its solution is

$$\begin{aligned} h(x)=c_1\,(x+1/2)+c_2\,x^{3/2}\,L_{-\frac{1}{2}}^{\frac{3}{2}}(x)' \end{aligned}$$
(66)

where \(L_{-\frac{1}{2}}^{\frac{3}{2}}(x)\) is a Laguerre function, and \(c_{1,2}\) is an arbitrary constant of integration.

Since \(Q=6H^2=6G(N)=6H_0\,N+6H_1\), which can be solved for N as follows:

$$\begin{aligned} N=\left( \frac{Q-6H_1}{6H_0}\right) . \end{aligned}$$
(67)

Using Eq. (38) and (67) in Eq. (35), we obtained non-homogeneous differential equation for Q-space, and its solution is

$$\begin{aligned} g(Q)= & {} c\,\sqrt{Q}+\mu \left( -2\,e^{-\frac{(1+w)Q}{2H_0}}+\sqrt{\frac{2(1+w)Q}{H_0}}\right. \nonumber \\{} & {} \times \left. \Gamma \left[ \frac{1}{2},\frac{(1+w)Q}{2H_0}\right] \right) , \end{aligned}$$
(68)

where \(\mu =\rho _0\,a_0^{-3(1+w)}\,e^{\frac{(1+w)H_1}{2H_0}}\) and c is an integrating constant. Therefore, in this example, the f(QC) model has a cosmological solution with phantom behavior that is transitory and does not develop into a future singularity.

6 Conclusion

Symmetric teleparallel equivalent of general relativity and its modification f(Q) theory have been performing pretty well in explaining the cosmological mysteries. In this work we have paid all our attention to reconstructing the Lagrangian of an extension of this theory while taking into account the boundary term C, namely, the f(QC) theory. In the presence of this boundary term, the f(Q) theory in the field equations is possible to be raised from second-order to fourth-order. Here, we adopt \(f(Q,C)=g(Q)+h(C)\) as the arbitrary additive separable form of the nonmetricity scalar and boundary term. Further, in the limit of \(h(C)\rightarrow 0\), the theory is consistent with f(Q) gravity.

In this work, our approach has been to reconstruct the Lagrangian for two different approaches. The first approach yields certain real-valued f(QC) functions capable of retrieving the \(\Lambda \)CDM expansion history of the universe populated with various matter components, respectively. In second approach, we employ e-folding to do cosmic reconstruction of f(QC) gravity, eliminating the need for more complicated formulations with auxiliary scalars [38,39,40,41], and it demonstrates how any FLRW cosmology may originate from a specific f(QC) gravity. A variety of instances are provided using this approach in which f(QC) gravity is reconstructed to yield the well-known cosmic evolution: \(\Lambda \)CDM era, deceleration with successive transition to effective phantom superacceleration which ended to Big Rip singularity, deceleration without future singularity and transition to transient phantom phase. The fact that all of these cosmologies may be realized solely through modified gravity without the aid of any dark energy components (cosmological constant, quintessence, phantom, etc.) is crucial. In general, such models only succeed in some local gravitational tests.