1 Introduction

In the fields of cosmology and astrophysics, the accelerated expansion of the cosmos is of considerable significance, prompting researchers to present several theories to explain the underlying causes of this cosmic expansion. The observations of galaxy clustering, supernovae experiments, and variations in the cosmic microwave background are some of the sources that substantially supported the notion of the expanding universe. The primary cause of the cosmic expansion is dark energy, which is characterized by strong pressure and constitutes a substantial portion of the total energy of the universe. Nonetheless, despite extensive research, the precise nature of dark energy remains a significant challenge [1,2,3]. Einstein’s theory of relativity has made a substantial contribution to revealing the mysteries of the cosmos and completely transforming our understanding of space, time, and gravity [4]. Despite its importance to modern physics, this theory does have limits in terms of understanding strong gravitational fields, explaining cosmic acceleration, and accounting for dark matter. To overcome these drawbacks, researchers have proposed alternate theories of gravity that, in some circumstances, provide more satisfactory explanations than the classical theory. As a result, it has become evident that various modifications are required for the classical theory to effectively examine cosmic expansion. As a result, several theories have been proposed by modifying general relativity (GR), such as the f(R), f(RG), f(RT), f(Q), f(G), \(f(R, \phi )\) and \(f(R, \phi , X)\)theories of gravity [5,6,7,8,9,10,11,12,13,14,15,16,17]. In addition to address the shortcomings of the classical theory, these theories present new cosmological perspectives and provide valuable insights into important problems like dark energy and cosmic acceleration [18,19,20,21,22]. Harko et al. [23] presented f(RT) gravity, by incorporating the trace of the energy–momentum tensor as an additional term in the action, by modifying the geometrical aspect of Einstein field equations. The functional forms f(R) and f(T) describe the gravitational components of the total action. The primary objective of f(RT) gravity is to account for certain observational phenomena that have been difficult to explain through GR, including large pulsars [24], dark matter [25], and dark energy [26]. The f(RT) gravity has gained considerable attention mainly due to its distinctive characteristic of non-minimal coupling between matter and geometry. Numerous studies have recently investigated and reported on various f(RT) gravity applications in the literature [27,28,29,30,31,32,33,34,35].

Compact stars, which emerge during the ultimate stages of stellar evolution, have been the substantial subject of astrophysics research [36,37,38,39,40,41,42,43]. Despite the fact that the precise nature of compact stars is still unknown, significant evidence suggests that these celestial objects are characterized by high mass and small radii. Compact objects are divided into many categories according to their mass-to-radius ratios, such as neutron stars, white dwarfs, and black holes. The proposal put forth by Baade and Zwicky [44] suggesting that supernovae could lead to the formation of highly dense objects like neutrons, has significantly contributed to advancing our understanding of compact stars. The discovery of the first pulsar by Hewish et al. [45] has revolutionized our understanding of compact stars. A compact star characterized by a higher density and smaller radius [46]. Ruderman [47] significantly advanced astrophysics by identifying the anisotropic characteristics of stellar structures. In the literature [48], the stellar structures with anisotropic pressure have been investigated by means of the equation of state (EoS). While studying compact stars, it is highly appropriate to take into account the anisotropic form of modified gravity. Kalm et al. [49] used the Krori and Barua metrics to address the effects of anisotropic matter on compact objects. Bhar et al. [50] analyzed the possibility of compact stars in higher dimensions by examining the noncommutative anisotropic stars. The nature of compact stars can be further investigated through both general relativity and modified theories of gravity [51,52,53].

The fluid with anisotropic pressure, characterized by unequal principal stresses, has been a fundamental consideration in our study. The importance of anisotropic pressure as a starting point has been discussed, serving as a foundation for further investigation. Recent advancements in our understanding, as highlighted in reference [54], have presented a new perspective on the justification of anisotropic pressure in fluid configurations. The results presented in [54] demonstrate that, even when the initial configuration is assumed to be isotropic, physical processes fundamental to star evolution will always tend to produce pressure anisotropy, especially in relativistic contexts. This insight reinforces the fact that anisotropic pressure is not only a plausible outcome but an expected feature in fluid systems undergoing dynamic changes.The important point to highlight is that equilibrium states in fluid systems are the outcomes of dynamic stages. Crucially, any anisotropy acquired during these dynamic stages persists, no matter how small, as the system reaches equilibrium. This idea is consistent with the ideas put forth in [54], where stellar evolution-related physical processes result in anisotropic pressure that is fundamental to the equilibrium configuration of the system.

Investigating the stability of compact stars is an essential aspect of modern astrophysics because it offers significant perspectives regarding evolution, and dynamics of the celestial objects. The stability of these stars relates to their ability to maintain equilibrium between inward and outward forces. Within these compact objects, fusion processes produce energy, generating outward pressure that opposes gravitational collapse. However, when the energy is exhausted, the inward forces dominate, leading to the collapse and formation of compact stars. Bondi [55] significantly contributed to investigate the stability of celestial objects using the adiabatic criterion. Chandrasekhar [56] made significant contributions to analyze the stability of compact objects by employing Bondi’s theoretical framework and incorporating the adiabatic index. To investigate the impact of dissipation on the dynamical instability of a fluid with spherically symmetric properties, Herrera et al. [57] conducted an analysis of both the Newtonian and relativistic regimes. Chan et al. [58] demonstrated that even slight change in anisotropy in the unperturbed fluid has a substantial impact on system stability in both Newtonian and relativistic limits. In a subsequent study [59], the same researchers investigated the effects of shearing forces and viscosity, the effects of shearing forces and viscosity, contribute to increase the fluid stability in both the Newtonian and relativistic frameworks.

Perturbation analysis is a crucial technique in stability analysis of compact stars, wherein perturbations are introduced to the physical variables of a compact object. This technique effectively explains the evolution of stars through the analysis of gravitating system fluctuations. The central theme of perturbation analysis is to comprehend the impact of perturbations in physical parameters on the stability of a compact object. By considering perturbations in physical parameters, it becomes possible to estimate the different stages of the evolution of stars and identify levels of stability or instability. This technique provides insights into the underlying physical processes that govern the behavior of self-gravitating compact objects. Regge and Wheeler [60] investigated the stability analysis of relativistic objects by introducing a metric perturbation within the context of general relativity and offered valuable insights into the behavior and stability of relativistic objects under various conditions. Hammad [61] analyzed the effects of density perturbations in the cosmic microwave background in \(f(R, \phi )\) model and suggested that the observed density perturbations can be accurately recovered with high precision naturally.

