1 Introduction

Last few years, the embedding theorem attracted the attention among the researchers working in the area of mathematical and physical sciences. Through this embedding theory, it can be found a link between the classical general relativity and higher dimensional spaces that can explain the inner symmetry clusters of the elements. The researchers [1,2,3] have linked different manifolds by embedding the 4-dimensional Einstein field equations into a 5-dimensional flat space–time. This methodology has been used in string theory, supergravity, induced matter theory and membrane theory, for many viable aspects. In this connection, in the following Refs. [4,5,6], it was shown that an m-dimensional Riemannian space \(V_m\) can be locally and isometrically embedded into a pseudo-Euclidean space (\(V_n\)), where \(n=m(m+1)/2\). In this case, \(n-m=m(m-1)/2\) denotes the “embedding class” of the immersed Riemannian space. This extra dimension is required for minimal embedding, although for symmetric cases, any m dimensional spherically symmetric space–time (\(V_m\)) needs at least a \((m+1)\) dimensional flat space–time (\(V_{m+1}\)) to be immersed. It is well-known that the interior Schwarzschild space–time solution is of class I while the exterior Schwarzschild solution represents a space–time of embedding class II. On the other hand, the Friedmann–Lemaître–Robertson–Walker (FLRW) and the de-Sitter cosmological models are only of class I. In the present paper, we study the static spherically symmetric class I space–time case. It worth mentioning that, on the background of embedding class I technology for spherically symmetric space–time, there are only two perfect fluid solutions, namely (i) Schwarzschild solution [7] and (ii) Kohler and Chao [8] solution. The class I condition, provides an extra differential equation (also known as Karmarkar condition [9]) in the static spherically symmetric case that connects both metric potentials corresponding to \(r-r\) and \(t-t\) metric components. This condition provides an extensive tool for solving Einstein’s field equations and investigate new relativistic astrophysical compact stellar structures. Recently, several solutions were obtained in the context of charged and anisotropic matter distributions with well defined compact structures for class I space–time [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26] (and references contained therein).

In the presence of anisotropy matter distribution in the stellar structures, it was shown by Dev and Gleiser [27, 28] that the mass, compactness as well as red-shift are affected by this anisotropic behavior. The Ruderman [29] and Canuto et al. [30,31,32] theoretical studies, pointed out that a stellar structure may create the anisotropy inside it if the matter density is greater than the nuclear density i.e. \(p_t \ne p_r\) when \(\rho _m >\rho _n\). In this direction, an inventive contribution has been done by Bowers and Liang [33] the properties of anisotropic relativistic stellar configurations, for the static spherically symmetric space–time case. Moreover, as Mak and Harko have resisted [34,35,36], anisotropies can be unified in several backgrounds such as: by the presence of type 3A superfluid [37], pion condensation [38] or numerous kinds of system transitions [39]. Although the above ingredients, have been taken into account to explain the presence of local anisotro- pies inside compact astrophysical objects, a recent study by Herrera showed [40] that the anisotropic state of the matter distribution in the stellar interior seems to be a natural state regarding the compact configurations in static hydrostatic equilibrium. Moreover, even if the system is initially described by an isotropic matter distribution, it naturally falls into an anisotropic phase. As it well known that the system attains a static equilibrium stage after a dynamical process, where the matter distribution threading the stellar interior is susceptible to suffer dissipative fluxes, energy density inhomogeneities and/or the appearance of shear in the fluid flow, ending with an anisotropic fluid distribution. Furthermore, departure from the isotropic pressure condition leads to get a more stable system. Last several years, a large number of researchers have been investigated effectively the role and impact of the anisotropy within compact stellar objects [41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63]. Interestingly, recently a simple, powerful and versatile tool denominated gravitational decoupling by minimal geometric deformation (MGD) [78,79,80,81,82,83,84,85,86,87,88] was developed to introduce anisotropic behavior into the matter distribution, describing a wide range of solutions within the framework of Einstein gravity theory and beyond it [89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112]. In this connection, some pioneering works on MGD have been done by da Rocha and his collaborators in different aspects [113,114,115,116,117,118]. Furthermore, the inverse problem i.e., given a minimally deformed and anisotropic space–time: what is its non-deformed and isotropic counterpart? has been worked in [119].

The gravitational decoupling by MGD is based on the introduction of a new material source coupled to the energy–momentum tensor via a dimensionless constant parameter. Specifically it reads

$$\begin{aligned} T_{ij}\equiv \hat{T}_{ij}+\beta \theta _{ij}, \end{aligned}$$
(1)

where \(\theta _{ij}\) is the mentioned new piece, which in principle could be a scalar, vector or tensor field, and \(\beta \) is the dimensionless parameter. After replacing (1) into the Einstein field equations subject to a spherically symmetric and static space–time, one gets an intricate system of equation built on the seed matter distribution, geometry and the new source. Of course, if Einstein’s equations are already complex in themselves, then what is the advantage of including an extra source? From the mathematical point of view it is obvious that the problem becomes more complicated, since new degrees of freedom arise. From the physical point of view one could gain some new insights to understand (or reinforce previous studies) the behaviour of high dense matter with anisotropic components.Footnote 1 In the simplest case, when the seed solution is representing an isotropic fluid, this scheme translates it to an anisotropic domain, and as was discussed earlier an anisotropic material content recreate a more realistic scenario from the astrophysical point of view. So, in that case at general level the new set of equations has seven unknowns, namely the isotropic density \(\hat{\rho }\), the isotropic pressure \(\hat{p}\), the geometry \(\{e^{\nu },e^{\lambda }\}\) and the pieces \(\{\theta ^{t}_{t},\theta ^{r}_{r},\theta ^{\varphi }_{\varphi }\}\). On the other hand, when the kernel solution already contains anisotropies the number of unknowns rises from seven to eight since there are a radial \(\hat{p}_{r}\) and tangential \(\hat{p}_{t}\) pressures. In such a case the re-anisotropization of the fluid introduces a strong anisotropic behavior which helps to support the stability and equilibrium of the system. Nevertheless, solve this intricate problem is not an easy task. To tackle it the gravitational decoupling by means of MGD is employed. This is a purely geometry argument where the radial component of the metric tensor \(e^{\lambda }\) is deformed,

$$\begin{aligned} e^{-\lambda (r)}\mapsto \mu (r)+\beta f(r), \end{aligned}$$
(2)

being f(r) the decoupler function. As can be seen (2) introduces some modifications on the mass function m(r) since both are connected. Once the above map is inserted into the global set of equations, it is separated into two system of equations: (i) one is completely determined by the seed space–time and (ii) the second one contains the \(\theta \)-sector and the decoupler function. An interesting point to be noted here, is that each separate system satisfies its own conservation equation (null divergence of \(\hat{T}_{ij}\) and \(\theta _{ij}\)). This means that both sources only interact gravitationally. The main point here now, is how to close the \(\theta \)-system. In this concern, several proposals have been worked in the literature in order to solve the extra equations, yielding to an admissible solution. For example the more common is the mimic constraint approach [88, 89, 108], the imposition of a suitable deformation function f(r) [96, 106] and more recently by using the so-called Cosenza–Herrera–Esculpi–Witten ansatz [110]. However, a more interesting situation arises when the above methodology includes deformation on both metric potentials. Developed in [120] the extended case or extended geometric deformation (EGD from now on) contemplates the same modification introduced on the energy–momentum tensor but this time the deformation (2) is extended to

$$\begin{aligned} \nu (r)\mapsto \xi (r)+\beta h(r), \quad e^{-\lambda (r)}\mapsto \mu (r)+\beta f(r). \end{aligned}$$
(3)

Despite a new degree of freedom h(r) appears into the \(\theta \)-sector, still is possible to solve the problem at least mathematically. So, taking into account the precedent antecedents and considering that the study of compact structures such as neutron or quark stars, compromises and active research field, we have employed the so-called class I methodology in conjunction with the EGD to obtain anisotropic compact configurations (for further details see [121]). In the seminal work [120] to close the \(\theta \)-system was assumed that the extra piece \(\theta _{ij}\) is equal to a static electric field. In this case we want to obtain the concrete form of the source \(\theta _{ij}\), hence we have imposed an adequate temporal deformation h(r) to find out the complete \(\theta \)-sector and the function f(r). Moreover, we have employed Karmarkar condition as an auxiliary equation to find the decoupler function f(r). From the mathematical point of view the class I constraint yields to a non-linear ordinary differential equation in f(r) or a second order one in h(r). To test the feasibility of this approach, we have taken the seed space–time solution to be the hybrid Adler–Finch–Skea solution. It is worth mentioning that the seed solution must satisfies the field equations under class I condition in the limit \(\beta \rightarrow 0\). The complete transformed space–time, has been tested by performing an exhaustive analysis of the main features that any compact structure describing an aniso- tropic matter distribution should fulfill. To recreate a more realistic scenario, we have checked all these properties by using real observational data corresponding to some compact stars. It should be noted that deformation on both metric functions, modifies the complete relativistic hydrostatic balance equation. Since the gravitational gradient is proportional to the first derivative of the \(g_{tt}\) potential, its magnitude is changed. In this respect, we have checked the hydrostatic balance of the resulting model, concluding that the system is in complete balance under the hydrostatic, gravitational and anisotropic gradients. This fact is very important, since the fulfillment of the modified relativistic hydrostatic equilibrium equation, tells us that the conservation law of the energy–momentum tensor is also preserved when new sources are present. Some recent works on EGD model can bee seen in Refs. [122, 123].

