1 Introduction

The study of relativistic stellar structure has a history spanning a century, originating from Schwarzschild’s pivotal work in 1916. Schwarzschild presented both the universal vacuum exterior solution and the initial interior stellar solution, aiming to establish a coherent connection between these solutions to describe a star’s entire interior and exterior regions. For a significant period, it was common practice to model the interior of stars as a perfect fluid with equal radial and tangential pressures. Over time, the rising fascination with anisotropic fluids, distinguished by unequal radial and tangential pressures, has been extensively investigated.

Anisotropy, a pivotal characteristic of stellar configurations, assumes a central role in the realistic modeling of stellar systems. The concept of anisotropy was originally postulated by Ruderman [1] and Canuto [2]. It was within the framework of general relativity that Bowers and Liang [3] first reported the presence of anisotropic spheres. Dev and Gleiser [4, 5] subsequently noted that the pressure anisotropy’s components can significantly influence various fundamental properties of highly compact spheres. Recent findings on anisotropy strongly emphasize the necessity of considering a non-zero pressure difference when modeling compact spheres realistically. Various factors, such as the presence of phenomena like 3A super-fluid [6], phase transitions [7], magnetic or strong electromagnetic fields [8, 9], slow rotational motion [10], fluids of different types [11], pion condensation [12], among others, are significant reasons for the emergence of anisotropy in relativistic stellar systems. Recent studies have shown that imposing local isotropy is excessively constraining and can unduly restrict the modeling of self-gravitating objects. Consequently, it is crucial to explore potential approaches for obtaining exact solutions that depict anisotropic fluid distributions. An exhaustive review of anisotropic fluids can be found in [13], which includes a comprehensive list of physical phenomena that could lead to the appearance of pressure anisotropy. However, a recent result has superseded all previous arguments justifying the presence of pressure anisotropy and necessitates its consideration whenever relativistic fluids are involved. Indeed, as shown in [14], physical processes expected in stellar evolution will invariably produce pressure anisotropy, even if the system is initially assumed to be isotropic. It is important to emphasize that any equilibrium configuration is the final stage of a dynamic process, and there is no reason to believe that any acquired anisotropy, regardless of its magnitude, would vanish in the final equilibrium state. Therefore, a resulting configuration, even if initially isotropic, should in principle exhibit pressure anisotropy. No known physical process in collapse scenarios can eliminate the pressure anisotropy that develops during stellar evolution. Consequently, pressure anisotropy is a fundamental and unavoidable characteristic of compact objects rather than an exception.

In a recent study [15, 16], a novel definition of complexity was introduced specifically for spherically symmetric static self-gravitating fluids. This fresh concept of complexity is rooted in the foundational assumption that the lowest complexity in a system corresponds to a fluid distribution characterized by homogeneity in energy density and isotropic pressure. As a result, this distribution is assigned a complexity factor of zero. Complexity has been further expanded to include modified gravity theories within the context of general relativity, as demonstrated in various studies [17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]. The complexity factor, denoted as \(Y_{TF}\), is the candidate for quantifying the level of complexity based on this assumption. It includes contributions from both the variation in energy density and the local anisotropy in pressure. These contributions interact in a highly specific manner, resulting in a zero value for \(Y_{TF}\) in the case of a fluid distribution that is both homogeneous and locally isotropic. Therefore, a state of zero complexity may correspond to a variety of distinct systems. Several authors have obtained interior solutions for compact stars using the vanishing complexity approach in diverse settings [18, 36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57].

The practice of embedding curved geometries into higher-dimensional spaces is a well-established approach for generating diverse, exact solutions of EFEs within astrophysical stellar systems. The class I embedding approach has found extensive use in the quest for exact solutions in fluid distributions [58]. Its key advantage lies in its capability to achieve the embedding of a 4-dimensional Riemannian space into a 5-dimensional Pseudo-Euclidean space. In the context of spherically symmetric space-time, the embedding class one condition establishes a connection between the two metric potentials. This condition is commonly referred to as the Karmarkar condition [59]. Numerous researchers have successfully derived interior solutions for compact stars using the embedding class one approach [60,61,62,63,64,65,66,67,68,69,70,71,72,73]. An interesting property of conformally flat anisotropic spheres is the presence of a vanishing Weyl tensor, as highlighted in [74]. This property also proves to be beneficial for obtaining exact solutions to EFEs. It leads to a connection between the metric potential functions which bears a resemblance to the Karmarkar condition or the case of isotropic spheres. Various solutions related to the conformally flat approach can be found in [75,76,77,78,79,80,81,82,83]. Additional analytical solutions to EFEs for spherically symmetric anisotropic matter using different techniques are available in [84,85,86,87,88,89,90,91,92,93,94,95,96].

In this paper, we thoroughly examine the physical behavior of a model generated through vanishing complexity approach. We ensure that the standard physical requirements, necessary for a star model to be considered physically admissible, are met. Additionally, we conduct stability assessments to guarantee the stability of these models. Moreover, we perform a comparative analysis of the results obtained using the complexity-free approach with those generated by two other established methods, which involve embedding class one and conformally flat symmetry.

The work is structured as follows: the next section explores the equations, variables, conventions, and conditions necessary for handling the system of Einstein equations. Section 3 is dedicated to presenting the boundary conditions required to match the internal spacetime with the surrounding external vacuum region. In Sect. 4, new exact solutions, each with its set of arbitrary constants, are presented through all three previously mentioned approaches. Sections 5 to 9 feature discussions related to geometrical and physical variables, equation of states, as well as stability analysis, for all three different models. Finally, in Sect. 10, a summary of the achieved results is provided, along with concluding remarks in the discussions and conclusions section, emphasizing the key findings.

2 The system of Einstein field equations

The Einstein field equations result from minimizing the Einstein–Hilbert (EH) action concerning the metric tensor. The EH action is defined as:

$$\begin{aligned} S_{EH} = \int \sqrt{-g}~ d^4x \left( \frac{1}{16\pi }~\mathcal {R}+\mathcal {L}_m \right) . \end{aligned}$$
(1)