Herrera [62] first proposed the cracking technique as an alternative technique for analyzing instabilities within compact objects. This method aims to examine the behavior of fluid within the compact object when its equilibrium state is disturbed. Specifically, this method addresses the point where non-zero radial forces appear within the configuration. In the context of this approach, cracking occurs cracking occurs due to inwardly directed radial forces changing sign at a specific point \((\frac{\delta \Omega }{\delta \rho }<0 \rightarrow \frac{\delta \Omega }{\delta \rho } >0)\). Conversely, overturning refers to a situation, when outwardly directed forces changing sign from positive to negative \((\frac{\delta \Omega }{\delta \rho } >0 \rightarrow \frac{\delta \Omega }{\delta \rho }<0)\). Di Prisco et al. [63] expanded on the cracking method by using the Raychaudhuri equation to identify the necessary constraints for cracking. Herrera and Santos [64] analyzed the effects of local anisotropy on cracking of compact objects through a Jeans instability analysis. Herrera and Varela [65] suggested a technique to examine cracking in non-spherical systems by introducing axisymmetric disturbances within an ideal fluid configuration. Prisco et al. [66] analyzed the cracking within self-gravitating compact objects by perturbing the local anisotropy. Abreu et al. [67] investigated the cracking by employing the perturbations in local anisotropy and density of compact objects using both local and non-local EoS. Abreu et al. [68] investigated the presence of cracking and utilizing concepts related to density fluctuations and sound speeds. Azam et al. [69] investigated the effects of electromagnetic fields on the stability of charged compact objects through cracking technique. Investigating the specific case of PSR J1614-2230, Azam et al. [70] investigated the cracking phenomena within a quadratic regime in the presence of electromagnetic fields and concluded that star exhibits cracking in the presence of charge. Sharif and Sadiq [71] examined the cracking of charged anisotropic fluid configuration by employing polytropic equations of state while considering the presence of electromagnetic fields. Gonzalez et al. [72, 73] investigated the cracking phenomena by considering density-dependent physical parameters and incorporating local density perturbations to both anisotropic and isotropic matter distributions. Azam and Mardan [74] investigated the effects of density fluctuations by employing the cracking technique within a linear regime. Mardan and Azam [75] investigated cracking in charged spherical polytropes by incorporating perturbations in the physical parameters. Gonzalez et al. [76] also examined the cracking in two distinct types of charged cylindrical polytropes at specific values of density and other parameters. Sharif and Sadiq [77] investigated the impacts of density fluctuations on both isotropic and anisotropic matter configuration employing a barotropic EoS in the realm of GR. Sharif and Sadiq [78] investigated the cracking with anisotropic spherically symmetric matter configurations and demonstrated that models with a specific form of Chaplygin EoS exhibits cracking and instability increases with higher charge parameter. Len et al. [79] investigated the cracking with anisotropic spherically symmetric matter configurations with a polytropic equation of state by employing density perturbations in matter variables. Azam and Nazir [80] discussed the cracking in polytropic compact objects by analyzing the effects of perturbations in energy density and local anisotropy, carrying implications for the diverse astrophysical scenarios. Noureen et al. [81] proposed a technique to observe cracking points by employing local density perturbation in f(R) gravity and investigated the stability of self-gravitating compact objects.

In this manuscript, we aim to analyze the stability of compact stars in f(RT) gravity using the cracking technique. To accomplish this, we employ local density perturbation in spherically symmetric spacetime characterized by anisotropic matter distribution and examine the configuration for cracking and overturning points. The structure of this paper is as follows: Sect. 2, initiates by presenting the field equations of f(RT) gravity, and subsequently it establishes the expression for the hydrostatic equilibrium equation. Within this section, we also employ Krori Barua spacetime coefficients to the hydrostatic equilibrium equation. In Sect. 3, we developed the expression of radial forces to examine cracking within the configuration, by perturbing all physical variables employing local density perturbation (LDP). Section 4 outlines the matching conditions necessary to determine constants resulting from the Krori Barua approach. Section 5, presents the physical analysis via graphical illustrations of radial forces for all considered compact stars to validate the effectiveness of our developed technique. Concluding remarks are presented in Sect. 6, along with a list of references.

2 Development of field equations in \(f({\mathcal {R}},T)\) gravity

The Einstein Hilbert (EH) action for f(RT) is presented as [23],

$$\begin{aligned} S= \int d^4x \sqrt{-g} [f(R,T)+ L_m], \end{aligned}$$
(1)

where \(L_{m}\) refers to the matter Lagrangian, g is the determinant of \(g_{\xi \eta }\), R represents the Ricci scalar, and T refers to trace of energy momentum tensor. The field equations for f(RT) gravity results from varying the EH given in Eq. (1) with respect to the metric tensor \(g_{\xi \eta }\) is illustrated as,

$$\begin{aligned}{} & {} R_{\xi \eta }f_R-\frac{1}{2}f g_{\xi \eta }+( g_{\xi \eta } \nabla ^\alpha \nabla _\alpha -\nabla _{\xi }\nabla _{\eta }) f_R\nonumber \\{} & {} \quad =T_{\xi \eta }-f_T\Theta _{\xi \eta }-f_TT_{\xi \eta }, \end{aligned}$$
(2)

where \(f_{R}=\dfrac{\partial f}{ \partial R}\) and \(f_{T}=\dfrac{\partial f}{ \partial T}\), whereas \(\nabla _\alpha \) denotes the covariant derivation operators. Further, \(T_{\xi \eta }\) is the stress–energy tensor and \(\Theta _{\xi \eta }\) is the tensorial quantity expressed as,

$$\begin{aligned} \Theta _{\xi \eta }=\dfrac{g^{\xi \eta }\delta T_{\xi \eta }}{ \delta g^{\alpha \beta }}=-2 T_{\xi \eta }+g_{\xi \eta }L_m-2g^{\xi \eta } \dfrac{\partial ^2L_m}{\partial g^{\alpha \beta } \partial g^{\xi \eta }}. \end{aligned}$$
(3)

The source of matter configuration assumed in this study is anisotropic and can be expressed by the following energy–momentum tensor.

$$\begin{aligned} T_{\xi \eta }=(\rho +p_{t})u_{\xi }u_{\eta }-p_{t}g_{\xi \eta } +(p_{r}-p_{t})\upsilon _{\xi }\upsilon _{\eta }, \end{aligned}$$
(4)

\(T_{\xi \eta }\) incorporates the density, tangential, and radial pressures signified by \( \rho \), \(p_{t}\), and \(p_{r}\) respectively. In addition, \(u_{\xi }\upsilon _{\eta }\) are the four-velocity vectors given by: \(u_{\xi }=e^{a/2}\delta ^{0}_{\xi }\) and \(\upsilon _{\eta }=e^{b/2}\delta ^{1}_{\eta }\). By considering \(L_m=\rho \), Eq. (3) can be written as

$$\begin{aligned} \Theta _{\xi \eta }=-2 T_{\xi \eta }+\rho g_{\xi \eta }. \end{aligned}$$
(5)

The equation of motion Eq. (2) can be stated as follows by using Eq. (5)

$$\begin{aligned} G_{\xi \eta }=R_{\xi \eta }-\frac{1}{2}R g_{\xi \eta }=T^{eff}_{\xi \eta }, \end{aligned}$$
(6)

where,

$$\begin{aligned} T^{eff}_{\xi \eta }&=\dfrac{1}{f_{R}}\bigg [(1+f_T) T_{\xi \eta }-\rho g_{\xi \eta }f_R\nonumber \\&\quad +\dfrac{1}{2}g_{\xi \eta }(f-R f_{R}) +(\nabla _{\xi }\nabla _{\eta }-g_{\xi \eta }\nabla _{\alpha } \nabla ^{\alpha })f_{R}\bigg ]. \end{aligned}$$
(7)

For our current analysis, we consider a static spherically symmetric spacetime, whose line element reads as

$$\begin{aligned} d{s}^{2}=e^{a(r)}dt^{2}-e^{b(r)}d{r}^{2}-r^2(d{\theta }^{2} +sin^2{\theta }d{\phi }^{2}), \end{aligned}$$
(8)

here \(e^{a(r)}\) and \(e^{b(r)}\) signifies metric coefficients. By using the line element Eq. (8) together with the energy–momentum tensor Eq. (7), the field equations takes the following form:

$$\begin{aligned} G_{00}&=\dfrac{e^{a}}{f_{R}}\bigg [\rho +\dfrac{1}{2}f -\dfrac{1}{2}Rf_{R}+e^{-b}f_{R}^{\prime \prime }+e^{-b} \bigg (\dfrac{b^{\prime }}{2}+\dfrac{2}{r}\bigg )f_{R}^{\prime }\bigg ], \end{aligned}$$
(9)
$$\begin{aligned} G_{11}&=\dfrac{e^{b}}{f_{R}}\bigg [(1+f_{T})p_{r} +\rho f_{T}-\dfrac{1}{2}f+\dfrac{1}{2}Rf_{R}\nonumber \\&\quad -e^{-b} \bigg (\dfrac{a^{\prime }}{2}+b^{\prime } +\dfrac{2}{r}\bigg )f_{R}^{\prime }\bigg ], \end{aligned}$$
(10)
$$\begin{aligned} G_{22}&=\dfrac{r^{2}}{f_{R}}\bigg [(1+f_{T})p_{t} +\rho f_{T}-\dfrac{1}{2}f+\dfrac{1}{2}Rf_{R}-e^{-b}f_{R}^{\prime \prime }\nonumber \\&\quad -e^{-b}\bigg (\dfrac{a^{\prime }}{2}+\dfrac{b^{\prime }}{2} +\dfrac{1}{r}\bigg )f_{R}^{\prime }\bigg ], \end{aligned}$$
(11)
$$\begin{aligned} G_{33}&=\dfrac{r^{2}sin^{2}\theta }{f_{R}}\bigg [(1+f_{T})p_{t} +\rho f_{T}-\dfrac{1}{2}f+\dfrac{1}{2}Rf_{R}-e^{-b}f_{R}^{\prime \prime }\nonumber \\&\quad -e^{-b}\bigg (\dfrac{a^{\prime }}{2}+\dfrac{b^{\prime }}{2} +\dfrac{1}{r}\bigg )f_{R}^{\prime }\bigg ]. \end{aligned}$$
(12)