So, the article is organized as follows. In Sect. 2 gravitational decoupling by EGD and class I methodology are revisited. In Sects. 3 and 4, are discussed the junction condition process in this context and the class I condition is presented as generator of the deformation functions, respectively. Section 5 presents the most general requirements that any compact anisotropic solution, should satisfy in order to describe an admissible solution. In Sect. 6 the model is presented and in Sect. 7 some implications on the main macro physics parameter, such as the total mass M compactness factor u and surface gravitational red-shift \(z_{s}\) are discussed. Finally, in Sect. 8 some conclusions and remarks for the reported study are provided. The generating function for this solution has been provided at the last in the Appendix A.

2 The background extended geometric deformation (EGD) approach and the embedding class one space–time

2.1 Gravitational decoupling by extended geometric deformation (EGD)

An extended gravitational decoupling by means of extended geometric deformation (EGD) technique, is an innovative approach to create or generalize solutions of Einstein’s field equations, for anisotropic or electric charge matter distributions [88]. As it is well-known, the matter distribution contains aniso- tropy if \(p_r\ne p_t\). There are several methods to introduce local anisotropies in self-gravitating systems. For this purpose, we introduce an extra gravitational source which is coupled to the energy–momentum tensor associated with the seed solution. Then the modified energy–momentum tensor can be given by [88, 125],

$$\begin{aligned} {T}_{ij} \equiv \hat{T}_{ij} + \beta \,\theta _{ij}, \end{aligned}$$
(4)

where \(\hat{T}_{ij}\) denotes the energy–momentum tensor corresponding to the seed solution for the compact star model. Then, we consider a static spherically symmetric space–time in Schwarzschild like coordinates \(x=\{t,r,\theta ,\phi \}\) as

$$\begin{aligned} ds^{2}=e^{\nu }dt^{2}-e^{\lambda }dr^{2}-r^{2} (d\theta ^{2}+sin^{2}\theta d\phi ^{2}). \end{aligned}$$
(5)

It is well-known that the class I isotropic fluid solution for the above spherically symmetric metric, is compatible with only two perfect fluid solutions namely, the Schwarzschild [7] interior solution (or its special cases of the de-Sitter Universe or the Einstein universe) and the Kohler–Chao [8] solution. Nevertheless, as we argued before the main aim is to describe compact structures subject to (5) with an anisotropic content. Therefore, in order to obtain it, we shall consider that the matter distribution threading the interior embedding class I seed space–time, is described by the most general form of an imperfect fluid distribution, expressed by

$$\begin{aligned} \hat{T}_{ij}= (\hat{\rho } +\hat{p}_{t})\chi _{i}\chi _{j}-g_{ij}\,\hat{p}_{t}+ (\hat{p}_{r}-\hat{p}_{t})u_{i}u_{j}, \end{aligned}$$
(6)

being \(\chi ^{i}=e^{-\nu /2}\delta ^{i}_{\ t}\) the time-like four velocity of the fluid, satisfying \(\chi ^{i}\chi _{i}=1\), where \(\tilde{\rho }\) is the energy-density, \(\tilde{p_r}\) and \(\tilde{p_t}\) are the radial and tangential pressures, respectively. However, the new field \(\theta _{ij}\) also introduced anisotropies into the self-gravitating system. Then the anisotropic behavior within the compact configuration becomes stronger. Now, the Einstein field equations corresponding to modified energy–momentum tensor \({T}_{ij}\) are given as follows,

$$\begin{aligned} G_{ij}\equiv R_{ij}-\frac{1}{2}R\,g_{ij}=-\frac{8\pi G}{c^{4}}\,{T}_{ij}. \end{aligned}$$
(7)

Then the explicit form of Einstein’s field (7) equations associated with the line element (5) and the matter distribution (4) can be read as,

$$\begin{aligned} 8\pi {\rho }= & {} \frac{1}{r^2}-e^{-\lambda }\left( \frac{1}{r^2}-\frac{\lambda ^{\prime }}{r}\right) , \end{aligned}$$
(8)
$$\begin{aligned} 8\pi {p}_{r}= & {} -\frac{1}{r^2}+e^{-\lambda }\left( \frac{1}{r^2}+\frac{\nu ^{\prime }}{r}\right) , \end{aligned}$$
(9)
$$\begin{aligned} 8\pi {p}_{t}= & {} \frac{1}{4}e^{-\lambda }\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}-\lambda ^{\prime }\nu ^{\prime }+2\frac{\nu ^{\prime }-\lambda ^{\prime }}{r}\right) , \end{aligned}$$
(10)

where primes denote differentiation with respect to the radial coordinate r. From now on, we shall employ relativistic geometrized units where Newton’s gravitational constant G and the speed of light c are setFootnote 2 to: \(G=c=1\) and modified density and pressures can be written as,

$$\begin{aligned} {\rho }\equiv & {} \hat{\rho }+\beta \, \theta ^{ t}_{t} \end{aligned}$$
(11)
$$\begin{aligned} {p}_{r}\equiv & {} \hat{p}_r-\beta \, \theta ^{r}_{r} \end{aligned}$$
(12)
$$\begin{aligned} {p}_{t}\equiv & {} \hat{p}_t-\beta \, \theta ^{ \varphi }_{\varphi }. \end{aligned}$$
(13)

Besides, the modified energy–momentum tensor \(T_{ij}\) must satisfy the conservation law

$$\begin{aligned} \nabla _{i}T^{i}_{j}=0, \end{aligned}$$
(14)

leading to

$$\begin{aligned} \hat{p_r}^{\prime } + \frac{\nu ^{\prime }}{2} (\hat{p}_r + \hat{\rho }) +\frac{2(\hat{p}_r-\hat{p}_t)}{r}- \beta \, L(\theta _i^i) =0, \end{aligned}$$
(15)

where the function \(L(\theta _i^i)\) is given by

$$\begin{aligned} L(\theta _i^i) \equiv (\theta ^{r}_{r} )^{\prime } + \frac{\nu ^{\prime }}{2} (\theta ^{r}_{r}-\theta ^{t}_{t}) + \frac{2}{r} (\theta ^{r}_{r}-\theta ^{\varphi }_{\varphi }). \end{aligned}$$
(16)

The above Eq. (15) is a linear combination of the expressions (8)–(10). It is necessary to point out that the presence of \(\theta \)-term leads an extra anisotropies if \(\theta ^{r}_{r}\ne \theta ^{\varphi }_{\varphi }\) only. Thus, the effective anisotropy is defined as

$$\begin{aligned} \varDelta \equiv {p}_{t}-{p}_{r}=(\hat{p}_t-\hat{p}_r)+\beta (\theta ^{r}_{r}- \theta ^{\varphi }_{\varphi }). \end{aligned}$$
(17)

In the present situation, the extra term \(\beta (\theta ^{r}_{r}-\theta ^{\varphi }_{\varphi })\) produces a stronger anisotropic behavior into the self-gravitating system that helps to increase the stability and equilibrium mechanisms.

The introduction of the new piece changes the usual mass function definition by

$$\begin{aligned} m(r)= & {} 4\pi \int _0^r{{\rho }(x)\,x^2\,dx}=\underbrace{4\pi \int _0^r{\hat{\rho }(x)\,x^2\,dx}}_{m_{0}(r)}\nonumber \\&+\underbrace{4\pi \,\beta \, \int _0^r{\theta ^{ 0}_{0}(x) \,x^2dx}}_{m_\beta (r)}, \end{aligned}$$
(18)

where \(m_0(r)\) denotes the mass function corresponding to pure general relativity (GR hereinafter) case, while \(m_\beta (r)\) is the extra contribution in the original GR due to gravitational decoupling. Normally, it is not an easy task to find out interior analytical solutions of the Einstein field equations for relativistic compact objects. Therefore, in order to find exact solutions, a famous choice is the extended gravitational decoupling via the EGD approach. The essential facts of this procedure depend on the resulting deformed metric potentials given by Eq. (3), which shows the deformation of the metric components \(g_{rr}\) and \(g_{tt}\) consisting in two unknown functions h(r) and f(r) namely, the radial and temporal deformation functions. However, the remaining features will be the same due to the spherically symmetry of the solution. Under this situation, the components of the \(\theta _{ij}\) sector are formed by the functions h(r) and f(r) and their derivatives, in distinction with what happens in the MGD case (2), where the \(\theta _{ij}\) tensor is constructed only with the radial deformation i.e., f(r) and its derivatives.