In this equation: \(\mathcal {R}\) represents the Ricci scalar invariant, defined as \(\mathcal {R} = g^{\mu \eta } \mathcal {R}_{\mu \eta }\). \(\mathcal {L}_m\) denotes the Lagrangian density for matter fields. g is the determinant of the metric tensor, given by \(g = \text {det}[g_{\mu \eta }]\). The relationship between the matter stress-energy tensor \(T_{\mu \eta }\) and the Lagrangian \(\mathcal {L}_m\) is expressed by the equation:

$$\begin{aligned} T_{\mu \eta } = -\frac{2}{\sqrt{-g}} \frac{\delta (\sqrt{-g}~\mathcal {L}_m)}{\delta g^{\mu \eta }}. \end{aligned}$$
(2)

The interior of a relativistic star is described by a Schwarzschild-like line element given as:

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

where, \(e^{\nu (r)}\) and \(e^{\lambda (r)}\) are arbitrary functions serving as the metric potentials, which determine the geometry of the spacetime within the star.

To describe the anisotropic stellar fluid within this model, the energy-momentum tensor \(T_{\mu \eta }\) is given by:

$$\begin{aligned} T_{\mu \eta }= & {} (p_t+\rho )v_{\mu }v_\eta -p_t g_{\mu \eta }+(p_r-p_t)\chi _\mu \chi _\eta . \end{aligned}$$
(4)

In this context, the physical parameters \(\rho \), \(p_r\), and \(p_t\) correspond to the energy density, radial pressure measured in the direction of the spacelike vector, and transverse pressure orthogonal to \(p_r\), respectively.

The EFEs for the metric (3) and the energy-momentum tensor (4), using units where \(G=c=1\), are given as follows:

$$\begin{aligned} 8\pi \rho= & {} \frac{1 - e^{-\lambda }}{r^2} + \frac{\lambda 'e^{-\lambda }}{r}, \end{aligned}$$
(5)
$$\begin{aligned} 8\pi p_r= & {} \frac{\nu ' e^{-\lambda }}{r} - \frac{1 - e^{-\lambda }}{r^2}, \end{aligned}$$
(6)
$$\begin{aligned} 8\pi p_t= & {} \frac{e^{-\lambda }}{4}\left( 2\nu '' + {\nu '}^2 - \nu '\lambda ' + \frac{2\nu '}{r}-\frac{2\lambda '}{r}\right) . \end{aligned}$$
(7)

Here, \((')\) represents differentiation with respect to the radial coordinate r. By using (6) and (7), we can derive the anisotropy measure as follows:

$$\begin{aligned} \Delta= & {} p_t-p_r. \end{aligned}$$
(8)

2.1 Vanishing complexity factor condition (VCC)

The criterion of the vanishing complexity factor condition (VCC) was originally introduced by Herrera within the framework of general relativity [16]. The VCC is based on the definition of the complexity factor given in [16], which is a scalar function intended to measure the degree of complexity of the structure of the fluid. It is expected that such a variable encompasses fundamental aspects of the fluid distribution.

The complexity factor \(Y_{TF}\) for the system described by (3)–(7) can be expressed as

$$\begin{aligned} Y_{TF}= & {} 8 \pi \Pi - \frac{4\pi }{r^3} \int _0^r y^3~\frac{d\rho (y)}{dy} \,dy. \end{aligned}$$
(9)

This serves as a criterion for vanishing complexity. By utilizing the EFEs and the condition given in (9), the expression of anisotropy is obtained as:

$$\begin{aligned} \Delta =-\Pi =p_t-p_r= & {} \frac{1}{2r^3} \int _0^r y^3\frac{d\rho (y)}{dy} \,dy. \end{aligned}$$
(10)

The expression in (10) can be treated as a non-local equation of state that can be employed as a valid criterion for determining the physical parameters while solving the EFEs.

Substituting the expressions of EFEs into (9) yields the vanishing factor \(Y_{TF}\) as

$$\begin{aligned} Y_{TF} = \frac{\nu '(r\lambda '-r \nu ')+2-2r\nu ''}{4re^\lambda }. \end{aligned}$$
(11)

Further, the vanishing complexity factor condition becomes

$$\begin{aligned} \nu '[r(\lambda '-\nu ')+2]-2r\nu ''=0. \end{aligned}$$
(12)

Eq. (12) can be represented as an exact differential equation

$$\begin{aligned} \frac{d}{dr}\left( {\nu \over 2} + \log \nu '-{\lambda \over 2}-\log r \right)= & {} 0. \end{aligned}$$

On integrating the above equation, we get the following relation

$$\begin{aligned} \frac{\nu }{2} + \log \nu '-\frac{\lambda }{2}-\log r= & {} C_1. \end{aligned}$$
(13)

It can also be rewritten as

$$\begin{aligned} \nu ' e^{\nu /2} = C_2\, r\, e^{\lambda /2}, \end{aligned}$$
(14)

where \(C_1\) and \(C_2\) are constants.

The relation (14) between the metric potentials can further be expressed as:

$$\begin{aligned} e^{\nu }=\Big (B+A \int r \,\sqrt{e^{\lambda }}~dr\Big )^2, \end{aligned}$$
(15)

where A and B are integration constants.

2.2 Embedding class-I condition (ECC)

A spacetime belongs to embedding class one if it can be mathematically represented as a hypersurface embedded within a five-dimensional flat space.

The metric (3) describes a spacetime that satisfies the Karmarkar condition [59], expressed as:

$$\begin{aligned} R_{1414}=\frac{R_{1212}R_{3434}+R_{1224}R_{1334}}{R_{2323}}. \end{aligned}$$
(16)

In this notation, (1, 2, 3, 4) correspond to the coordinates \((t, r, \theta , \phi )\), respectively. This condition is applicable to an embedding class I spacetime metric, with the proviso that \(R_{2323}\ne 0\), as mentioned in [59, 97].

The Karmarkar condition, as indicated in (16), gives rise to the following differential equation [98]:

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

After integrating (17), the relationship between \(\nu \) and \(\lambda \) takes the form:

$$\begin{aligned} e^{\nu }=\left( C+D\int _{0}^{r}\sqrt{e^{\lambda }-1}~dr\right) ^2, \end{aligned}$$
(18)

where C and D represent integration constants.

2.3 Conformally flat condition (CFC)

A spacetime is deemed conformally flat when its Weyl tensor is null. The vanishing of the Weyl tensor signifies that the spacetime lacks significant local gravitational tidal effects, and it can be mathematically transformed, in a conformal manner, into a flat spacetime. The conformally flat condition (CFC) has been extensively employed in the modeling of self-gravitating objects due to the crucial role the Weyl tensor plays in the structure of these systems. In spherically symmetric spacetimes, where only one independent component of the Weyl tensor exists, the conformally flat condition reduces to a single equation given by [74]:

$$\begin{aligned} \frac{\nu ^{\prime \prime }}{2}+ \frac{\nu ^{\prime 2}}{4}-\frac{\nu ^{\prime }\lambda ^{\prime }}{4}-\frac{\nu ^{\prime }-\lambda ^{\prime }}{2r}+\frac{1-e^\lambda }{r^2}=0. \end{aligned}$$
(19)

Following Herrera et al. [74], the above equation reduces to

$$\begin{aligned} \frac{\nu ^{\prime }}{2}-\frac{1}{r}= \frac{e^{\lambda /2}}{r} \sqrt{1-c^{2}r^{2}e^{-\nu }}, \end{aligned}$$
(20)

with \(c^{2}=-C_{1}\).

Further integration of (20) leads to the following bridge equation

$$\begin{aligned} e^{\nu }={S}^2r^2\cosh ^{2} \left( \int \frac{e^{\lambda /2}}{r}dr+ T \right) , \end{aligned}$$
(21)

where S and T are constants of integration.

3 Boundary conditions

Celestial objects are typically assumed to occupy a vacuum or nearly vacuum spacetime. At the interface between these spacetimes, it is postulated that appropriate matching conditions hold between the internal spacetime and the surrounding external vacuum region. In this context, the Schwarzschild spacetime offers a well-suited solution for the exterior region defined as

$$\begin{aligned} ds^2= & {} \bigg (1-\frac{2 M}{r}\bigg )\,dt^2-\frac{dr^2}{1-2 M/r} \\ {}{} & {} \quad - r^2 \Bigg (d\theta ^2 +\sin ^2\theta \,d\phi ^2 \Bigg ). \end{aligned}$$

Here, M is the total mass of the object. To ensure the system is continuous over the boundary \(r = R\), we apply the Darmois-Israel-boundary condition, which yields the following two fundamental matching conditions [99, 100]:

$$\begin{aligned} 1-\frac{2 M}{R}= & {} e^{\nu (R)},~~~ \end{aligned}$$
(22)
$$\begin{aligned} 1-\frac{2 M }{R}= & {} e^{-\lambda (R)},~~~ \end{aligned}$$
(23)

and other matching condition we have considered is given by

$$\begin{aligned} p_r(R)= & {} 0. \end{aligned}$$
(24)

These conditions are used to calculate arbitrary constants involved in the solution.

4 Exploration of new exact solutions through three different approaches

To generate the model, we assume a new metric potential for all methods, denoted by \(e^{\lambda }\), specified as:

$$\begin{aligned} e^{\lambda } = 1 - a r^2 + b r^4. \end{aligned}$$
(25)

Here, a and b are constants. The above metric potential (25), approximately matching the well-known Tolman VII metric potential (\(e^{-\lambda } = 1 - \frac{r^2}{R^2} + 4\frac{r^4}{A^4}\)), which is both physically and mathematically motivated. If we expand \(\frac{1}{1 - ar^2 + br^4}\) using a geometric series, we get:

$$\begin{aligned} \frac{1}{1 - ar^2 + br^4}= & {} (1 - ar^2 + br^4)^{-1} \\ {}= & {} 1 + (-ar^2 + br^4) + \cdots . \end{aligned}$$

Approximating the right-hand side of the expression, we arrive at approximately the same metric potential as Tolman VII. Possible physical realizations of the Tolman VII solution can be found in [101]. The solutions to the field equations can be found by employing specific linking equations that establish a bridge between the metric potentials \(e^{\nu }\) and \(e^{\lambda }\). These linking equations, approached through different methods, are discussed in the subsequent subsections.

4.1 Solution via vanishing complexity factor condition (VCC)

Using the value of \(e^{\lambda }\) in Eq. (15), we get the expression \(e^{\nu }\) as

$$\begin{aligned} e^{\nu }= & {} \left( -\frac{A \left( a-2 b r^2\right) \sqrt{1-a r^2+b r^4}}{8 b}-\frac{d_0 A \left( a^2-4 b\right) }{16 b^{3/2}}+B\right) {}^2,\nonumber \\ \end{aligned}$$
(26)

where A and B are integrating constants and

$$\begin{aligned} d_0= & {} \log \left( 2 \sqrt{b} \sqrt{1-a r^2+b r^4}-a+2 b r^2\right) . \end{aligned}$$

Substituting the metric potentials given by Eqs. (25) and (26) into Eqs. (5), (6), and (7),

$$\begin{aligned} \rho= & {} \frac{r^2 \left( a^2+5 b\right) -2 a b r^4-3 a+b^2 r^6}{\left( 1-a r^2+b r^4\right) ^2}, \end{aligned}$$
(27)
$$\begin{aligned} p_r= & {} -\frac{32 A b^{3/2} d_1}{\sqrt{1-a r^2+b r^4}}-\frac{b r^2}{1-a r^2+b r^4}\nonumber \\ {}{} & {} \quad +\frac{a}{1-a r^2+b r^4}, \end{aligned}$$
(28)
$$\begin{aligned} p_t= & {} \frac{d_4-2 \sqrt{b} \left( a^2 A \left( 11 b r^4-1\right) -4 a b d_3+4 b d_2\right) }{d_1 \left( 1-a r^2+b r^4\right) ^{5/2}}, \end{aligned}$$
(29)
$$\begin{aligned} \Delta= & {} p_t-p_r, \end{aligned}$$
(30)

where

$$\begin{aligned} d_1= & {} \frac{1}{2 \sqrt{b} \left( -2 A b r^2 \sqrt{1-a r^2+b r^4}+a A \sqrt{1-a r^2+b r^4}-8 b B\right) +d_0 A \left( a^2-4 b\right) },\\ d_2= & {} A \left( b r^4+1\right) \left( 3 b r^4+4\right) -4 b B r^2 \sqrt{1-a r^2+b r^4},\\ d_3= & {} A r^2 \left( 6 b r^4+7\right) -2 B \sqrt{1-a r^2+b r^4},\\ d_4= & {} \left( d_0 A \left( a^2-4 b\right) \left( a-2 b r^2\right) \sqrt{1-a r^2+b r^4}-2 a^3 A \sqrt{b} r^2\right) . \end{aligned}$$

Evaluation of arbitrary constants

$$\begin{aligned} M= & {} \frac{1}{2} R \left( \frac{1}{a R^2-b R^4-1}+1\right) , \end{aligned}$$
(31)
$$\begin{aligned} A= & {} \frac{\sqrt{2 M-R} \left( a-b R^2\right) }{\sqrt{R} \sqrt{4 a R^2-4 b R^4-4}},\end{aligned}$$
(32)
$$\begin{aligned} B= & {} \frac{\left( k_1+k_2\right) \sqrt{2 M-R}}{32 b^{3/2} \sqrt{R} \sqrt{a R^2-b R^4-1}}, \end{aligned}$$
(33)

where

$$\begin{aligned} k_1= & {} \left( a^2-4 b\right) \left( a-b R^2\right) \log \left( 2 \sqrt{b} \sqrt{1-a R^2+b R^4}\right. \\ {}{} & {} \quad \left. -a+2 b R^2\right) ,\\ k_2&{=}&2 \sqrt{b} \sqrt{1{-}a R^2{+}b R^4} \left( a^2-3 a b R^2+2 b \left( b R^4-8\right) \right) . \end{aligned}$$

The expressions for \(m(r), u(r), z_g(r)\), and \(z_s(r)\) in all the models are evaluated as follows:

$$\begin{aligned} m(r)= & {} \frac{r}{2} \left( 1-\frac{1}{e^{\lambda }}\right) = \frac{r^3 \left( a-b r^2\right) }{2 \left( a r^2-b r^4-1\right) },\end{aligned}$$
(34)
$$\begin{aligned} u(r)= & {} {m(r) \over r} = \frac{r^2 \left( a-b r^2\right) }{2 \left( a r^2-b r^4-1\right) } ,\end{aligned}$$
(35)
$$\begin{aligned} z_g(r)= & {} \frac{1}{\sqrt{e^\nu }}-1, \end{aligned}$$
(36)
$$\begin{aligned} z_s(r)= & {} \frac{1}{\sqrt{1-2u}}-1. \end{aligned}$$
(37)

4.2 Solution via embedding class-I condition (ECC)

Using the value of \(e^{\lambda }\) as specified in Eq. (25), in Eq. (18), we get the expression \(e^{\nu }\) as

$$\begin{aligned} e^{\nu }= & {} \left( \frac{D \sqrt{b r^2-a} \left( b r^2-a\right) }{3 b}+C\right) ^2, \end{aligned}$$
(38)

where C and D are integrating constants.

Substituting the metric potentials given by Eqs. (25) and (38) into Eqs. (5), (6), and (7), the expressions of \(\rho , p_r,~ p_t\) and \( \Delta \) can be calculated as

$$\begin{aligned}{} & {} \hspace{-20pc}\rho = \frac{r^2 \left( a^2+5 b\right) -2 a b r^4-3 a+b^2 r^6}{\left( 1-a r^2+b r^4\right) ^2}, \end{aligned}$$
(39)
$$\begin{aligned}{} & {} \hspace{-20pc}p_r = \frac{\frac{6 b d \sqrt{b r^2-a}}{d \left( b r^2-a\right) ^{3/2}+3 b c}+a-b r^2}{1-a r^2+b r^4}, \end{aligned}$$
(40)
$$\begin{aligned}{} & {} \hspace{-20pc}p_t = \frac{a^3 d-a^2 b d r^2+b^2 r^2 \left( d \left( b r^4+9\right) -6 c \sqrt{b r^2-a}\right) -a b \left( d \left( b r^4+6\right) -3 c \sqrt{b r^2-a}\right) }{\left( 1-a r^2+b r^4\right) ^2 \left( a^2 d+b \left( 3 c \sqrt{b r^2-a}+b d r^4\right) -2 a b d r^2\right) },\end{aligned}$$
(41)
$$\begin{aligned}{} & {} \hspace{-20pc}\Delta =p_t-p_r. \end{aligned}$$
(42)

Evaluation of arbitrary constants

$$\begin{aligned} M= & {} \frac{1}{2} R \left( \frac{1}{a R^2-b R^4-1}+1\right) , \nonumber \\ C= & {} \frac{\sqrt{2 M-R} \sqrt{b R^2-a} \left( \left( a-b r^2\right) ^2-6 b\right) }{6 b \sqrt{R} \sqrt{a-b R^2}}, \end{aligned}$$
(43)
$$\begin{aligned} D= & {} \frac{\sqrt{2 M-R} \sqrt{a-b R^2}}{2 \sqrt{R}}. \end{aligned}$$
(44)

4.3 Solution via conformally flat condition (CFC)

By substituting the value of \(e^{\lambda }\) as specified in Eq. (25) into Eq. (21), we obtain the expression for \(e^{\nu }\) as:

$$\begin{aligned} e^{\nu }= & {} \frac{1}{2} r^2 S^2 \left( \cosh \left( \sqrt{1-a r^2+b r^4}-\frac{d_6(r)}{2 \sqrt{b}}-d_5(r)\right. \right. \nonumber \\ {}{} & {} \quad \left. \left. +\log \left( r^2\right) +2 T\right) +1\right) , \end{aligned}$$
(45)

where S and T are integrating constants and

$$\begin{aligned} d_5= & {} \log \left( 2 \sqrt{1-a r^2+b r^4}-a r^2+2\right) ,\\ d_6= & {} \log \left( 2 \sqrt{b} \sqrt{1-a r^2+b r^4}-a+2 b r^2\right) . \end{aligned}$$

Substituting the metric potentials given by Eqs. (25) and (45) into Eqs. (5), (6), and (7), the expressions of \(\rho , ~p_r,~ p_t\) and \(\Delta \) can be calculated as

$$\begin{aligned} \rho= & {} \frac{r^2 \left( a^2+5 b\right) -2 a b r^4-3 a+b^2 r^6}{\left( 1-a r^2+b r^4\right) ^2}, \end{aligned}$$
(46)
$$\begin{aligned} p_r= & {} \frac{\frac{2 \tanh \left( \frac{1}{4} \left( -\frac{a d_6}{\sqrt{b}}+2 \sqrt{1-a r^2+b r^4}-2 d_5+2 \log \left( r^2\right) +4 T\right) \right) }{\sqrt{1-a r^2+b r^4}}+\frac{3}{1-a r^2+b r^4}-1}{r^2}, \end{aligned}$$
(47)
$$\begin{aligned} p_t= & {} \frac{-\frac{e^{-2 d_5} \tanh \left( \frac{d_7}{2}\right) \left( e^{2 d_5} \left( 2 a r^2-b r^4-3\right) -d_9 \left( b r^4-1\right) \right) }{\sqrt{1-a r^2+b r^4}}+\frac{d_8 \cosh \left( d_7\right) }{\left( \cosh \left( d_7\right) +1\right) {}^2 \left( a r^2-b r^4-1\right) }+d_{10}}{r^2 \left( 1-a r^2+b r^4\right) } , \end{aligned}$$
(48)
$$\begin{aligned} \Delta= & {} p_t-p_r, \end{aligned}$$
(49)

where

$$\begin{aligned} d_7= & {} -\frac{a d_6}{2 \sqrt{b}}+\sqrt{1-a r^2+b r^4}-d_5+\log \left( r^2\right) +2 T,\\ d_8= & {} -\cosh \left( d_7\right) \left( 2 a^2 r^4-4 a \left( b r^6+r^2\right) \right. \\{} & {} \left. +b r^4 \left( 2 b r^4+3\right) +3\right) -r^4 \left( 2 a^2+5 b\right) \\{} & {} +4 a b r^6+6 a r^2-2 b^2 r^8-5,\\ d_9= & {} a^2 r^4-4 a r^2 \left( \sqrt{1-a r^2+b r^4}+2\right) \\{} & {} +8 \sqrt{1-a r^2+b r^4}+4 b r^4+8, \\ d_{10}= & {} \frac{b r^4-1}{\left( \cosh \left( d_7\right) +1\right) \left( a r^2-b r^4-1\right) }\\{} & {} +\frac{2-a r^2}{1-a r^2+b r^4} +\frac{\cosh ^2\left( d_7\right) }{\left( \cosh \left( d_7\right) +1\right) {}^2}\\{} & {} +\frac{1}{\left( \cosh \left( d_7\right) +1\right) {}^2}\\{} & {} +\tanh ^2\left( \frac{d_7}{2}\right) \left( a r^2-b r^4-1\right) -3. \end{aligned}$$

Evaluation of arbitrary constants

$$\begin{aligned} M= & {} \frac{1}{2} R \left( \frac{1}{a R^2-b R^4-1}+1\right) ,\nonumber \\ S= & {} -\frac{\sqrt{2} \sqrt{R-2 M}}{\sqrt{R \left( \frac{1}{b R^2-a}+\frac{9 R^2}{a R^2-b R^4+8}\right) }}, \end{aligned}$$
(50)
$$\begin{aligned} T= & {} \frac{1}{4} \left( \frac{a d_6(R)}{\sqrt{b}}-2 \sqrt{1-a R^2+b R^4}\right. \nonumber \\{} & {} \left. -4 \tanh ^{-1}\left( \frac{a R^2-b R^4+2}{2 \sqrt{1-a R^2+b R^4}}\right) {+}2 d_5(R){-}2 \log \left( R^2\right) \right) .\nonumber \\ \end{aligned}$$
(51)

5 Discussion on geometrical, physical variables and stability analysis

To assess the physical plausibility of solutions for a compact stellar structure, we must consider several physical conditions while accounting for the given parameter values: \(a = -0.0065\)/km\(^2\) and \(b = 0.00003\)/km\(^2\), \(R = 9.98\) km. In the forthcoming sections, we will conduct a comprehensive analysis of the criteria that, when collectively satisfied, ensure that solutions to the EFEs in general relativity accurately depict the behavior of relativistic objects, such as compact stars.

5.1 Continuity of metrics

This condition ensures that the metric (description of spacetime) inside the star matches smoothly with the metric outside the star at the stellar surface. This is important for maintaining a consistent description of spacetime around the star.

5.2 Regularity constraints and criteria for modeling stellar interiors

The regularity conditions require that certain properties, such as the metric potentials, density, and pressures, maintain non-negative and finite values throughout the entire star. Additionally, at the center of the object, the metric potentials must satisfy specific criteria: The value of \(e^{\nu (r)}\) at \(r=0\) must be finite, and \(e^{-\lambda (r)}\) at \(r=0\) must equal 1. These constraints are essential to ensure that the metric potentials adhere to the fundamental boundary conditions, as depicted in Fig. 1. Furthermore, the pressures and density within the star should decrease continuously from the center of the star towards its surface, in line with the typical behavior of stars. At the boundary of the star (its surface), the radial pressure (\(p_r\)) should reach zero. This condition ensures that the outer layers of the star do not exert an inward force. Figure 2 offers a comprehensive view of the models generated through all three conditions by presenting the density \((\rho (r))\) profile as a function of radial distance. Figure 3 provides an illustration of how radial (\(p_r\)) and tangential (\(p_t\)) pressures change with radial distance (r) for three different conditions: the vanishing complexity factor condition (VCC), the embedding class I condition (ECC), and the conformally flat condition (CFC).

The tangential pressures on the surface of the star for VCC, ECC, and CFC models are respectively given by \(7.63115\times 10^{34}\), \(3.81558\times 10^{34}\), and \(1.52623\times 10^{35}\).

Fig. 1
figure 1

The variation of metric potentials in distinct models obtained under three different conditions: (i) the vanishing complexity factor condition (VCC; green), (ii) the embedding class I condition (ECC; dark yellow), and (iii) the conformally flat condition (CFC; pink)

Fig. 2
figure 2

The variation of density for all three models

Fig. 3
figure 3

The variations of \(p_r\) and \(p_t\) with respect to radial distance r for models obtained using three approaches: (i) VCC (green and dark green lines), (ii) ECC (yellow and dark yellow lines), and (iii) CFC (pink and dark pink lines)

5.3 Complexity factor

In Fig. 4, the evolution of the complexity factor is depicted within the framework of the VCC.

Fig. 4
figure 4

Profile of the complexity factor \((Y_{TF})\) with respect to r obtained using VCC approach

5.4 Zeldovich’s criterion and the finite central parameters

In accordance with Zeldovich’s criterion, it is expected that the physical parameters in the central region of the celestial object, including density (\(\rho \)), radial pressure (\(p_r\)), and tangential pressure (\(p_t\)), should maintain non-negative values and comply with the condition specified in [102] as follows:

$$\begin{aligned} \frac{p_{r_c}}{\rho _c} \le 1. \end{aligned}$$
(52)

The profiles displayed in Fig. 5 provide a visual confirmation that the VCC and ECC models in this study satisfy the requirements of Zeldovich’s criterion. However, the CFC model fails to meet the criteria, as it leads to negative values for \({p_t/\rho }\).

Fig. 5
figure 5

The variations of \({p_r\over \rho }\) and \({p_t\over \rho }\) with respect to radial distance r for models obtained using three approaches: (i) VCC (green and dark green lines), (ii) ECC (yellow and dark yellow lines), and (iii) CFC (pink and dark pink lines)

5.5 Bondi adiabatic index

In their research, Harrison et al. [103] and Zeldovich and Novikov [104] streamlined Chandrasekhar’s stability condition through radial perturbation theory. This simplification yielded a mass-central density relationship described by:

$$\begin{aligned} M(\rho _c) \propto \rho _c^{\frac{3(\Gamma -4/3)}{2}}. \end{aligned}$$
(53)

This relationship plays a crucial role in ensuring the presence of a positive and non-vanishing characteristic frequency, a key requirement for stability.

The relativistic adiabatic index, as given in [105], is defined as:

$$\begin{aligned} \Gamma = \frac{\rho + p_r}{p_r} \frac{dp_r}{d\rho }. \end{aligned}$$
(54)

According to Bondi [106], for a stable Newtonian sphere, it is essential that \(\Gamma > 4/3\). However, when considering pressure anisotropy, this condition takes on a more general form, as outlined by [107]:

$$\begin{aligned} \Gamma > \frac{4}{3} + \left[ -\frac{4\Delta _c}{3 |p'{r_c}|r} + \frac{\rho _c p{r_c}}{2 |p'_{r_c}|}r\right] . \end{aligned}$$
(55)

Here, \(\Delta _c\) and \(\rho _c\) represent anisotropy and energy density at the center in static equilibrium, respectively. The terms enclosed in square brackets account for both anisotropic and relativistic corrections, both of which have positive values. These corrections extend the range of \(\Gamma \) for which stability is maintained, as discussed in [108]. In general, if \(\Gamma > 4/3\), the system is considered stable against gravitational collapse. Adiabatic index profiles for the VCC and ECC approaches exhibit stable and expected behavior, as shown in Fig. 6. In contrast, the profile associated with the CFC approach exhibits unexpected behavior.

Fig. 6
figure 6

The variations of \(\Gamma (r)\) with r for the models obtained through (i) VCC (green line), (ii) ECC (yellow line), and (iii) CFC (pink line)

5.6 Stability equilibrium conditions

The modified Tolman–Oppenheimer–Volkoff (TOV) equation, which accommodates anisotropic fluid distribution, was originally introduced in [109]. This equation is expressed as follows:

$$\begin{aligned} \underbrace{-{\nu ' \over 2}(\rho +p_r)}_{F_g}-\underbrace{{dp_r \over dr}}_{F_h}+\underbrace{{2\Delta \over r}}_{F_a}=0. \end{aligned}$$
(56)

In this equation, the symbols \(F_g\), \(F_h\), and \(F_a\) correspond to the gravitational, hydrostatic, and anisotropic forces, respectively, that act upon the stellar object. The profiles presented in Fig. 7 for all three approaches provide a visual illustration of how the gravitational force \(F_g\) exerts dominance over both the anisotropic force \(F_a\) and the hydrostatic force \(F_h\). As a result, the system remains in static equilibrium, with the gravitational force effectively counterbalancing the combined effects of the anisotropic and hydrostatic forces.

Fig. 7
figure 7

The variation of balancing forces with respect to radial distance r for the models obtained through (i) VCC (green, darken green and light green lines), (ii) ECC (yellow, darken yellow and light yellow lines), and (iii) CFC (pink, darken pink and light pink lines)

6 Energy conditions

To ensure the physical stability of a static model for the star’s interior, it is crucial to verify the fulfillment of specific energy conditions, including (i) The null energy condition (NEC): \(\rho + p_r \ge 0\), (ii) The weak energy conditions (WEC): \(\rho + p_r \ge 0\), \(\rho \ge 0\), and \(\rho +p_t \ge 0\), \(\rho \ge 0\), (iii) The strong energy condition (SEC): \(\rho + p_r + 2p_t \ge 0\).

The illustration in Fig. 8 encompasses all three methods and offers compelling evidence that these energy conditions are rigorously met within the interior of the compact star.

Fig. 8
figure 8

The variation of energy conditions with respect to radial distance r for the models obtained through (i) VCC (green, darken green and light green lines), (ii) ECC (yellow, darken yellow and light yellow lines), and (iii) CFC (pink, darken pink and light pink lines)

7 Red-shift profiles

In the context of spherically symmetrical stellar structures, we have previously computed the functions that describe gravitational red-shift (\(z_g(r)\)) and surface red-shift (\(z_s(r)\)) for the stellar system using all three approaches, as detailed in Sect. 4.

It’s noteworthy that the gravitational red-shift (\(z_g(r)\)) and the surface red-shift (\(z_s(r)\)) for the compact object exhibit contrasting trends with respect to the radial coordinate (r). Specifically, as the radial coordinate r increases, \(z_g(r)\) decreases, whereas \(z_s(r)\) increases, as depicted in Fig. 9. Simultaneously, both the mass function m(r) and the parameter u(r) exhibit an increasing trend as r varies. The variations in mass (m(r)) and compactness (u(r)) for the models generated through all three approaches are illustrated in Fig. 10.

Fig. 9
figure 9

The variations of interior and surface red-shift with respect to radial distance r for the models obtained through (i) VCC (green line), (ii) ECC (yellow line), and (iii) CFC (pink line)

Fig. 10
figure 10

The variations of m(r) and u(r) with r for all the models

For a spherically symmetric compact star whose density monotonically decreasing function holds an upper bound on its mass-to-radius ratio \(\frac{M}{R} < \frac{4}{3}\), Fig. 9 of the compactification factor \(u(r) = \frac{m(r)}{r}\) exhibits that the present models satisfy the Buchdal limit throughout the compact star, i.e., \(u(r) \le \frac{4}{3}\), particularly on the surface of the star where \(\frac{M}{R} < \frac{4}{3}\).

For realistic anisotropic stellar models, the surface red-shift cannot exceed the values 3.842 or 5.211 when \(p_t\) satisfies the strong or the dominant energy condition, respectively [110]. The present models satisfy the bounds for the surface red-shift (Fig. 9) as the increasing function attains a maximum bound of 0.394636 on the boundary of the star.

8 Anisotropic parameter insights

In the realm of physically relativistic models, a notable aspect of pressure distribution within a compact star is the behavior of pressure anisotropy, denoted as \(\Delta (r)\). This behavior begins with \(\Delta (r)\) being zero at the center of the star, represented as \(\Delta (0) = 0\). As one progresses outward from the central core, \(\Delta (r)\) gradually increases, eventually reaching a positive value as it approaches the outer boundary of the stellar object. To provide a visual representation of this characteristic, Fig. 11 presents a graphical illustration of the variation of \(\Delta (r)\) across the entire stellar object for all three approaches.

Fig. 11
figure 11

The variation of \(\Delta (r)\) with respect to radial distance r for the models obtained through (i) VCC (green line), (ii) ECC (darken yellow line), and (iii) CFC (pink line)

8.1 Causality and Hererra cracking conditions

The Herrera cracking method, as described in [111, 112], is utilized to assess the stability of anisotropic stars under radial perturbations. The conditions for cracking and causality can be expressed as follows:

$$\begin{aligned} -1 < {v_t^2} - {v_r^2} \le 0. \end{aligned}$$
(57)

This can be further elaborated as:

$$\begin{aligned} \frac{dp_t}{d\rho }= & {} \frac{dp_r}{d\rho } + \frac{d\Delta }{d\rho } = \frac{dp_r}{d\rho } + \frac{d\Delta }{dr}\frac{dr}{d\rho }, \end{aligned}$$
(58)
$$\begin{aligned} v_r^2 - v_t^2= & {} -\frac{d\Delta }{dr}\frac{dr}{d\rho }. \end{aligned}$$
(59)

The profiles depicted in Fig. 12 demonstrate that the VCC, ECC models satisfy the conditions \(0 < v_r^2, v_t^2 \le 1\) but CFC model fails to attain it. The Hererra-cracking condition is satisfied all the three models \(-1 < v_t^2 - v_r^2 \le 0\) throughout the stellar object (Fig. 13). These conditions adhere to the causality requirement and suggest potential stability for the model under examination.

Fig. 12
figure 12

The variation of \(v_r^2\) and \(v_t^2\) with respect to radial distance r for the models obtained through (i) VCC (green and darken green lines), (ii) ECC (yellow and darken yellow lines), and (iii) CFC (pink and darken pink lines)

Fig. 13
figure 13

The variation of the stability factor with respect to radial distance r for the models obtained through (i) VCC (green line), (ii) ECC (darken yellow line), and (iii) CFC (pink line)

8.2 Static stability criteria

In the realm of non-rotating, spherically symmetric equilibrium stellar models, static stability criteria stipulate that a small increase in the central density of compact stars should lead to an increase in their total mass. This behavior can be expressed mathematically as:

$$\begin{aligned} \frac{\partial M}{\partial \rho _c} > 0. \end{aligned}$$
(60)

This criterion is fundamental for ensuring the static and stable nature of the model.

The equation for the total mass is given as:

$$\begin{aligned} M = m(R) =\frac{1}{2} R \left( \frac{1}{a R^2-b R^4-1}+1\right) . \end{aligned}$$
(61)

Expressed in terms of the central density (where \(a=\frac{- \rho _c}{3}\)), the mass equation takes the form:

$$\begin{aligned} M(\rho _c) = \frac{1}{2} R \left( 1-\frac{3}{3 b R^4+\rho R^2+3}\right) . \end{aligned}$$
(62)

Furthermore,

$$\begin{aligned} \frac{\partial M}{\partial \rho _c} = \frac{3 R^3}{2 \left( 3 b R^4+\rho _c R^2+3\right) ^2} > 0, \end{aligned}$$
(63)

demonstrating that all the models of \(\rho _c\) conform to the static stability criterion (63). The variation in mass concerning central density for models generated using all three approaches is presented in Fig. 14.

Fig. 14
figure 14

The variation of mass with central density for all the models

9 Equation of state for dense matter

In this section, we present the equation of state \(p_r = p_r(\rho )\) of the dense matter for VCC and ECC models using the method of least squares. Applying the method, we obtain the EOS for the VCC model as:

$$\begin{aligned} p_r= & {} 17.0027 \rho ^2 - 0.284391 \rho + 0.00105915, \end{aligned}$$
(64)

and for the ECC model as:

$$\begin{aligned} p_r= & {} 28.4781 \rho ^2 - 0.45579 \rho + 0.00153025. \end{aligned}$$
(65)

The comparison of the equations of state (EOS) of both models is displayed in Fig. 15. We also compare the quantities \(p_r/\rho \) with the estimated equations of state \(EOS/\rho (r)\) in Fig. 16 and conclude that the estimated EOSs almost match with the quantity \(p_r/\rho \) in both VCC and ECC models.

Fig. 15
figure 15

The variation of equation of state with r for the models obtained through (i) VCC (Blue line), (ii) ECC (Green line)

Fig. 16
figure 16

The variation of equation of state with respect to radial distance r for the models obtained through (i) VCC (Blue line), (ii) ECC (Green line)

The expressions of the central pressures and densities in the VCC model are given by:

$$\begin{aligned} p_{r_0}= & {} p_{t_0} \nonumber \\&{=}&a {-} \frac{32 A b^{3/2}}{A \left( a^2 - 4 b\right) \log \left( 2 \sqrt{b} - a\right) + 2 \sqrt{b} (a A - 8 b B)}) \nonumber \\ {}{} & {} > 0, \end{aligned}$$
(66)
$$\begin{aligned} \rho _{0}= & {} -a > 0 ~~\text {for}~~ a < 0. \end{aligned}$$
(67)

Using Zeldovich’s criteria [113] as a necessary condition to verify the regularity of any physical solution, i.e., \(\frac{p_{r0}}{\rho _0} \le 1\), we have:

$$\begin{aligned} \frac{p_{r0}}{\rho _0}= & {} \frac{32 A b^{3/2}}{3 a A \left( a^2-4 b\right) \log \left( 2 \sqrt{b} - a\right) + 6 a \sqrt{b} (a A - 8 b B)} \nonumber \\ {}{} & {} {-} \frac{1}{3}{<} 1. \end{aligned}$$
(68)

On solving (6668), we obtain the following inequality:

$$\begin{aligned}{} & {} -\frac{1}{2} \le a< 0, 0< b < \frac{a^2}{4}\frac{B}{A} \nonumber \\{} & {} \quad {\ge } \left( \frac{a^2 {-} 16 b}{8 a b} {-} \frac{1}{16} \sqrt{\frac{a^4 {-} 8 a^2 b {+} 16 b^2}{b^3}} \log \left( 2 \sqrt{b} {-} a\right) \right) .\nonumber \\ \end{aligned}$$
(69)
Fig. 17
figure 17

The variations of \(p_r\) and \(p_t\) with respect to radial distance r for models obtained using three approaches: (i) VCC (green and dark green lines), (ii) ECC (yellow and dark yellow lines), and (iii) CFC (pink and dark pink lines)

Fig. 18
figure 18

The variations of \({p_r\over \rho }\) and \({p_t\over \rho }\) with respect to radial distance r for models obtained using three approaches: (i) VCC (green and dark green lines), (ii) ECC (yellow and dark yellow lines), and (iii) CFC (pink and dark pink lines)

Fig. 19
figure 19

The variation of \(\Gamma (r)\) with r for the models obtained through (i) VCC (green line), (ii) ECC (yellow line), and (iii) CFC (pink line)

Fig. 20
figure 20

The variation of \(v_r^2\) and \(v_t^2\) with respect to radial distance r for the models obtained through (i) VCC (green and darken green lines), (ii) ECC (yellow and darken yellow lines), and (iii) CFC (pink and darken pink lines) for \(M=2.334\)

The EOS parameters, i.e., the ratio of \(p_r/\rho \) and \(p_t/\rho \), are positive and less than 1 throughout within the star (see Fig. 5) in VCC and ECC models, which describes that the matter distribution within the stars is non-exotic in nature.

10 Discussions and conclusions: key findings

The analysis presented in the study yields several key observations regarding compact stars with specific parameter values. These findings pertain to different theoretical models for describing such stars.

  1. 1.

    The compact star, with a mass of \(2.42446~ M_{\odot }\) and a radius of \(R=9.98\) km, and parameter values \(a=-0.0065~ \text {km}^{-2}\) and \(b=0.00003~ \text {km}^{-2}\), satisfies all the physical, geometrical, and stability conditions in the VCC and ECC models. However, in the CFC model with the same parameter values, the radial and tangential pressures (\(p_r\) and \(p_t\)) and the pressure-density ratios (\(p_r/\rho \) and \(p_t/\rho )\) are negative, as indicated in Figs. 3 and 5. The negative pressures in the CFC model result in a negative adiabatic index and negative tangential velocity, implying that the solution fails to satisfy the Bondi adiabatic condition and the causality conditions, as shown in Figs. 6 and 12. Additionally, the CFC model demonstrates good behavior in terms of the regularity tendency of metric potentials (Fig. 1), density (Fig. 2), red-shift functions (Fig. 9), TOV equation (Fig. 7), a non-negative increasing tendency of the mass-compactification factor (Fig. 10), anisotropy (Fig. 11), energy conditions (Fig. 8), Herrera cracking condition (Fig. 13), and static stability criteria (Fig. 14). In brief, while the compact star with the specified parameters aligns well with the VCC and ECC models, it encounters significant issues in the CFC model. The negative pressures in the CFC model result in a cascade of problems, including negative adiabatic index and tangential velocity, rendering the solution inconsistent with several physical and causality conditions. However, the CFC model maintains regularity tendencies in various aspects, highlighting the complexity and nuanced behavior of compact stars under different theoretical frameworks.

  2. 2.

    When the compact star has a mass of \(2.334~M_{\odot }\), a radius of \(R=9.98\) km, and parameter values of \(a=-0.00583489/km^2\) and \(b=0.00003/km^2\), we observe the following findings:

  3. (i)

    The models VCC, ECC satisfy all the geometrical and physical conditions, but CFC model fails to attain Zeldovich’s condition due to negative values of \(p_r\), \(p_r/\rho \) at the surface of the compact star (see Figs. 17 and 18). Additionally, there is a non-negative increasing tendency of the mass-compactification factor and anisotropy, alongside \(z_s(r)\) for all the models.

  4. (ii)

    All three models adhere to Bondi adiabatic condition (Fig. 19), energy conditions, the Herrera cracking condition, and the criteria for static stability.

  5. (iii)

    The causality condition is satisfied only for ECC model but it fails to meet in VCC model as the velocity \(v_t^2\) takes negative values in the interior of the compact star (see Fig. 20). In the CFC model, the values of \(v_r^2\) and \(v_t^2\) fall within the range of 0 to 1 within the radius interval [0, 2.65]. Nevertheless, \(v_t^{2}\) becomes negative when r is in the range (2.65, R].

In summary, while the compact star with the specified parameters aligns well with all three models (VCC, ECC, and CFC), it encounters specific issues in each of them. For the VCC and ECC models, the causality condition is not satisfied, and in the CFC model, the behavior of \(v_r^2\) and \(v_t^2\) varies with the change in the radius range, emphasizing the intricate and multifaceted behavior of compact stars within varying theoretical frameworks.