Here prime \((')\) signifies the derivatives with respect to radial coordinate “r”, \(f_{R}=\dfrac{\partial f}{\partial R}\) and \(f_{T}=\dfrac{\partial f}{\partial T}\). Further, after some manipulations on the field equations Eqs. (9)–(12), we acquired the hydrostatic equilibrium equation for the anisotropic stellar configuration expressed as,

$$\begin{aligned} \dfrac{dp_{r}}{dr}&= \dfrac{e^{b}f_{R}}{(1+f_{T})} \bigg [\dfrac{e^{-2b}}{f_{R}}\bigg (\dfrac{f-Rf_{R}}{2}e^{b} +\bigg (\dfrac{a^{\prime }}{2}+b^{\prime } +\dfrac{2}{r}\bigg )f_{R}^{\prime }\bigg )\bigg ]_{,1}\nonumber \\&\quad -\dfrac{\rho a^{\prime }}{2}-\bigg (\dfrac{a^{\prime }}{2}+\dfrac{2}{r} -\dfrac{f_{R}^{\prime }R^{\prime }}{f_{R}\rho ^{\prime }}\bigg )p_{r} \nonumber \\&\quad +\dfrac{2p_{t}}{r} -\dfrac{e^{-b}}{(1+f_{T})} \bigg (\dfrac{a^{\prime }}{2}+\dfrac{2}{r}\bigg )f_{R}^{\prime \prime } +\dfrac{e^{-b}}{(1+f_{T})}\nonumber \\&\quad \times \bigg (\dfrac{3}{4}a^{\prime }b^{\prime } +\dfrac{a^{'2}}{4}+\dfrac{3b^{\prime }}{r}+\dfrac{2}{r^{2}} +b^{'2}\bigg )f_{R}^{\prime } -b^{\prime } \bigg (\dfrac{Rf_{R}-f}{2(1+f_{T})}\bigg )\nonumber \\&\quad -\dfrac{T^{\prime }}{(1+f_{T})\rho ^{\prime }}\bigg (f_T^{\prime }p_{r} +\rho f_T \bigg )-\dfrac{f_T}{(1+f_T)}\bigg (\rho ^{\prime } -\dfrac{\rho f_{R}^{\prime }R^{\prime }}{\rho ^{\prime }f_{R}} \bigg ), \end{aligned}$$
(13)

which leads to

$$\begin{aligned} \Omega&=-\dfrac{dp_{r}}{dr}+\dfrac{e^{b}f_{R}}{(1+f_{T})}\nonumber \\&\quad \times \bigg [\dfrac{e^{-2b}}{f_{R}}\bigg (\dfrac{f-Rf_{R}}{2}e^{b} +\bigg (\dfrac{a^{\prime }}{2}+b^{\prime } +\dfrac{2}{r}\bigg )f_{R}^{\prime }\bigg )\bigg ]_{,1}\nonumber \\&\quad -\dfrac{\rho a^{\prime }}{2}-\bigg (\dfrac{a^{\prime }}{2}+\dfrac{2}{r} -\dfrac{f_{R}^{\prime }R^{\prime }}{f_{R}\rho ^{\prime }}\bigg )p_{r} \nonumber \\&\quad +\dfrac{2p_{t}}{r} -\dfrac{e^{-b}}{(1+f_{T})} \bigg (\dfrac{a^{\prime }}{2}+\dfrac{2}{r}\bigg )f_{R}^{\prime \prime } +\dfrac{e^{-b}}{(1+f_{T})}\nonumber \\&\quad \times \bigg (\dfrac{3}{4}a^{\prime }b^{\prime } +\dfrac{a^{'2}}{4}+\dfrac{3b^{\prime }}{r}+\dfrac{2}{r^{2}} +b^{'2}\bigg )f_{R}^{\prime } -b^{\prime } \bigg (\dfrac{Rf_{R}-f}{2(1+f_{T})}\bigg )\nonumber \\&\quad -\dfrac{T^{\prime }}{(1+f_{T})\rho ^{\prime }} \bigg (f_T^{\prime }p_{r}+\rho f_T \bigg )-\dfrac{f_T}{(1+f_T)} \bigg (\rho ^{\prime }-\dfrac{\rho f_{R}^{\prime }R^{\prime }}{\rho ^{\prime }f_{R}} \bigg ). \end{aligned}$$
(14)

The equilibrium state of the anisotropic compact star is characterized by equation Eq. (14), which we will employ to discuss cracking and overturning by analyzing its perturbed form. To accomplish this, we will incorporate the Krori Barua spacetime coefficients [82, 83] in Eq. (14) specified as, \(a=Br^2 + C\) and \(b=Ar^2\), where AB,  and C are constants.

$$\begin{aligned} \Omega&=-\dfrac{dp_{r}}{dr} +\dfrac{e^{Ar^{2}}f_{R}}{(1+f_{T})}\nonumber \\&\quad \times \bigg [\dfrac{e^{-2Ar^{2}}}{f_{R}}\bigg (\dfrac{f-Rf_{R}}{2}e^{-Ar^{2}} +\bigg (Br+2Ar+\dfrac{2}{r}\bigg )f_{R}^{\prime }\bigg )\bigg ]_{,1}\nonumber \\&\quad -Br\rho -\bigg (Br+\dfrac{2}{r} -\dfrac{f_{R}^{\prime }R^{\prime }}{f_{R}\rho ^{\prime }}\bigg )p_{r}\nonumber \\&\quad +\dfrac{2p_{t}}{r}-\dfrac{e^{Ar^{2}}f_{R}}{(1+f_{T})} \bigg (Br+\dfrac{2}{r}\bigg )f_{R}^{\prime \prime } +\dfrac{e^{Ar^{2}}f_{R}}{(1+f_{T})}\nonumber \\&\quad \times \bigg (3ABr^{2}+B^{2}r^{2}+6A+4A^{2}r^{2} +\dfrac{2}{r^{2}}\bigg )f_{R}^{\prime }\nonumber \\&\quad -(Ar) \bigg (\dfrac{Rf_{R}-f}{(1+f_{T})}\bigg ) -\dfrac{T^{\prime }}{(1+f_{T})\rho ^{\prime }} \bigg (f_T^{\prime }p_{r}+\rho f_T \bigg )\nonumber \\&\quad -\dfrac{f_T}{(1+f_T)} \bigg (\rho ^{\prime }-\dfrac{\rho f_{R}^{\prime }R^{\prime }}{\rho ^{\prime }f_{R}} \bigg ). \end{aligned}$$
(15)

After simplifying Eq. (15), we get

$$\begin{aligned} \Omega&=-\dfrac{dp_{r}}{dr}-Br\rho -\bigg (Br+\dfrac{2}{r}-\dfrac{f_{R}^{\prime }R^{\prime }}{f_{R}\rho ^{\prime }}\bigg )p_{r} +\dfrac{2p_{t}}{r} \nonumber \\&\quad +\dfrac{e^{-Ar^{2}}}{(1+f_{T})} \bigg (-Br-\dfrac{2}{r}+\dfrac{BrR^{\prime }}{\rho ^{\prime }} +\dfrac{2ArR^{\prime }}{\rho ^{\prime }} +\dfrac{2R^{\prime }}{r\rho ^{\prime }}\bigg )f_{R}^{\prime \prime }\nonumber \\&\quad + \dfrac{1}{(1+f_{T})} \bigg (-ABr^{2}e^{-Ar^{2}} +B^{2}r^{2}e^{-Ar^{2}} -4A^{2}r^{2}e^{-Ar^{2}}\nonumber \\&\quad +Be^{-Ar^{2}} -\dfrac{fR^{\prime }f_{R}}{2f_{R}\rho ^{\prime }} \bigg )f_{R}^{\prime } \nonumber \\&\quad -\bigg (Br+2Ar+\dfrac{2}{r}\bigg ) \dfrac{e^{-Ar^{2}}(f_{R^{\prime }})^{2}R^{\prime }}{f_{R}(1+f_{T})\rho ^{\prime }} -\dfrac{T^{\prime }}{(1+f_{T})\rho ^{\prime }}\nonumber \\&\quad \times \bigg (\dfrac{f_T}{2}+f_T^{\prime }p_{r}+\rho f_T \bigg ) -\dfrac{f_T}{(1+f_T)}\bigg (\rho ^{\prime } -\dfrac{\rho f_{R}^{\prime }R^{\prime }}{\rho ^{\prime }f_{R}} \bigg ). \end{aligned}$$
(16)

Equation (15) serves as the fundamental equation that will enable us to investigate stable and unstable regions within anisotropic stellar configuration in the framework of f(RT) gravity by applying local density perturbations.

3 Local density perturbation technique in f(RT)

This section illustrates the basic formulation of the LDP technique in the framework of f(RT) theory of gravity to analyze the stability of an anisotropic configuration with barotropic EoS, i.e., \(p_{r}=p_{r}(\rho )\) and \(p_{t}=p_{t}(\rho )\). LDP is employed in the system to perturb all the physical variables, which are assumed to be density-dependent in this study. Subsequently, the configuration is disturbed from its hydrostatic equilibrium state due to LDP resulting in the occurrence of radial forces \(\frac{\delta \Omega }{\delta \rho }\). Our present study focuses on analyzing the change in the signs of radial forces \(\frac{\delta \Omega }{\delta \rho }\), where cracking occurs due to inwardly directed radial forces experience a change from negative to positive values \((\frac{\delta \Omega }{\delta \rho }<0 \rightarrow \frac{\delta \Omega }{\delta \rho }>0)\), while outwardly directed forces experience a change from positive to negative values \((\frac{\delta \Omega }{\delta \rho } >0 \rightarrow \frac{\delta \Omega }{\delta \rho }<0)\) lead to overturning within the configuration. To perturb all physical variables within the configuration, we apply the LDP \(\rho \rightarrow \rho +\delta \rho \), as follows

$$\begin{aligned}&\rho (\rho +\delta \rho )=\rho (\rho )+\delta \rho . \end{aligned}$$
(17)
$$\begin{aligned}&\rho '(\rho +\delta \rho )=\rho '(\rho ) +\dfrac{\rho ''}{\rho '}\delta \rho . \end{aligned}$$
(18)
$$\begin{aligned}&p_{r}(\rho +\delta \rho )= p_{r}(\rho ) +\dfrac{ dp_{r}}{d\rho }\delta \rho . \end{aligned}$$
(19)
$$\begin{aligned}&\dfrac{d p_{r}}{dr}(\rho +\delta \rho )=\dfrac{d p_{r}}{dr} +\bigg [\dfrac{d}{dr}\bigg ( \dfrac{d p_{r}}{d\rho }\bigg ) +\dfrac{d^{2}\rho }{dr^{2}}\bigg ( \dfrac{d p_{r}}{d\rho }\bigg ). \dfrac{d r}{d\rho } \bigg ]. \end{aligned}$$
(20)
$$\begin{aligned}&p_{t}(\rho +\delta \rho )= p_{t}(\rho ) +\dfrac{ dp_{t}}{d\rho }\delta \rho . \end{aligned}$$
(21)
$$\begin{aligned}&f (\rho +\delta \rho )= \bigg [\dfrac{ R'}{\rho '} f_{R} +\dfrac{ \phi '}{\rho '} f_{\phi } \bigg ] \delta \rho . \end{aligned}$$
(22)
$$\begin{aligned}&f_{R}(\rho +\delta \rho )= f_{R}(\rho ) +\dfrac{ R'}{\rho '} f_{R}'\delta \rho . \end{aligned}$$
(23)
$$\begin{aligned}&f_{R}'(\rho +\delta \rho )= f_{R}'(\rho ) +\dfrac{ R'}{\rho '} f_{R}''\delta \rho . \end{aligned}$$
(24)
$$\begin{aligned}&f_{R}''(\rho +\delta \rho )= f_{R}''(\rho ) +\dfrac{ R'}{\rho '} f_{R}'''\delta \rho . \end{aligned}$$
(25)
$$\begin{aligned}&f_{T}(\rho +\delta \rho )= f_{T}(\rho ) +\dfrac{ f_{T}'}{\rho '} \delta \rho . \end{aligned}$$
(26)
$$\begin{aligned}&f_{T}^{\prime }(\rho +\delta \rho )= f_{T}^{\prime }(\rho ) +\dfrac{ f_{T}^{\prime \prime }{T}^{\prime }}{\rho '} \delta \rho . \end{aligned}$$
(27)
$$\begin{aligned}&R'(\rho +\delta \rho )=R'(\rho ) +\dfrac{ R''}{\rho '} \delta \rho . \end{aligned}$$
(28)
$$\begin{aligned}&T'(\rho +\delta \rho )= T'(\rho )+\dfrac{ T''}{\rho '} \delta \rho . \end{aligned}$$
(29)

Further, the perturbed form of Eq. (16) is expressed as,

$$\begin{aligned} \Omega&=\Omega _{0}\bigg (\rho , ~\rho ', ~p_{r}, ~ p_{r}', ~ p_{t},~f, ~f_{R},\nonumber \\&\quad ~f_{R}', ~ f_{R}'', ~f_{T}, ~f_{T}', ~R^{\prime }, ~T' \bigg )+ \delta \Omega , \end{aligned}$$
(30)

where

$$\begin{aligned} \delta \Omega&=\dfrac{\partial \Omega }{\partial \rho }\delta \rho \ +\dfrac{\partial \Omega }{\partial \rho '}\delta \rho ' + \dfrac{\partial \Omega }{\partial p_{r}}\delta p_{r} +\dfrac{\partial \Omega }{\partial p_{r}'}\delta p_{r}' + \dfrac{\partial \Omega }{\partial p_{t}}\delta p_{t}\nonumber \\&\quad +\dfrac{\partial \Omega }{\partial f}\delta f + \dfrac{\partial \Omega }{\partial f_{R}}\delta f_{R} + \dfrac{\partial \Omega }{\partial f_{R}'}\delta f_{R}' + \dfrac{\partial \Omega }{\partial f_{R}''}\delta f_{R}'' \nonumber \\&\quad + \dfrac{\partial \Omega }{\partial f_{T}}\delta f_{T} + \dfrac{\partial \Omega }{\partial f_{T}'}\delta f_{T}' + \dfrac{\partial \Omega }{\partial R'}\delta R' + \dfrac{\partial \Omega }{\partial T'}\delta T' . \end{aligned}$$
(31)

Equation (31) simplifies to

$$\begin{aligned} \dfrac{\delta \Omega }{\delta \rho }&= \dfrac{\partial \Omega }{\partial \rho } + \dfrac{\partial \Omega }{\partial \rho '} \bigg (\ \rho '' (\rho ')^{-1}\ \bigg ) + \dfrac{\partial \Omega }{\partial p_{r}} \ \bigg (\ \dfrac{dp_{r}}{d\rho } \ \bigg )\nonumber \\&\quad + \dfrac{\partial \Omega }{\partial p_{r}'} \ \bigg (\ \bigg (\dfrac{dp_{r}}{d\rho }\bigg )^{\prime } +\bigg (\dfrac{dp_{r}}{d\rho }\bigg ) \ \rho '' (\rho ')^{-1}\ \bigg ) + \dfrac{\partial \Omega }{\partial p_{t}} \ \bigg (\ \dfrac{dp_{t}}{d\rho }\ \bigg ) \nonumber \\&\quad \times \dfrac{\partial \Omega }{\partial f} \bigg (\dfrac{f_{R}'R'}{\rho '}+\dfrac{f_{T}'T'}{\rho '}\bigg ) + \dfrac{\partial \Omega }{\partial f_{R}} \bigg (\dfrac{f_{R}'R^{\prime }}{\rho '} \bigg )\nonumber \\&\quad + \dfrac{\partial \Omega }{\partial f_{R}'} \bigg (\ \dfrac{f_{R}''R^{\prime }}{\rho '} \bigg ) + \dfrac{\partial \Omega }{\partial f_{R}''} \bigg ( \dfrac{f_{R}'''R^{\prime }}{\rho '} \bigg ) +\dfrac{\partial \Omega }{\partial f_{T}} \bigg ( \ f_{T}' \ \dfrac{T^{\prime }}{\rho '}\bigg ) \nonumber \\&\quad +\dfrac{\partial \Omega }{\partial f_{T}'} \bigg ( \ \dfrac{ f_{T}''T^{\prime }}{\rho '} \bigg ) +\dfrac{\partial \Omega }{\partial R'} \bigg (\ \dfrac{R^{\prime \prime }}{\rho '} \bigg ) +\dfrac{\partial \Omega }{\partial T'} \bigg (\ \dfrac{T^{\prime \prime }}{\rho '} \bigg ) . \end{aligned}$$
(32)

The partial derivatives in Eq. (32) are as follows:

$$\begin{aligned} \dfrac{\partial \Omega }{\partial \rho }&=-Br. \end{aligned}$$
(33)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial \rho '}&= -\dfrac{f_{R}'R'p_r}{f_{R}(\rho ')^{2}} +\dfrac{e^{-Ar^{2}}}{(1+f_T)}\nonumber \\&\quad \times \bigg (\dfrac{-BrR^{\prime }}{(\rho ')^{2}} -\dfrac{2ArR^{\prime }}{(\rho ')^{2}} -\dfrac{-2R'}{r(\rho ')^{2}}\bigg )f_{R}^{\prime \prime }\nonumber \\&\quad +\dfrac{e^{-Ar^{2}}}{(1+f_T)} \bigg (\dfrac{f R' }{2f_{R}{(\rho ')^{2}}}\bigg ) f_{R}'\nonumber \\&\quad +\dfrac{e^{-Ar^{2}}(f_{R}^{\prime })^{2}R' }{{ f_{R}(1+f_T) (\rho ')^{2}}}\bigg (2Ar+Br+\dfrac{2}{r}\bigg )\nonumber \\&\quad +\dfrac{T^{\prime }}{(1+f_{T})(\rho ')^{2}} \bigg (\dfrac{f_T}{2}+f_T^{\prime }p_{r}+\rho f_T \bigg )\nonumber \\&\quad -\dfrac{f_T}{(1+f_T)} \bigg (1+\dfrac{\rho f_{R}^{\prime }R^{\prime }}{(\rho ')^{2}f_{R}} \bigg ). \end{aligned}$$
(34)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial p_{r}}&=-\bigg (Br+\dfrac{2}{r} -\dfrac{f_{R}'R'}{f_{R}^2\rho '}\bigg ) -\dfrac{T^{\prime }}{(1+f_{T})\rho '}. \end{aligned}$$
(35)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial p_{r}'}&= -1. \end{aligned}$$
(36)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial p_{t}}&= \dfrac{2}{r}. \end{aligned}$$
(37)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f}&=-\dfrac{e^{-Ar^{2}}}{(1+f_T)} \bigg (\dfrac{f_{R}'R'}{2f_{R}\rho ^{\prime }}\bigg ). \end{aligned}$$
(38)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f_{R}}&=\dfrac{-f_{R}^{\prime }R'p_{r}}{(f_{R})^2\rho '} +\dfrac{1}{(1+f_T)}\bigg (\dfrac{fR'f_{R}'}{2(f_{R})^{2}\rho '}\bigg )\nonumber \\&\quad +\dfrac{e^{-Ar^{2}} (f_{R}')^{2}R'}{(f_{R})^{2}(1+f_T)\rho '} \bigg (2Ar+Br+\dfrac{2}{r}\bigg )\nonumber \\&\quad -\dfrac{f_T}{(1+f_T)} \bigg (\dfrac{\rho f_{R}^{\prime }R^{\prime }}{\rho ^{\prime }(f_{R})^2}\bigg ). \end{aligned}$$
(39)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f_{R}'}&=\dfrac{R'p_{r}}{{f_{R}}\rho '}-\dfrac{fR^{\prime }}{2f_{R}(1+f_T)\rho ^{\prime }} +\dfrac{e^{-Ar^{2}}}{(1+f_T)}\nonumber \\&\quad \times \bigg (-ABr^{2}+B^{2}r^{2}-4A^{2}r^{2}+B\bigg )\nonumber \\&\quad -\dfrac{2e^{-Ar^{2}} f_{R}'R'}{f_{R}(1+f_T)\rho '} \bigg (Br+2Ar+\dfrac{2}{r}\bigg )\nonumber \\&\quad +\dfrac{f_T}{(1+f_T)} \bigg (\dfrac{\rho R^{\prime }}{\rho ^{\prime }f_{R}}\bigg ). \end{aligned}$$
(40)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f_{R}''}&=\dfrac{e^{-Ar^{2}}}{(1+f_T)}\bigg (\dfrac{BrR^{\prime }}{\rho ^{\prime }} +\dfrac{2ArR^{\prime }}{\rho ^{\prime }}+\dfrac{2R^{\prime }}{r\rho ^{\prime }} -\dfrac{2}{r}-Br\bigg ). \end{aligned}$$
(41)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f_{T}}&=-\dfrac{e^{-Ar^{2}}}{(1+f_T)^2}\bigg (\dfrac{BrR^{\prime }}{\rho ^{\prime }} +\dfrac{2ArR^{\prime }}{\rho ^{\prime }}+\dfrac{2R^{\prime }}{r\rho ^{\prime }} -\dfrac{2}{r}-Br\bigg )f_{R}''\nonumber \\&\quad -\dfrac{ff_{R}'R^{\prime }}{2f_{R}(1+f_T)^2\rho ^{\prime }} \nonumber \\&\quad -\dfrac{e^{-Ar^{2}}}{(1+f_T)} \bigg (-ABr^{2}+B^{2}r^{2}-4A^{2}r^{2}+B\bigg )f_{R}'\nonumber \\&\quad +\dfrac{e^{-Ar^{2}} (f_{R}')^{2}R'}{f_{R}(1+f_T)^{2}\rho '} \bigg (Br+2Ar+\dfrac{2}{r}\bigg ) \nonumber \\&\quad +\dfrac{T^{\prime }}{(1+f_{T})\rho '}\nonumber \\&\quad \times \bigg (-1+\dfrac{f_{T}}{(1+f_{T})}-\rho +\dfrac{\rho f_{T}}{(1+f_{T})} +\dfrac{f_{T}'p_{r}}{(1+f_{T})}\bigg ). \end{aligned}$$
(42)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial f_{T}^{\prime }}&=-\dfrac{T^{\prime }p_{r}}{(1+f_{T})\rho '}. \end{aligned}$$
(43)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial R'}&=\dfrac{p_{r}f_{R}'}{{f_{R}}\rho '} -\dfrac{ff_{R}'}{2f_{R}(1+f_T)\rho ^{\prime }} +\dfrac{e^{-Ar^{2}}}{(1+f_T)}\nonumber \\&\quad \times \bigg (\dfrac{Br}{\rho ^{\prime }}+\dfrac{2Ar}{\rho ^{\prime }} +\dfrac{2}{r\rho ^{\prime }}\bigg )f_{R}^{\prime \prime }\nonumber \\&\quad -\dfrac{e^{-Ar^{2}} ( f_{R}')^{2}}{f_{R}(1+f_T)\rho '} \bigg (2Ar+Br+\dfrac{2}{r}\bigg )+\dfrac{\rho f_T f_{R}' }{f_{R}(1+f_T)\rho '}. \end{aligned}$$
(44)
$$\begin{aligned} \dfrac{\partial \Omega }{\partial T'}&=-\dfrac{1}{\rho '(1+f_T)}\bigg (f_T+\rho f_T+ f_{T}'p_{r}\bigg ). \end{aligned}$$
(45)
Table 1 Calculated values of A, B, M and R of compact stars
Fig. 1
figure 1

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for Her X-1: \(A= 0.0069062764281~\text {km}^{-2}\), \(B=0.0042673646183~\text {km}^{-2}\)

Fig. 2
figure 2

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for SAXJ1808.4-3658: \(A= 0.018 231 569 740~\text {km}^{-2}\), \(B=0.014 880 115 692~\text {km}^{-2}\)

Fig. 3
figure 3

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for 4U 1820-30: \(A= 0.010906441192~\text {km}^{-2}\), \(B=0.009880 9523811~\text {km}^{-2}\)

Fig. 4
figure 4

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for PSR J 1614-2230: \(A=0.003689961987~\text {km}^{-2}\), \(B=0.002323332389~\text {km}^{-2}\)

Fig. 5
figure 5

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for Vela X-1: \(A=0.003558090580~\text {km}^{-2}\), \(B=0.002191967045~\text {km}^{-2}\)

Fig. 6
figure 6

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for Cen X-3: \(A=0.003388625404~\text {km}^{-2}\), \(B=0.002026668572~\text {km}^{-2}\)

Fig. 7
figure 7

Plots of \(\dfrac{\delta \Omega }{\delta \rho }\) for RXJ 1856-37: A = 0.01109112709 \(\text {km}^{-2}\), B = 0.0148801157 \(\text {km}^{-2}\)

4 Matching conditions

In this section, we aim to estimate the values of A and B employed in the solution set, determined in the preceding section. While various options exist for the matching conditions, however for the current study [84,85,86], we examine the Schwarzschild external solution. The Schwarzschild metric is therefore expressed as

$$\begin{aligned} d{s}^{2}{} & {} = \bigg (1-\dfrac{2M}{r} \bigg )dt^{2} -\dfrac{1}{1-\dfrac{2M}{r}}d{r}^{2}-r^2 (d{\theta }^{2}\nonumber \\{} & {} \quad +sin^2{\theta }d{\phi }^{2}). \end{aligned}$$
(46)

To solve the field equations at \(r = R\), it is necessary to apply the following matching conditions to Eq. (8).

$$\begin{aligned} g^-_{tt}=g^+_{tt},\quad g^-_{rr}=g^+_{rr}, \quad \dfrac{\partial g^-_{tt}}{\partial r} =\dfrac{\partial g^+_{tt}}{\partial r}. \end{aligned}$$
(47)

Here, \((+)\) and \((-)\) signify the exterior and interior solutions, respectively. By using Eq. (47), we ascertain the constants A, B and C as

$$\begin{aligned}&A=ln\bigg (1-\dfrac{2M}{R} \bigg )^{(-1/R^2)}, \end{aligned}$$
(48)
$$\begin{aligned}&B=\dfrac{M}{R^3}-\dfrac{2M^2}{R^4}, \end{aligned}$$
(49)
$$\begin{aligned}&C=ln\bigg (1-\dfrac{2M}{R} \bigg ) -\bigg (\dfrac{M}{R}-\dfrac{2M^2}{R^2} \bigg ). \end{aligned}$$
(50)

Here, R and M signify the Schwarzschild radius and mass respectively. Consequently, employing the expressions Eqs. (48)–(50), Table 1 provides the values of A and B for various compact stars.

5 Discussion

This section outlines the occurrence of cracking by investigating the effects of LDP in the framework of \(f({\mathcal {R}}, T)\) gravity. Equation (32) signifies the perturbed state of the configuration and will be used to examine the effects of LDP. We will investigate cracking or overturning points by observing the change in signs of this perturbed state after employing LDP. In this work, to illustrate the workability of our developed technique, we consider the already developed physical viable model [87] expressed as,

$$\begin{aligned} f(R,T) = R + \lambda T , \end{aligned}$$
(51)

where \(\lambda \) is arbitrary constants. We will analyze the cracking and overturning of Her-XI, SAXJ1808.4-3658, 4U 1820-30, PSR J 1614 2230, Vela X-1, Cen X-3, and RXJ 1856-37 by plotting the distribution of forces \(\dfrac{\delta \Omega }{\delta \rho }\). The mass, radius, and values of constant parameters of compact stars are given in Table 1. Further, Figs. 1, 2, 3, 4, 5, 6 and 7 in the subsequent subsections exhibit the graphical representation of the radial forces \(\dfrac{\delta \Omega }{\delta \rho }\). A significant point to mention here is that we carried out our current analysis using the software MATHEMATICA.

5.1 Star 1: Her X-1

Her XI was initially observed by Tanabaum et al. [88], which pulsates every 1.24 s and has an orbital period of 1 d. Deeter et al. [89] analyzed pulsation cycle of Her X-I by examining observational data of 7 years. To comprehend the neutron star’s development, Taam and Van den Heuvel [90] analyzed the gradual dissipation of magnetic field strength on the surface of a neutron star. Soong et al. [91] investigated the beaming pattern of the Her X-1 by analyzing the radiation emitted by it. The mass–radius ratio of Her X1 was theoretically calculated by Li et al. [92], who concluded that it matched the observational data of Her X-1. Kuster et al. [93] observed the intensity and distribution of X-ray photons emitted by Her X-1 to investigate its evolution over time. Maurya and collaborators [94] contributed to enhancing the understanding by developing an anisotropic theoretical framework and refining the previously known parameters.

The graphical analysis of \(\dfrac{\delta \Omega }{\delta \rho }\) for Her X-1 is illustrated in Fig. 1. Figure 1a–c demonstrates that star exhibit overturning within the interval \(\lambda \in (0, 0.25)\), while Fig. 1f–i depicts that star experiences cracking within the intervals \(\lambda \in [1.8, 3]\) causing instability in the configuration. However, Fig. 1d, e illustrates that star maintains stability within the interval \(\lambda \in [0.25,1.8)\). Table 2 presents a concise summary of Fig. 1a–i, highlighting the precise values at which the Her X-1 become unstable.

5.2 Star 2: SAXJ1808.4-3658

SAXJ1808.4-3658 was initially observed by Zand et al. [95]. Li et al. [96] analyzed the mass–radius relation of SAXJ1808.4-3658 relative to the mass–radius relation of neutron stars and suggested that it is likely a strange star. Recently, Bult et al. [97] examined the thermal evolution of SAXJ1808.4-3658 by analyzing data from an X-ray telescope.

The graphical analysis of \(\dfrac{\delta \Omega }{\delta \rho }\) for SAXJ1808.4-3658 is illustrated in Fig. 2. The graphs of \(\dfrac{\delta \Omega }{\delta \rho }\) for SAXJ1808.43658 demonstrate that overturning appears for \(\lambda \in (0, 0.383)\), as shown in Fig. 2a, b. Moreover, Fig. 2f–i depict that star undergo cracking at \(\lambda \in [2.2, 3]\), leading to instability in the configuration. However, Fig. 2c–e demonstrates that the star retains stability at \(\lambda \in [0.383, 2.2)\). Table 3 summarizes Fig. 2a–i concisely, highlighting the specific values at which the SAXJ1808.4-3658 becomes unstable.

5.3 Star 3: 4U 1820-30

Guver et al. [98] estimated the radius and mass of 4U 1820-30 to be \(9.11 \pm 0.40 km\) and \(1.58 \pm 0.06\) \(M_{\odot }\), respectively by analyzing its spectral data obtained from thermonuclear bursts. Recently, Suvorov [99] observed the thermonuclear bursts of 4U 1820-30 and employed numerical simulations, revealing significant details about the dynamics of a neutron star.

Figure 3 illustrates the plots of \(\dfrac{\delta \Omega }{\delta \rho }\) 4U 1820-30 for a range of model parameter \(\lambda \). Figure 3a demonstrates that 4U 1820-30 exhibit some disturbances in the form of singularities at \(\lambda \in (0.03, 1.1)\). Notably, Fig. 3b–d illustrate that no cracking or overturning appears, suggesting that the star retains stability within the interval \(\lambda \in [1.1, 1.90)\). For 4U 1820-30, cracking appears at \(\lambda \in [1.91,3]\), as illustrated in Fig. 3e–i, resulting in instability within the configuration. However, no overturning appears in this case. Table 4 presents a concise summary of Fig. 3a–i, highlighting the specific values at which the 4U 1820-30 becomes unstable.

5.4 Star 4: PSR J 1614-2230

PSR J1614-2230 is a highly magnetized dense pulsar with a spin period of 3.15 ms and was initially discovered through Parkes telescope [100]. Demorest et al. [101] analyzed the physical properties of PSR J1614-2230 utilizing the Green Bank Telescope and determined its mass to be \(1.97\pm 0.04 M_{\odot }\). Further, Gedela et al. [102] developed a model by employing the Karmarkar condition for PSR J1614-2230 to determine its mass and radii more precisely.

The graphs representing \(\dfrac{\delta \Omega }{\delta \rho }\) for PSR J1614-2230 illustrate that the star undergoes cracking for a specific range of parameter \(\lambda \) as shown in Fig. 4. PSR J1614-2230 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\) as shown in Fig. 4a. Notably, Fig. 4b–e illustrate that no cracking or overturning appears, suggesting that the star retains stability within the interval \(\lambda \in [1.1, 1.85]\). Notably, PSR J1614-2230 exhibit cracking at \(\lambda \in [1.86, 3]\) as illustrated in Fig. 4f–i. However, no overturning occurs in this case. Table 5 presents a concise summary of Fig. 4a–i, highlighting the precise values at which the PSR J 1614–2230 becomes unstable.

5.5 Star 5: Vela X-1

Vela X-1 was initially discovered by Gursky et al. [103] in the Vela constellation. Nagase et al. [104] investigated the physical characteristics of Vela X-1 and determined that it constitutes an elliptical orbit and pulsates every 283.4 s. The mass and radius of Vela X-1 were initially estimated by Quaintrell et al. [105] through Doppler spectroscopy and spectroscopic data of nearby orbiting stars. Later, Kalam et al. [106] used the stiff equation of state and precisely determined the radius of Vela X-1 to be \((9.92{-}10.31)~\text {km}\).

The plots Fig. 5 illustrating perturbed force \(\dfrac{\delta \Omega }{\delta \rho }\) for Vela X-1 demonstrate that cracking appear for a particular range of parameter \(\lambda \), suggesting instability within the configuration. Vela X-1 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\) as shown in Fig. 5a, b. Notably, Fig. 5c, d illustrate that no cracking or overturning appears, suggesting that the star retains stability within the interval \(\lambda \in [1.1, 1.86]\). The cracking for Vela X-1 is observed at \(\lambda \in [1.87,3]\) as illustrated in Fig. 5e–i, whereas no overturning is observed in this case. Table 6 presents a concise summary of Fig. 5a–i, illustrating the specific values at which the Vela X-1 becomes unstable.

5.6 Star 6: Cen X-3

Cen X-3 was initially reported by Chodil et al. [107], in 1967 during the analysis of the X-ray profile obtained by sound rocket. Giacconi et al. [108] made further observations in this context and discovered that it pulsates every 4.84 s.

The plots Fig. 6 demonstrate the behavior of radial forces \(\dfrac{\delta \Omega }{\delta \rho }\) for specific values of model parameter \(\lambda \). Cen X-3 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\) as shown in Fig. 6a, b. Notably, no cracking or overturning is observed within the interval \(\lambda \in [1.1, 1.85]\) , implying stability within the configuration as shown in Fig. 6c, d. The cracking for Cen X-3 is observed at \(\lambda \in [1.86,3]\) as illustrated in Fig. 6e–i, whereas no overturning is observed in this case. Table 6 presents a concise summary of Fig. 6a–i, illustrating the specific values at which the configuration becomes unstable.

5.7 Star 7: RXJ 1856-37

Walter et al. [109] first discovered RX J1856-37 as a neutron star and estimated its radius to be around 14 km based on observational data. Further studies by Pons et al. [110] suggested its mass and radius to be \(0.9 M\odot \) and 6 km respectively, however these suggested mass and radius were incompatible with equation of state (EoS). Drake et al. [111] suggested that a quark matter EoS is more appropriate for studying it because of its extremely small radius and high degree of compactness. Predictions made by Walter et al. [112], suggested that the age of RX J1856-37 should be roughly 0.5106 years. The most accurate mass \((0.98 M_{\odot })\) and radius \((6.7~\text {km})\) for RX J1856-37 was determined by Singh et al. [113] by formulating a mathematical framework for compact object, incorporating with an anisotropic inner fluid configuration within the context of embedding class one.

The graphical analysis of \(\dfrac{\delta \Omega }{\delta \rho }\) for RXJ 1856-37 is illustrated in Fig. 7. The graphs of \(\dfrac{\delta \Omega }{\delta \rho }\) for RXJ 1856-37 demonstrate that overturning appears at \(\lambda \in (0, 0.57)\), as shown in Fig. 7a, b. RXJ 1856-37 exhibit some disturbances in the form of singularities at \(\lambda \in (0.57, 1.1)\) as illustrated in Fig. 7c. However, Fig. 7d, e demonstrates that the star retains stability at \(\lambda \in (1, 2.2)\). Notably, Fig. 7f–i depict that star undergo cracking at \(\lambda \in [2.2, 3]\), leading to instability within the configuration. Table 8 summarizes Fig. 7a–i concisely, highlighting the specific values at which the RXJ 1856-37 becomes unstable.

6 Conclusion

In this manuscript, we analyzed the stability of anisotropic compact stars within the framework of f(RT) gravity by employing the cracking technique. For this purpose, we considered the anisotropic spherically symmetric matter configuration and developed a set of modified field equations Eqs. (7)–(11) within the framework of f(RT) gravity. Subsequently, we developed the hydrostatic equilibrium equation Eq. (32) by employing energy conservation law and subsequently employed Krori and Barua metric potentials [82, 83]. Furthermore, by employing LDP technique to the system with a barotropic equation of state, we perturbed all the physical variables within the configuration and developed the mathematical expression for the distribution of radial forces. Subsequently, we analyzed the perturbed state of configuration Eq. (32), to identify cracking or overturning points by investigating the changes in the signs of radial forces in a perturbed state. Specifically, we observed the cracking of Her X-1, SAXJ1808.4-3658, 4U 1820-30, PSR J 1614-2230, Vela X-1, Cen X-3, and RXJ 1856-37. Further, to illustrate the workability of our developed technique, we consider the already developed physically viable model [87] i.e., \(f(R, T) = R + \lambda T\).

Subsequently, we plotted the distribution of radial forces \(\dfrac{\delta \Omega }{\delta \rho }\) at perturbed state to analyze cracking for each star illustrated by Figs. 1, 2, 3, 4, 5, 6 and 7 in the preceding section. Tables 2, 3, 4, 5, 6, 7 and 8 presents a concise summary of Figs. 1, 2, 3, 4, 5, 6 and 7, highlighting the precise values of the model parameters at which cracking and overturning is observed for each star. In brief, we summarize our analysis as

  • Her X-I undergoes overturning at \(\lambda \in (0, 0.25)\), while cracking occurs at \(\lambda \in [1.8, 3]\), leading to unstable configuration for certain range of model parameter \(\lambda \). Nonetheless, the configuration remains stable at \(\lambda \in [0.25, 1.8)\) as shown in Fig. 1.

  • For SAXJ1808.4-3658, overturning is observed at \(\lambda \in (0, 0.383)\) and cracking at \(\lambda \in [2.2, 3]\), resulting in instability within the configuration. However, exhibits stable behavior at \(\lambda \in [0.383, 2.2)\) as illustrated in Fig. 2.

  • 4U 1820-30 exhibit some disturbances in the form of singularities at \(\lambda \in (0.03, 1.1)\). For 4U 1820-30, cracking appears at \(\lambda \in [1.91,3]\), resulting in instability within the configuration. Nonetheless, at \(\lambda \in [1.1,1.90)\) star exhibits stable behavior, as illustrated in Fig. 3.

  • PSR J1614-2230 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\). Notably, PSR J 1614-2230 exhibits cracking at \(\lambda \in [1.86, 3]\), while retains stability within the interval \(\lambda \in [1.1, 1.85]\) as shown in Fig. 4.

  • Vela X-1 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\). Vela X-1 exhibits cracking at \(\lambda \in [1.87,3]\), however at \(\lambda \in [1.1, 1.86]\) configuration retains stability, as illustrated in Fig. 5.

  • Cen X-3 exhibit some disturbances in the form of singularities at \(\lambda \in (0, 1.1)\). For Cen X-3, the instability is observed within the configuration caused by cracking at \(\lambda \in [1.86,3]\), whereas no overturning is observed in this case. However, at \(\lambda \in [1.1, 1.85]\) the configuration remains stable as illustrated in Fig. 6.

  • RXJ 1856-37 undergoes overturning at \(\lambda \in (0, 0.57)\), while cracking occurs at \(\lambda \in [2.2, 3]\), leading to unstable configuration for a certain range of model parameter \(\lambda \). Notably, RXJ 1856-37 exhibit some disturbances in the form of singularities at \(\lambda \in (0.57, 1.1)\). Nonetheless, the configuration remains stable at \(\lambda \in (1, 2.2)\) as illustrated in Fig. 7.

Table 2 Cracking and overturning points in Her X-1
Table 3 Cracking and overturning points in SAXJ1808.4-3658
Table 4 Cracking and overturning points in 4U 1820-30
Table 5 Cracking and overturning points in PSR J 1614-2230
Table 6 Cracking and overturning points in Vela X-1
Table 7 Cracking and overturning points in Cen X-3
Table 8 Cracking and overturning points in RXJ 1856-37

These results imply that cracking and overturning occur when a system experiences a disturbance that causes it to leave its hydrostatic equilibrium state. In our case, cracking occurs within the configuration for all the considered stars for a particular range of model parameter \(\lambda \), resulting in instability within the configuration. Notably, our stability analysis illustrates that even a small perturbation can significantly influence the radial forces, resulting in instability. Moreover, our developed technique is quite suitable to examine the stable and unstable regions within the configuration, as this technique refines the stability analysis of the system.