Splitting the system of differential equations (8)–(10) and taking into account Eq. (3) the set (8)–(10) is divided into two different systems: (i) the first system satisfies Einstein field equations for an anisotropic system, in absence of \(\beta \) parameter i.e. \(\beta = 0\),

$$\begin{aligned} \hat{\rho }= & {} \frac{1}{8\pi }\bigg \{\frac{1}{r^{2}}-\frac{\mu }{r^{2}}-\frac{\mu ^{\prime }}{r}\bigg \}, \end{aligned}$$
(19)
$$\begin{aligned} \hat{p_r}= & {} \frac{1}{8\pi }\bigg \{-\frac{1}{r^{2}}+\mu \left( \frac{1}{r^{2}}+\frac{\xi ^{\prime }}{r}\right) \bigg \}, \end{aligned}$$
(20)
$$\begin{aligned} \hat{p_t}= & {} \frac{1}{8\pi }\bigg \{\frac{\mu }{4}\left( 2\xi ^{\prime \prime }+\xi ^{\prime 2}+2\frac{\xi ^{\prime }}{r}\right) +\frac{\mu ^{\prime }}{4}\left( \xi ^{\prime }+\frac{2}{r}\right) \bigg \}, \end{aligned}$$
(21)

being the general solution,

$$\begin{aligned} ds^{2} = -\mu ^{-1}\,dr^{2}-r^{2} (d\theta ^{2}+\sin ^{2} \theta ~ d\phi ^{2})+e^{\xi (r)} dt^{2}, \end{aligned}$$
(22)

with a mass function given by

$$\begin{aligned} {m_0(r)} \equiv {4\pi }\int _0^r{\rho (x)\,x^2\,dx} \equiv \frac{r}{2}\left[ 1-\mu (r)\right] , \end{aligned}$$
(23)

and subject to the following conservation equation

$$\begin{aligned}&\nabla ^{(\xi ,\,\mu )}_{i}\hat{T}^{i}_{j}=0~ \Longrightarrow ~\hat{p}^{\prime }_r \nonumber \\&\quad + \frac{\xi ^{\prime }}{2} \left( \hat{p}_r + \hat{\rho }\right) +\frac{2(\hat{p}_r-\hat{p}_t)}{r}=0. \end{aligned}$$
(24)

On the other hand, the second system of equations for the \(\theta \)-sector are determined by turning on \(\beta \). So, one has

$$\begin{aligned} \theta _t^t= & {} -\frac{1}{8\pi }\bigg \{\frac{f^{\prime }}{r}+\frac{f}{r^{2}}\bigg \}, \end{aligned}$$
(25)
$$\begin{aligned} \theta _r^r= & {} -\frac{1}{8\pi }\bigg \{f\left( \frac{\nu ^{\prime }}{r}+\frac{1}{r^{2}}\right) +\frac{\mu \,h^{\prime }}{r}\bigg \}, \end{aligned}$$
(26)
$$\begin{aligned} \theta _\varphi ^\varphi= & {} - \frac{1}{8\pi }\bigg \{\frac{f}{2}\left( {\nu }''+\frac{{\nu }'^2}{2}+\frac{{\nu }'}{r}\right) +\frac{f'}{2}\left( \frac{{\nu }'r+2}{2r}\right) +\varPsi (r)\bigg \}, \nonumber \\ \end{aligned}$$
(27)

with the expressions \(\varPsi (r)\),

$$\begin{aligned} \varPsi (r)=\frac{\mu }{4}\,\left( 2\,h^{\prime \prime }+\beta \,h^{{\prime }\,2}+\frac{2\,h^{\prime }}{r}+2\,\xi ^{\prime }\,h^{\prime }\right) +\frac{\mu ^{\prime }\,h^{\prime }}{4}. \end{aligned}$$
(28)

In this case the mass function \(m_\beta (r)\) is expressed by

$$\begin{aligned} m_\beta (r)= & {} 4\pi \,\beta \, \int _0^r{\theta ^{ t}_{t}(x) \,x^2dx}\nonumber \\= & {} -\frac{\beta }{2} \int _0^r{\bigg \{\frac{f^{\prime }(x)}{x}+\frac{f(x)}{x^{2}}\bigg \}x^2dx}=-\frac{\beta \,r}{2} f(r).\nonumber \\ \end{aligned}$$
(29)

It is important to remark that the \(m_\beta (r)\) strongly depends on the sign of \(\beta \) and f(r). The consequence is that the extra piece \(m_\beta (r)\) will increase the total seed mass or decrease.

The respective conservation law for the above field equations (25)–(27) associated with the \(\theta \)-sector is [120],

$$\begin{aligned} (\theta ^{r}_{r})^{\prime }-\frac{1}{2}\nu ^{\prime } (\theta ^{t}_{t}-\theta ^{r}_{r})-\frac{2}{r} (\theta ^{\varphi }_{\varphi }-\theta ^{r}_{r})=\frac{h^{\prime }}{2}\,(\hat{p}_r+\hat{\rho }). \end{aligned}$$
(30)

The above equation is a linear combination of Eqs. (25) and (27) through the coupling constant \(\beta \).

2.2 Embedding class one space–time

It is well known that a space–time describes an embedding class I space–time if the 4-dimensional space–time is embedded into 5-dimensional pseudo-Euclidean space. This can happen if there exists a second fundamental form symmetric tensor \(K_{ij}=K_{ji}\), that satisfies the Gauss–Codazzi equations,

$$\begin{aligned}&R_{hijk}=\epsilon (K_{hj}\,K_{ik}-K_{hk}\,K_{ij}), \end{aligned}$$
(31)
$$\begin{aligned}&\nabla _{j}\,K_{hi}=\nabla _{i}\,K_{hj}, \end{aligned}$$
(32)

here \(\epsilon \) takes the value 1 or \(-1\) corresponding to signature required for the manifold, \(R_{hijk}\) is the Riemann tensor and \(\nabla _{k}\) the affine connection allied to the metric tensor \(g_{ij}\) such that \(\nabla _{i}\,g_{jk}=0\).

The only non-zero components of the symmetric tensor \(K_{hi}\) are: \(K_{rr}\), \(K_{tt}\), \(K_{\theta \theta }=sin^{2}\theta \,K_{\phi \phi }\) and \(K_{tr}=K_{rt}\). By plugging these components into (31), we get

$$\begin{aligned} R_{\phi t\phi t}=\frac{R_{rtrt}\,R_{\theta \phi \theta \phi }-R_{r\theta \theta t}R_{r\phi \phi t}}{R_{r\theta r\theta }}, \end{aligned}$$
(33)

where \(R_{r\theta r\theta }\ne 0\) [64] and the non-zero components of Riemann tensor \(R_{hijk}\) associated with the condition (33) in the context of static spherically symmetric line element (5) are given as,

$$\begin{aligned} R_{\phi t \phi t}= & {} -\frac{r}{2}\nu ^{\prime }e^{\nu -\lambda }\sin ^{2}\theta , \end{aligned}$$
(34)
$$\begin{aligned} R_{rtrt}= & {} -e^{\nu }\left( \frac{\nu ^{\prime \prime }}{2}-\frac{\lambda ^{\prime }\nu ^{\prime }}{4}+\frac{\nu ^{\prime 2}}{4}\right) , \end{aligned}$$
(35)
$$\begin{aligned} R_{\theta \phi \theta \phi }= & {} -e^{-\lambda }r^{2}\sin ^{2}\theta (e^{\lambda }-1), \end{aligned}$$
(36)
$$\begin{aligned} R_{r \theta r\theta }= & {} -\frac{r}{2}\lambda ^{\prime } . \end{aligned}$$
(37)

Now by inserting the above components (34)–(37) into class I condition (33), we derived the following ordinary differential equation

$$\begin{aligned} \lambda ^{\prime }=\frac{(2\,\nu ^{\prime \prime }+\nu ^{\prime \,2})\,(1-e^{-\lambda })}{\nu ^{\prime \,2}}. \end{aligned}$$
(38)

The above equation can be solved for both unknowns \(\lambda (r)\) and \(\nu (r)\) and can also be expressed in terms of each other as,

$$\begin{aligned} e^{\lambda }=(1+\tilde{A}\,\nu ^{\prime 2}\,e^{\nu })~~ \text {or}~~e^{\nu }=\left[ \tilde{B}+\tilde{C}\int \sqrt{e^{\lambda }-1}dr\right] ^{2},\nonumber \\ \end{aligned}$$
(39)

where \(\tilde{A}\), \(\tilde{B}\) and \(\tilde{C}\) denote arbitrary integration constants.

3 Junction conditions for anisotropic stellar models

The study of the junction conditions for anisotropic stellar models at the surface \(r=R\), is an essential measure that can be described by joining the interior space–time \(\mathscr {M}^{-}\) (\(r<R\)) and the exterior one \(\mathscr {M}^{+}\) (\(r>R\)) at the boundary of the stellar compact object. In our current scenario, the interior stellar space–time can be described by the following line element in the context of the extended geometric deformation approach as

$$\begin{aligned} ds^2= & {} - \bigg (1-\frac{2\,{m}(r)}{r}\bigg )^{-1} dr^2-r^2(d\theta ^2+\sin ^2\theta \,d\phi ^2)\nonumber \\&+e^{\xi (r)+\beta \,h(r)}\,dt^2, \end{aligned}$$
(40)

where

$$\begin{aligned} {m}(r) =m_0(r)+m_{\beta }(r)=\frac{r}{2}\,(1-e^{-\lambda (r)}), \end{aligned}$$
(41)

is internal mass of the anisotropic stellar structure. The interior space–time (40) must be joined in a smoothly way with the empty exterior space–time i.e. ani- sotropic pressures \(p_i^{+}\) and density \(\rho ^{+}\) must be zero. In general, the outer space–time is described by the vacuum space–time i.e., exterior Schwarzschild solution. Nevertheless, the presence of the \(\theta \)-sector into the matter distribution could in principle change both the geometry and the matter content for the outer space–time. In this scenario, the stellar compact object will be not immersed in vacuum space–time anymore. In this situation, the compact stellar model can remain embedded into a vacuum space–time whether the contributions coming from the \(\theta \)-sector are considered to be confined within the stellar interior only [88]. Therefore, the exterior Schwarzschild space–time can be given by

$$\begin{aligned} ds^{2}= & {} \left( 1-\frac{2M_{\text {Sch}}}{r}\right) dt^{2}\nonumber \\&-\left( 1-\frac{2M_{\text {Sch}}}{r}\right) ^{-1}dr^{2}-r^{2}d\varOmega ^{2}, \end{aligned}$$
(42)

being \(M_{\text {Sch}}\) the Schwarzschild mass which coincides with the total mass M of the object at the boundary \(\varSigma \). For smooth joining of inner geometry with outer geometry at the boundary of the stellar interior at \(r=R\), we apply the well known Israel–Darmois junction conditions [65, 66]. These conditions are known as the continuity of the first and second fundamental forms across the boundary \(\varSigma \). The continuity of the first fundamental form at the boundary of the stellar model \(\varSigma \) provides

$$\begin{aligned} g^{-}_{tt}\bigg |_{r=R}=g^{+}_{tt}\bigg |_{r=R} \quad \text{ and } \quad g^{-}_{rr}\bigg |_{r=R}=g^{+}_{rr}\bigg |_{r=R}, \end{aligned}$$
(43)

yielding to

$$\begin{aligned} \nu (R)= & {} \xi (R)+\beta \,h(R)=\ln \bigg (1-\frac{2M}{R}\bigg ), \end{aligned}$$
(44)
$$\begin{aligned} e^{-\lambda (R)}= & {} \mu (R)+\beta \,f(R)=1-\frac{2M}{R}, \end{aligned}$$
(45)

where the total mass M of the compact object can be determined as

$$\begin{aligned} M_{\text {Sch}}=M=m(R)=m_0(R)+m_\beta (R). \end{aligned}$$
(46)

Next, the continuity of the second fundamental says

$$\begin{aligned}{}[G_{ij}\,r^j ]_\varSigma =0 \end{aligned}$$
(47)

being \(r_j\) a unit vector. From Eqs. (4) and (12) one obtains

$$\begin{aligned}{}[{T}_{ij}\,r^j ]_\varSigma =0 \Longrightarrow [\hat{p}_r-\beta \,\theta ^r_r(r)]_\varSigma =0, \end{aligned}$$
(48)

thus

$$\begin{aligned} \hat{p}_r(R)-\beta \,(\theta _r^r)^{-}(R)=-\beta \,(\theta ^r_r)^{+}(R). \end{aligned}$$
(49)

where \(\hat{p}_r(R)\) denotes the radial pressure at the boundary (\(r=R\)) corresponding to interior matter distribution when \(\beta =0\). The Eq. (49) describes the general expression for the second fundamental form associated with the Einstein field equations given by Eq. (7). Now, using Eq. (26) we arrive to

$$\begin{aligned}&\hat{p}_r(R)+\beta \,\bigg [\frac{f}{8\pi }\,\bigg (\frac{\nu ^{\prime }}{r}+\frac{1}{r^2}\bigg )+\frac{\mu \,h^{\prime }}{r}\bigg ]_{r=R}\nonumber \\&\quad =-\beta \,(\theta ^1_1)^{+}(R), \end{aligned}$$
(50)

here \(\nu ^{\prime }\equiv \partial _r\,\nu ^{-}\). In order to find out \((\theta ^r_r)^{+}(R)\) in (50), we employ Eqs. (26), (44) and (45), obtaining

$$\begin{aligned}&\hat{p}_r(R)+\beta \,\bigg [\frac{f(R)}{8\pi }\,\bigg (\frac{\nu ^{\prime }(R)}{R}+\frac{1}{R^2}\bigg )+\frac{\mu (R)\,h^{\prime }(R)}{8\pi R}\bigg ]\nonumber \\&\quad =\frac{\beta \,f^{*}(R)}{8\pi }\Bigg [\frac{2M}{R^2\,\big (R-2M\big )}+\frac{1}{R^2}\Bigg ]\nonumber \\&\qquad +\beta \,\frac{[h^{*}(R)]^{\prime }}{8\pi }\,\bigg (\frac{R-2M}{R^2}\bigg ), \end{aligned}$$
(51)

where, \(f^{*}(R)\) and \(h^{*}(R)\) denote the geometric deformation functions for the exterior Schwarzschild solution (42). It is essential to note that, if the exterior space–time is described by a vacuum space–time, \(f^{*}(R)\) and \(h^{*}(R)\) must be null. Therefore, Eq. (51) becomes

$$\begin{aligned} \hat{p}_r(R)+\beta \,\bigg [\frac{\,f(R)}{8\pi }\,\bigg (\frac{\nu ^{\prime }(R)}{R}+\frac{1}{R^2}\bigg )+\frac{\mu (R)\,h^{\prime }(R)}{8\pi R}\bigg ] =0. \nonumber \\ \end{aligned}$$
(52)

The condition (52) determines the size of the compact stellar object. Besides, it is worth mentioning that conditions (44), (45) and (52) describe the necessary and sufficient conditions to determine all the constant parameters.

4 The embedding class one generator for anisotropic stellar object

In this section we develop a generating equation in f(r) and h(r) for the embedding class I space–time via gravitational decoupling by means of EGD methodology. For this purpose, we substitute the extended deformed gravitational potentials \(\nu (r)\) and \(\lambda (r)\) from Eq. (3) into embedding class I condition (38), obtaining a differential equation, that involves 4-unknowns, namely f(r), g(r), \(\nu (r)\) and \(\lambda (r)\),

$$\begin{aligned}&(\mu ^{\prime }+\beta f^{\prime })\,(\xi ^{\prime }+\beta \,h^{\prime })=(\mu +\beta \,f)\,(\mu +\beta \,f-1)\nonumber \\&\quad (2\,\xi ^{\prime \prime }+2\,\beta \,h^{\prime \prime }+\xi ^{\prime 2}+\beta ^2\,h^{\prime 2}+2\,\beta \,\xi ^{\prime }\,h^{\prime }). \end{aligned}$$
(53)

The above Eq. (53) generalizes, all known spherically symmetric embedding class I solutions in the context of extended gravitational decoupling via a extended geometric deformation (EGD) approach. It is observed that Eq. (53) can be written either as a first order non-linear ordinary differential equation (ODE) for f(r) or as a second-order non-linear ODE for h(r). Besides, it is possible to generalize some previously known embedding class I solutions (an almost complete list of such solutions can be found in [21]) through this scheme. However, there are exceptions with some solutions which have a fairly complex geometry. So the differential equation (53) cannot be solved analytically.

5 Physical conditions of the anisotropic stellar object

The viability of any stellar compact object, describing a realistic stellar structure such as neutron stars, must satisfy some physical and mathematical requirements [67]

  • The gravitational functions, namely \(e^{\nu (r)}\) and \(e^{\lambda (r)}\) must be positive, finite, free from singularities, and monotone increasing functions with increasing r. Also, \(e^{\nu (r)}\) and \(e^{\lambda (r)}\) must satisfy \(e^{\nu (0)}>0\) and \(e^{\lambda (0)}=1\).

  • In considering the main thermodynamic variables namely \(\{\rho , p_{r}, p_{t}\}\), it is desirable that they are positive everywhere within the stellar interior for the stability reasons. Since we are within a classicalFootnote 3 context, then the condition of positivity must be strictly fulfilled for \(\rho \), not for \(p_{r}\) and \(p_{t}\). However, the presence of negative pressure inside the system can be also allowed [69]. Besides, the presence of this negative pressure leads to the appearance of unstable states. Clearly, these states would impair the hydrostatic balance of the system.

  • The behavior of the thermodynamic observables, should be monotonically decreasing one i.e., they keep their maximum value at the center of the stellar model and their minimum at the boundary.

  • The radial and tangential pressures, must be matched at the center. On the other hand, on the surface, the radial pressure must vanish (this condition is not necessary to be fulfilled for the tangential pressure).

  • Within the compact stellar structure, the subliminal sound velocities of the fluid in the principal directions i.e., along the radial and tangential directions, must be less than the speed of light \(c=1\), in order to satisfy causality condition. Mathematically it can be denoted as: \(0\le v^{2}_{r}=\frac{dp_{r}}{d\rho }<1\) and \(0\le v^{2}_{t}=\frac{dp_{t}}{d\rho }<1\).

  • The energy–momentum tensor has to fulfill simultaneously the following conditions: DEC: \(\rho -p_{r}\ge 0\) and \(\rho -p_{t}\ge 0\), and SEC: \(\rho +p_{r}+2p_{t}\ge 0\).

6 Extended gravitational decoupling solution via embedding class I generator f(r)

Determining the solution of an ordinary first-order differential equation is usually easier than finding a solution of a second-order differential equation. Therefore, we will solve the Eq. (53) for f(r) by specifying a well-motivated ansatz for h(r). The Eq. (53) can be written in the following form

$$\begin{aligned}&\frac{df}{dr}+\frac{f\,(1-2\mu -\beta \,f)\,\{2 (\xi ^{\prime \prime } +\beta \,h^{\prime \prime }) + (\xi ^{\prime }+\beta \,h)^2\}}{(\xi ^{\prime }+\beta \,h)}\nonumber \\&\quad =\frac{\mu ^{\prime }\,(\xi ^{\prime }+\beta \,h) + \mu \,(1 - \mu )\,\{2\,(\xi ^{\prime \prime } +\beta \,h^{\prime \prime }) + (\xi ^{\prime }+\beta \,h)^2\} }{\beta \,(\xi ^{\prime }+\beta \,h)}.\nonumber \\ \end{aligned}$$
(54)

The above Eq. (54) is called a generating equation in f(r) (known as an embedding class I generator of the system induced by EGD approach) describing all possible solutions for the present self-gravitating system. In principle, it is not a trivial task to integrate the above first order non-linear differential equation (54) in f(r) for all kind of \(\xi (r)\), \(\mu (r)\) in conjunction with h(r), otherwise, a numerical approach must be adopted. Nevertheless, it might be possible to solve exactly this equation for a particular choice of \(\xi (r)\), \(\mu (r)\) and h(r). On the other hand, we must choose the \(\xi \) and \(\mu \) based on the facts proposed by [68, 70, 71] i.e., the gravitational potential \(\xi (r)\) must satisfy \(\xi (0)=\) finite and constant, \(\xi ^{\prime }(0)=0\) and \(\xi ^{\prime \prime }(0)>0\) for any realistic model. Moreover, the radial pressure and the energy density should be non-negative and continuous inside the stellar model, then it follows that \(r>2\,m(r)\) [72, 73]. So, \(p_r \ge 0\) with \(r>2\,m(r)\) leads to \(\xi ^{\prime }(0)\ne 0\). From all constraints of \(\xi (r)\) in the said discussion, we observe that generic function \(\xi (r)\) must be increasing monotonically function of r, and should attain its minimum at the centre of the stellar model. On the other hand, we should ensure that the gravitational potential \(\mu \) for the radial component must be of the form \(\mu =1+O(r^2)\) near at \(r=0\). Therefore, by keeping all the above points in our mind we have chosen the following simple embedding class I space–time as seed solution (\(\beta =0\)) as,

$$\begin{aligned} ds^2= & {} -(1+Ar^{2})\,dr^2-r^2\,(d\theta ^2+\sin ^2\theta \,d\phi ^2)\nonumber \\&+\,(B+C\,r^2)^2\,dt^2, \end{aligned}$$
(55)

where \(\mu (r)=(1+Ar^2)^{-1}\), \(\xi (r)=2\,\ln \left[ B+Cr^{2}\right] \), and the corresponding thermodynamic observables like pressures and density are given by

$$\begin{aligned} \hat{p}_{r}= & {} \frac{4C-C\,A\,r^{2}-B\,A}{8\pi \left( Cr^{2}+B\right) \left( Ar^{2}+1\right) }, \end{aligned}$$
(56)
$$\begin{aligned} \hat{p}_{t}= & {} \frac{4C+CAr^{2}-B\,A}{8\pi \left( Cr^{2}+B\right) \left( Ar^{2}+1\right) ^{2}}, \end{aligned}$$
(57)
$$\begin{aligned} \hat{\rho }= & {} \frac{A\left( Ar^{2}+3\right) }{8\pi \left( Ar^{2}+1\right) ^{2}}, \end{aligned}$$
(58)

and the corresponding mass function \(m_0(r)\) is given by,

$$\begin{aligned} {m_0(r)} \equiv {4\pi }\int _0^r{\rho \,r^2\,dr}=\frac{Ar^3}{2(1+Ar^2)}, \end{aligned}$$
(59)

where the constants A and C have units of \([\text {length}]^{-2}\) and B is dimensionless. Now we need to solve the embedding class I generating Eq. (54) for determining the components of the \(\theta \)-sector. For this purpose, we specify a particular form of h(r), specifically \(h(r)=D\,r^2\). This choice is physically motivated and simple, since it is zero at the centre and increasing function with r. By plugging h(r), \(\nu (r)\) and \(\lambda (r)\) into Eq. (54) we get,

$$\begin{aligned}&\frac{df}{dr}-\frac{4\,\beta \,f\,(1 + A r^2)\,f_1(r)\,[1 - A r^2 + b\, f\, (1 + A r^2)]}{\beta \, r\, (1 + A r^2)^2 [2\,C + \beta \,D\,(B + C r^2)]} \nonumber \\&\quad =\frac{2 A r^2\, [2 C+ \beta \,D\,(B + C r^2)] - f_2 (r)}{\beta \, r\, (1 + A r^2)^2 [2\,C+ \beta \,D\,(B + C r^2)]}. \end{aligned}$$
(60)

where,

$$\begin{aligned} f_1 (r)= & {} [2 C + \beta ^2\,D^2 r^2 (B + C r^2) +\beta \, D \, (B + 5 C r^2)],\\ f_ 2 (r)= & {} 2 A r^2 [2 C + \beta ^2\,D^2 r^2 (B + C r^2) + \beta \,D\, (B + 5 C r^2)]. \end{aligned}$$

The above Eq. (60) is a first order non-linear differential equation in f(r), which can be integrated in closed form only if \(\beta =1/2\), otherwise we will get a complex solution. Therefore, after integrating Eq. (60) by taking \(\beta =1/2\), we obtain

$$\begin{aligned} f(r)=\frac{-2\,r^2\,\big \{D\,e^{\frac{Dr^2}{2}}(B+Cr^2)\,[8C + D(B + C r^2)] + 2 A F+16C^2\,e^{\frac{Dr^2}{2}}\big \}}{(1+Ar^2)\,\big \{Dr^2\,e^{\frac{Dr^2}{2}}(B+Cr^2)\,[8C + D(B + C r^2)] - 2 F+16C^2r^2\,e^{\frac{Dr^2}{2}}\big \}}, \end{aligned}$$
(61)
Fig. 1
figure 1

The trend of decoupler function f(r) versus radial coordinate r/R. The different curves describe the following compact objects namely the red curve (solid) for 4U 1538-52, black curve (long-dashed) for SAX J1808.4-3658, green color (small-dashed) for SMC X-1, vermilion color (dot-dashed) for LMC X-4. We have chosen \(D=0.0022\) and \(A=0.0031\) for plotting of these curves with different compactness as 0.1355, 0.1384, 0.15 and 0.1682 corresponding to compact objects 4U 1538-52, SAX J1808.4-3658, SMC X-1 and LMC X-4, respectively

where F is an integration constant with units of \([\text {length}]^{2}\). We would like to mention that the signature of the deformation function f(r) and coupling constant \(\beta \) plays an important role to decide the behavior of the metric function \(e^{\lambda (r)}\) given by Eq. (3). Since the metric function \(e^{\lambda (r)}\) must be increasing function within the star, in order to preserve the increasing behavior of the mass function. Therefore, f(r) should satisfy some constraints

  1. 1.

    \(f(r)>0\) (increasing function) and \(\beta >0\): In this situation, the growth of \(\mu (r)\) must be faster than the decoupler function f(r), in order to keep \(e^{\lambda (r)}\) and the mass function m(r) positive and increasing for all \(r\in [0,R]\).

  2. 2.

    \(f(r)<0\) (decreasing function) and \(\beta >0\): In this scenario, the metric function \(e^{\lambda (r)}\) will increase throughout the compact object.

  3. 3.

    \(f(r)>0\) (increasing function) and \(\beta <0\): In order to preserve the increasing behaviour of \(\nu (r)\), the growth of \(\xi (r)\) must be faster than the growth of h(r), however the function \(e^{\lambda (r)}\) and mass function m(r) will increase automatically.

  4. 4.

    \(f(r)<0\) (decreasing) and \(\beta <0\): In this case, the growth of \(\xi (r)\) and \(\mu (r)\) must be faster than the growth of h(r) and f(r), respectively.

Based on the above points, first we plot the deformation function f(r) in Fig. 1 to see its behavior. From this Fig. 1, we observe that the deformation function f(r) is negative and decreasing. Since \(\beta =1/2\) is positive and temporal deformation function h(r) is already positive and increasing.

Therefore, according to the above discussion it is suitable to describe a realistic model. Now, the embedding class I solution in the framework of extended gravitational decoupling by EGD approach can be given by the following line element,

$$\begin{aligned} ds^2= & {} - \bigg (\frac{(1+Ar^2)}{1+\beta \,(1+Ar^2)f(r)}\bigg ) dr^2\nonumber \\&-r^2(d\theta ^2+\sin ^2\theta \,d\phi ^2)+(B+Cr^2)\,e^{\beta \,Dr^2}\,dt^2.\nonumber \\ \end{aligned}$$
(62)

From the above Eq. (62), it is obvious that gravitational potential \(\nu (r)\) is positive, increasing and free from singularity, although we need to see the variation of potential \(\lambda (r)\) of the Eq. (62). For this purpose we plot the Fig. 2 for \(e^{\lambda (r)}\) and observe that it is 1 at the centre and increasing throughout within the stellar object. Now using Eqs. (18), (29) together with Eq. (59), the mass function m(r) for EGD can be given as,

$$\begin{aligned} m(r)=\frac{Ar^3}{2(1+Ar^2)}-\frac{\beta \,r}{2}\,f(r). \end{aligned}$$
(63)

As can be seen, we have generalised the seed mass \(m_0(r)\) through the gravitational decoupling because the constant \(\beta \) is positive and the deformation function f(r) is negative throughout the stellar interior, and then this extra piece \(m_\beta (r)\) will increase the total mass M of the object.

Fig. 2
figure 2

The trend of metric function \(e^{\lambda (r)}\) versus radial coordinate r/R. We have described same set of values for different curves as motioned in Fig. 1

Next, we determine the expressions for components of \(\theta \)-sector namely \(\theta ^t_t\), \(\theta ^r_r\) and \(\theta ^\varphi _\varphi \) as

$$\begin{aligned} \theta _t^t(r)= & {} 2\,(2 (8 C^2 e^{\frac{Dr^2}{2}} + A F) (B + 5 C r^2) + D^2 e^{\frac{Dr^2}{2}} \\&(B + C r^2)^2 (B + 5 C r^2) + 2 D (B + C r^2) (4\, B\, C\\&e^{\frac{Dr^2}{2}} + F + 20 C^2 e^{\frac{Dr^2}{2}} r^2 + A F r^2)) /(8\pi \,(1 + A r^2) \\&(B + Cr^2) ( e^{\frac{Dr^2}{2}} r^2 [4 C + D (B + C r^2)]^2-2 F)), \\ \theta ^r_r(r)= & {} 2(D^4\,e^{{Dr^2}} r^2 (-1 + A r^2) (B + C r^2)^4 + 2 D^3 e^{\frac{Dr^2}{2}}\,\\&\,r^2\, (B + C r^2)^2\,\{8 B C e^{\frac{Dr^2}{2}} (A r^2-1) + 8 C^2 e^{\frac{Dr^2}{2}}\\&r^2 (A r^2-1) + F \,(1 + A r^2)^2\}+4\, \{64\,C^4\, e^{{Dr^2}} r^2 \\&( A r^2-1) + A\, F^2\, (3 + A r^2) + 8\, C^2\,e^{\frac{Dr^2}{2}}\, \\&F\, (3+A^2\, r^4)\}+16\, D\,C e^{\frac{Dr^2}{2}} \{B\, [16\, C^2 e^{\frac{Dr^2}{2}} r^2 (A r^2{-}1) \\&+ F (3 + A^2 r^4)] + C r^2 [16\,C^2\, e^{\frac{Dr^2}{2}} r^2 (A r^2-1) + \\&F (7 + 8 A r^2 + 5\, A^2 r^4)]\}+2\, D^2\, e^{\frac{Dr^2}{2}} (B + C r^2)\, \\&\{B\,[48\, C^2\, e^{\frac{Dr^2}{2}} r^2 (A r^2-1) + F (3 + A^2 r^4)] \\ \end{aligned}$$
$$\begin{aligned}&\qquad +C r^2 [48\,C^2\,e^{\frac{Dr^2}{2}}\,r^2 \,(A r^2-1) + F\, (15 + 24\, A r^2 \\&\qquad + 13 \,A^2 r^4)]\}) /(8\pi \,(1 + A r^2)^2\,(2\, F - e^{\frac{Dr^2}{2}}\,r^2 \,\{4 C \\&\qquad + a (B + Cr^2)\}^2). \\ \end{aligned}$$
$$\begin{aligned} \theta ^{\varphi }_\varphi= & {} \frac{1}{32\pi (1 + A r^2)^2 (B + C r^2)}[\{4 \,D \,A\, r^2\, (B + C r^2) \\&-2 D (1 + A r^2) \,[8 C r^2 + (4 + 3 D r^2) \,(B + C r^2)]\\&- f(r)\, (1 + A r^2)^2 \,[16 C + D^2 \,r^2\, (B + C r^2) \\&+ 4 D (B + 3 C r^2)]\}-\theta ^{\varphi 0}_{\varphi 0}] \end{aligned}$$

where,

$$\begin{aligned} \theta ^{\varphi 0}_{\varphi 0}= & {} \frac{4 [B (2 + D r^2) + C r^2 (6 + D r^2)](1 + A r^2)^{-2}}{4 (B + C r^2) \left( e^{\frac{Dr^2}{2}} r^2 [4 C + D (B + C1 r^2)]^2-2 F\right) ^2} \\&\,\left\{ D^4 A e^{D r^2} r^4 (B + C r^2)^4 + D^3 e^{\frac{Dr^2}{2}} r^2 (B + C r^2)^2 \right. \\&[F (1 + A r^2)^2 + 16 A C e^{\frac{Dr^2}{2}} r^2 (B + C r^2)]+4 [A F^2 \\&\left. + 64 A C^4 e^{D r^2} r^4 + 8 C^2 e^{\frac{Dr^2}{2}} F (1 + A^2 r^4)]+\theta ^{\varphi 1}_{\varphi 1}\right\} ;\\ \theta ^{\varphi 1}_{\varphi 1}= & {} 16 D C e^{\frac{Dr^2}{2}} [B (F + 16 A C^2 e^{\frac{Dr^2}{2}} r^4 + A^2 F r^4) + C r^2 \\&\{16 A C^2 e^{\frac{Dr^2}{2}} r^4 + F (3 + 4 A r^2 + 3 A^2 r^4)\}]+2 D^2 \\&e^{\frac{Dr^2}{2}} (B + C r^2) [B (F + 48 A C^2 e^{\frac{Dr^2}{2}} r^4 + A^2 F r^4) \\&+ C r^2\{48 A C^2 e^{\frac{Dr^2}{2}} r^4 + F (7 + 12 A r^2 + 7 A^2 r^4)\}]. \end{aligned}$$

Then, the effective physical quantities like pressures, \(({p}_r)\) and \(({p}_t)\), density (\({\rho }\)), and pressure anisotropy \(({\varDelta })\) for the energy–momentum tensor \({T}_{ij}\) can be given as,

$$\begin{aligned} {p}_{r}(r)= & {} \frac{4C-C\,A\,r^{2}-B\,A}{8\pi (Cr^{2}+B) (Ar^{2}+1)}-\beta \,\theta ^r_r, \end{aligned}$$
(64)
$$\begin{aligned} {p}_{t}(r)= & {} \frac{4C+CAr^{2}-B\,A}{8\pi (Cr^{2}+B) (Ar^{2}+1)^{2}}-\beta \,\theta ^\varphi _\varphi \end{aligned}$$
(65)
$$\begin{aligned} {\rho }(r)= & {} \frac{A (Ar^{2}+3)}{8\pi (Ar^{2}+1)^{2}}+\beta \,\theta ^t_t, \end{aligned}$$
(66)
$$\begin{aligned} {\varDelta }(r)= & {} \frac{A r^2\, (-2 C + A B +A C\, r^2)}{8\pi \,(1 + A r^2)^2 (B + C r^2)}+\beta \,(\theta ^r_r-\theta ^\varphi _\varphi ). \end{aligned}$$
(67)

Now, to determine the constants, we use the junction conditions (44) and (45) with coupling constant \(\beta =1/2\), yielding to

$$\begin{aligned}&4\,\ln (B+C\,R^2)+D\,R^2=2\,\ln \left( 1-\frac{2M}{R}\right) , \end{aligned}$$
(68)
$$\begin{aligned}&\frac{-R^2\,\left\{ D\,e^{\frac{DR^2}{2}}(B+CR^2)\,[8C + D(B + C R^2)] + 2 A F+16C^2\,e^{\frac{DR^2}{2}}\right\} }{(1+AR^2)\,\left\{ DR^2\,e^{\frac{DR^2}{2}}(B+CR^2)\,[8C + D(B + C R^2)] - 2 F+16C^2R^2\,e^{\frac{DR^2}{2}}\right\} } +\frac{1}{(1+AR^2)}=1-\frac{2M}{R}. \end{aligned}$$
(69)

Then from Eqs. (68) and (69) together with second fundamental form (52), we have determined the values of the constants B, C and F (which are necessary to describe the complete structure of the stellar model) as,

$$\begin{aligned} B= & {} \frac{e^{\frac{-DR^2}{2}}}{4 R (R-2 M )}\, \bigg \{-\sqrt{e^{\frac{DR^2}{2}}\, M^2\,R (R-2 M)} + e^{\frac{DR^2}{4}}\,\nonumber \\&\sqrt{1 - \frac{2M}{R}}\, R\,(-9 M + 4 R - 2 D M R^2 + D R^3)\bigg \}, \end{aligned}$$
(70)
$$\begin{aligned} C= & {} \frac{e^{\frac{-DR^2}{2}}}{4\,R^3\, (R-2 M)}\bigg \{\sqrt{e^{\frac{DR^2}{2}}\,M^2\,R\,(R-2 M)}\nonumber \\&-e^{\frac{DR^2}{4}}\,\sqrt{1-\frac{2M}{R}}\, R\,[D\,R^3-M\,(1 + 2 D R^2)]\bigg \}, \end{aligned}$$
(71)
$$\begin{aligned} F= & {} \frac{e^{\frac{-DR^2}{4}}\,}{2\,(2 M - R)\,R^3}\,\bigg \{ \sqrt{1-\frac{2M}{R}}\,\sqrt{ e^{\frac{DR^2}{2}}\, M^2\, R \,(R-2 M)} \nonumber \\&+M\,(R-2 M)\,e^{\frac{DR^2}{4}}\, \bigg \}. \end{aligned}$$
(72)

The variation of pressures (\(p_r\) and \(p_t\)), density (\(\rho \)) and anisotropy factor (\(\varDelta \)) are shown in Figs. 3 and 4.

6.1 Causality and hydrostatic equilibrium

In order to fulfill the physical requirements for realistic models, it is necessary to examine the causality and hydrostatic equilibrium of the present self-gravitating system. First, we discuss the causality condition of the model which says that the velocity of sound must be less than the velocity of light everywhere within the object. Mathematically we can write as \(0<v^2_r=\frac{dp_r}{d\rho } < 1\) and \(0<v^2_t=\frac{dp_t}{d\rho }<1\), where \(v^2_r\) and \(v^2_t\) represent the square of radial and tangential velocity, respectively. As we can see from Fig. 5, both \(v^2_r\) and \(v^2_t\) are less than the speed of light (\(c=1\)) and decreasing throughout the structure. Moreover, the radial velocity dominates the tangential one at each point inside the object. Therefore, it is necessary to analyze whether the given model is stable or not. To examine this situation, we use Abreu’s criteria [74] which was initially created by Herrera, namely Herrera cracking concept [43]. The Abreu’s criterion for the stability analysis of compact objects states that the model is stable if \( 0< v^{2}_{r}-v^{2}_{t}< 1\) while \(-1< v^{2}_{r}-v^{2}_{t}< 0\) provides the unstable regions. From the Fig. 5 it is clear that our anisotropic model is stable.

Fig. 3
figure 3

The behavior of the radial pressure (\(p_r\)) tangential pressure (\(p_t\)), and energy density (\(\rho \)) versus radial coordinate r/R. The different curves describe the following compact objects namely the red curve (solid) for 4U 1538-52, black curve (long-dashed) for SAX J1808.4-3658, green color (small-dashed) for SMC X-1, vermilion color (dot-dashed) for LMC X-4

On the other hand, the analysis related to the hydrostatic equilibrium under different forces can be analyzed by following modified Tolman–Oppeneheimer–Volkoff (TOV) equation,

$$\begin{aligned}&\hat{p}_r^{\prime } + \frac{\xi ^{\prime }}{2} (\hat{p}_r + \hat{\rho })-\frac{2(\hat{p}_t-\hat{p}_r)}{r} -\beta \left[ (\theta ^{r}_{r})^{\prime } + \frac{1}{2}\nu ^{\prime } (\theta ^{r}_{r}-\theta ^{t}_{t} )\right. \nonumber \\&\quad \left. + \frac{2}{r} (\theta ^{r}_{r}-\theta ^{\varphi }_{\varphi })-\frac{h^{\prime }}{2}\,(\hat{p}_r+\hat{\rho })\right] =0. \end{aligned}$$
(73)

The equilibrium equation can be spread into three different forces namely: the hydrostatic \(F_{h}\), the gravitational \(F_{g}\) and the anisotropic \(F_{a}\) forces in order to achieve this hydrostatic balance. Moreover, the explicit form of these forces can be written as

$$\begin{aligned} F_g= & {} -\frac{\nu ^{\prime }}{2}\,(\hat{p}_r+\hat{\rho }-\beta \,\theta ^r_r+\beta \,\theta ^t_t)=-\frac{\nu ^{\prime }}{2}\,({p}_r+{\rho }), \end{aligned}$$
(74)
$$\begin{aligned} F_h= & {} -\hat{p}_r^{\prime }+\beta \,({\theta }^r_r)^{\prime }=-p_r^{\prime }, \end{aligned}$$
(75)
$$\begin{aligned} F_a= & {} \frac{2(\hat{p}_t-\hat{p}_r)}{r}+\beta \,\frac{2(\theta ^r_r-\theta ^\varphi _\varphi )}{r}=\frac{2({p}_t-{p}_r)}{r}. \end{aligned}$$
(76)

It is important to note that the well-known TOV equation [128, 129] in the context of standard relativistic anistropic self-gravitating system can be recovered, if \(\beta =0\).

Fig. 4
figure 4

The trend of the anisotropic factor (\(\varDelta \)) versus radial coordinate r/R. The description and numerical values for the free parameters are same as used Fig. 3

Fig. 5
figure 5

The trend of the square of radial velocity \((v^2_r)\) (solid curves) and tangential velocity \((v^2_r)\) (dashed curves) versus radial coordinate r/R. The description and numerical values for the free parameters are same as used Fig. 3

From Fig. 6, it is clear that the anisotropic system is in equilibrium under the said forces. As mentioned before, the anisotropic force is repulsive in nature, then the gravitational force is counterbalanced by the joint action of the hydrostatic and anisotropic forces. This avoids the system to collapse below its Schwarzschild radius onto a point singularity. Moreover, it is noted that the anisotropic force dominates the hydrostatic one after some points inside the stellar model which is showing that local anisotropies have a majority role in the balance of the stellar configuration.

Fig. 6
figure 6

The trend of the different forces versus the radial coordinate r/R. Top left and top right figures for 4U 1538-52 and SAX J1808.4-3658, respectively while bottom left and bottom figures represent corresponding to compact objects for SMC X-1, and LMC X-4. For plotting of the above figures, we have chosen the same values of free parameters as used in Fig. 5

7 The compactness factor and surface red-shift

In this section, we discuss the influences induced by extended gravitational decoupling by EGD approach on the compactness factor \(u=\frac{m(r)}{r}\) within the stellar interior. In order to provide a detailed explanation, we proceed through the mass function in the EGD case as defined by Eq. (41). In the present situation, the constant \(\beta \) is positive while deformation function f(r) is negative and decreasing outward. Therefore, the mass function in EGD scenario will dominate the mass function in GR case, which can be clearly observed from Fig. 7.

Fig. 7
figure 7

The trend of the compactness \(u=m(r)/r\) versus the radial coordinate r/R. Each figure is showing the comparison between GR+EGD and pure GR scenario for different compact objects. Top left and top right figures for 4U 1538-52 and SAX J1808.4-3658, respectively while bottom left and bottom figures represent corresponding to compact objects for SMC X-1, and LMC X-4. For plotting of the above figures, we have chosen the values of free parameters as \(D=0.0022\) and \(A=0.0031\)

Now the surface red-shift function of the compact star model can be given by the following formula

$$\begin{aligned} z_s=\frac{1}{\sqrt{\big \{1-2\,u(r)\big \}}}-1,~~ \text {where}~~u(r)\equiv \frac{m(r)}{r}. \end{aligned}$$
(77)
Fig. 8
figure 8

The trend of the surface redshift function \(z_s\) versus r. The different curves describe the following compact objects namely the red curve (solid) for 4U 1538-52, black curve (long-dashed) for SAX J1808.4-3658, green color (small-dashed) for SMC X-1, vermilion color (dot-dashed) for LMC X-4. For plotting of this figure, we have used same data set of values as used in Fig. 7

It is well-known that the impact of anisotropies on the surface red-shift \(z_s\) has been widely discussed by several authors. Bowers and Liang [33] proposed a hypothetical model having a constant density \(\rho =\rho _{0}\) (incompressible fluid) with a particular choice of the anisotropy factor \(\varDelta \) and they determined that the surface red-shift can reach its maximum value up to \(z_{s}=4.77\) when \(\varDelta =0\). In addition to above, the investigation, Ivanov [77] pointed out that the maximum value of the surface red-shift can be \(z_{s}=3.842\) if the aniso- tropic star model (without cosmological constant) satisfies the strong energy condition (SEC) with mass–radius ratio 0.957, while for models obeying the dominant energy condition (DEC) having a mass–radius ratio 0.974 reach up to \(z_{s}=5.211\) [36]. In this case, the surface red-shift function is depicted in Fig. 8. As it is observed, \(z_{s}\) is increasing with r and attains its maximum value at the boundary. It is interesting to note that the growth of the surface red-shift function, is faster corresponding to the compact star having less value of the compactness factor. On the other hand, from Table 1 one can see that the surface red-shift value is increasing with an increasing compactness factor. This implies that the surface red-shift cannot be arbitrarily large due to the boundedness of the compactness factor, which means that any massive realistic compact object must satisfy the Buchdhal limit i.e. \(\frac{M}{R}<\frac{4}{9}\) [75]. So, based on the above discussion the surface red-shift for extended gravitational decoupling model will be more than the pure GR model due to the compactness factor in the GR+EGD scenario is greater than the mass–radius ratio in the pure GR case (Fig. 7).

Table 1 The numerical values of constant parameters B, C and F with \(A=0.0031\; (\text {km}^{-2})\), \(D=0.0022\; (\text {km}^{-2})\), and \(\beta =0.5\), where \(M_{\odot }=1.475\) km
Table 2 The numerical values of central pressure, central density and surface density for the different compact objects with the same values of constant parameters \(A=0.0031\, (\text {km}^{-2})\), \(D=0.0022\, (\text {km}^{-2})\), and \(\beta =0.5\), where \(M_{\odot }=1.475\) km

8 Discussion and conclusion

In the present article, we have developed a generating scheme to obtain solutions of Einstein field equations for modelling compact stars. To achieve it, we have employed the embedding class I generator, induced by an extended gravitational decoupling via Extended geometric deformation (EGD) approach. In general this systematic approach can be summarized as follows:

  1. 1.

    First, we define the modified energy–momentum tensor \(T_{ij}\), which is a combination of two sources namely \(\hat{T}_{ij}\) and \(\theta _{ij}\). Here \(\hat{T}_{ij}\) is the energy–momentum tensor for the standard anisotropic matter distribution while \(\theta _{ij}\) denotes an extra energy–momentum tensor that is coupled to \(\hat{T}_{ij}\) via a dimensionless coupling parameter \(\beta \).

  2. 2.

    Next, we write Einstein field equations for a spherically symmetric line element (with metric functions \(e^{\lambda (r)}\) for the \(r-r\) component and \(e^{\nu (r)}\) for the \(t-t\) component) subject to \(T_{ij}\).

  3. 3.

    Then, we split the resulting system of equations into two subsystems, by using the following transformations \({\nu (r)} \mapsto \xi (r)+\beta \,h(r)\) and \(\text {e}^{-\lambda (r)} \mapsto \mu (r)+\beta \, f(r)\), where f(r) and h(r) denote the radial and temporal deformation functions, respectively. In this way, the first subsystem is called the Einstein system (which corresponds to set \(\beta =0\)) corresponding to matter distribution \(\hat{T}_{ij}\) and second subsystem corresponding to \(\theta \)-sector is known as a quasi-Einstein system.

  4. 4.

    Now, in order to solve these systems, the embedding class I condition (38) is adopted. After plugging the transformations given by Eq. (3) into (38), we arrive to a non-linear differential equation (53) in terms of the unknown functions \(\nu (r)\), \(\lambda (r)\), f(r) and h(r). The Eq. (53) is a generating equation that can generalize any known embedding class I seed solution corresponding to compact star models, by taking a compatible ansatz for anyone generator f(r) or h(r). Nonetheless, in general, to obtain the solution of a second-order non-linear differential equation is more difficult than the first order. So, in this case, we solved a first-order non-linear in f(r), choosing a known embedding class I seed solution and a particular ansatz for h(r). It is worth mentioning that the equation can be solved in closed form only for \(\beta =1/2\).

For this specific model, we have obtained a negative and decreasing deformation function f(r) (see Fig. 1). Nonetheless, its behavior does not damage the monotonic increasing behavior of the \(e^{\lambda (r)}\) metric potential. In effect, as can be appreciated from Fig. 2, the radial metric potential behaves as desired. Then, we can conclude that the resulting function f(r) is physically viable. So, the output model constitutes a generalized embedding class I space–time solution, driven by an anisotropic matter distribution, represented by the energy–momentum tensor \(T_{ij}\).

In considering the thermodynamic observables, namely effective radial pressure (\(p_r\)), effective tangential pressure (\(p_t\)) and effective energy density (\(\rho \)), they are shown by Figs. 3 and 4, respectively. It is clear from both figures that the radial pressure, tangential pressure and energy density behaviors are positively, well-defined and decreasing inside the stellar configuration, as well as both pressures are equal at the centre. Moreover, all the above physical quantities are attaining their maximum values at the center of the structure and reaching their minimum values at the boundary \(r=R\) of the stellar configuration. The variation of the anisotropy factor \(\varDelta \) is presented in Fig. 4. As it is observed, the trend of these curves show that the anisotropy is directed outward at all points within the object, i.e. \(\varDelta (r)>0\) for \(0<r\le R\). The said features of the model indicate the physical validity of the solutions.

Another important analysis, concerns the so-called causality condition. For this purpose, we have plotted both \(v^2_r\) and \(v^2_t\) in Fig. 5. From this figure, it is clear that \(v^2_r\) and \(v^2_t\) are less than the speed og light (\(c=1\)) and decreasing throughout the stellar model. Moreover, as can be seen, \(v^2_r\) dominates \(v^2_t\) at each point inside the model. Therefore, according to Herrera’s cracking concept as well as Abreu’s criteria [74], the obtained solution is stable against radial perturbations introduced by local anisotropies. Besides, the stability of the model is quite involved with the hydrostatic balance of the stellar system. In order to verify it, we have used the modified Tolman–Oppenheimer–Volkoff (TOV) equation (75). In this case the TOV equation is composed by three forces namely \(F_{g}\), \(F_h\) and \(F_a\) (given by Eqs. (74)–(76)) As Fig. 6 illustrates, the \(F_g\) is balanced by combining \(F_h\) and \(F_a\), what is more the sum of all these components is zero i.e. \(F_g+F_h+F_a=0\), which shows that the equilibrium of the system is achieved.

From the observational point of view, two very important quantities are the mass–radius ratio and the surface red-shift. As it is well-known, these two quantities are quite involved and help to determine valuable information of stellar bodies. In this regard, we have explored the incidence of the extended gravitational decoupling by EGD on these important quantifiers. From Fig. 7, we notice that the compactness for the GR+EGD model is more than in the pure GR scenario, what is more each star model is satisfying the Buchdhal limit. Consequently, the surface red-shift will be greater in the context of GR+EGD than in the case of pure GR. The Fig. 8 shows that the growth of the surface red-shift function, is faster for those stars having less value of the compactness factor.

To confirm and contrast the previous discussion, we have obtained the numerical data of the physical parameters, reported in Table 1. To obtain this information, the following procedure has been used: Since the system has only three free constant parameters namely R, M and D, therefore in order to determine the values of all physical quantities, the constant D and mass M (corresponding to real compact objects) are fixed. After that, the radius R has been fitted in such way that the model must satisfy all the physical and mathematical requirements of the solution. It should be noted that, the obtained radii matches closely with the values reported in M–R curve as proposed by Demorest et al. [133]. By using this information and with the help of Eq. (77), the surface red-shift and the compactness factor u were computed. For the present model, we have obtained the following results: \(z_s=0.17121\) for 4U 1538-52, \(z_s=0.17590\) for SAX J1808.4-3658, \(z_s=0.19523\) for SMC X-1, and \(z_s=0.22757\) for LMC X-4 (see Table 1). It is remarkable to note that the above values are within the range as proposed in Refs. [76, 77]. Also, we would like to mention that the surface red-shift for the GR+EGD model will be more than the pure GR model because the compactness factor in the GR+EGD case is always larger than the compactness in pure GR scenario. On the other hand, the values of central pressure (\(p_c\)), central density (\(\rho _c\)) and surface density (\(\rho _s\)) in CGS unit for each model is presented in the Table 2. From the Table 2, we see that the density of the model is larger than the nuclear density (\(\rho _N=2.3\times 10^{14}\) g/cm\(^3\)).

Finally, we would like to mention that the present generating scheme via EGD approach is very useful to generalize embedding class I solutions for self gravitating compact objects, within the framework of GR. Moreover, it would be interesting to include new ingredients such as electric charge, or translate the methodology into the context of modify gravity theories such as f(R), f(RT) etc.