1 Introduction

The theory of polytropes is vital to the evolution of mathematical models of compact objects and it attracts many researchers due to its simple form. In the study of polytropes, the main attraction is Lane–Emden equation, which led us toward the illustration of various astrophysical phenomena. Chandrasekhar [1] initially developed the theory of polytropes in Newtonian frame work with the help of the laws of thermodynamics. Tooper [2, 3] used the hypothesis of quasi-static equilibrium form for the development of initial frame work of Newtonian polytropes. Kovetz [4] refined the work of Chandrasekhar [1] and reshaped the theory of polytropes. Abramowicz [5] was the first who presented higher dimension polytropes by developing a Lane–Emden equation in higher dimension.

The study of electromagnetism and its effect on physical properties of astrophysical objects has always fascinated researchers. Bekenstein [6] developed the hydrostatic equilibrium equation (HEe) for the description of charged star collapse. Bonnor [7, 8] presented the study of charged compact objects and described how electromagnetism affects the gravitational collapse. Bondi [9] used isotropic coordinates to analyze the contraction of stars in the presence of charge. Ray et al. [10] examined the properties of stars with higher densities and concluded that approximately \(10^{20}\) coulomb charge can be held by such stars. Herrera et al. [11] utilized structure scalars to illustrate compact objects having charge with dissipative inner fluid distribution. Takisa and Maharaj [12] presented the mathematical model of charged compact objects with polytropic EoS.

The impact of anisotropy in the theory of general relativity is very important as it is often impossible to study physical phenomena without taking it into account. Cosenza et al. [13] presented a heuristic way for mathematical modeling of compact objects with anisotropic inner fluid distribution. Herrera and Santos [14] derived the anisotropic compact models in the frame work of general relativity. Herrera and Barreto [15] adopted a novel approach with effective variables for the description of physical variables involved in the anisotropic polytropic models. Herrera et al. [16] developed the governing equations in the presence of anisotropic stress for spherically symmetries. Herrera and Barreto [17, 18] used the concept of Tolman mass to check the viability of anisotropic polytropic models. Herrera et al. [19] adopted a conformally flat approach to reduced physical parameters for simplification of the Lane–Emden equations of polytropes.

Every model for the description of stars has to be critically analyzed for stability in general relativity. Bondi [20] developed HEe for stability analysis of neutral stars. Herrera et al. [21] proposed a new way for the analysis of spherical symmetric models by means of cracking (overturning), which described the behavior of fluid distribution just after equilibrium state has been perturbed through density perturbation. Gonzalez et al. [22, 23] provided an extension of Herrera et al. [21] by introducing local density perturbation (LDP). Azam et al. [24,25,26,27,28] used LDP for the analysis of various mathematical models of compact objects. Sharif and Sadiq [29] developed the model of charged polytropes. Azam et al. [30, 31] developed the general frame work for charged polytropes with a generalized polytropic equation of state (GPEoS) for spherical and cylindrical symmetries. They analyzed these models by means of Tolman mass and Whittaker mass for spherical and cylindrical symmetries, respectively. Herrera et al. [32] have discussed the effect of small fluctuations of local anisotropy of pressure, and energy density on spherical polytropes. Sharif and Sadiq [33] have examined the effects of charge on spherical polytropes. Azam and Mardan [34] refined the work [33] for the analysis of charged polytropes.

The plan of our article is as follows. In Sect. 2, we provide some basic equations. Sections 3 and 4 are dedicated to the analysis of cracking through LDP and parametric perturbation, respectively. In the last section we conclude with our results.

2 Einstein–Maxwell field equations

We consider static spherically symmetric space-time

$$\begin{aligned} \mathrm{d}s^2=-\mathrm{e}^{\nu }\mathrm{d}t^{2}+\mathrm{e}^{\lambda }\mathrm{d}r^{2}+r^2 \mathrm{d}\theta ^{2}+r^2 \sin ^2\theta {\mathrm{d}\phi ^2}, \end{aligned}$$
(1)

where \(\nu (r)\) and \(\lambda (r)\) both depends only on radial coordinate r. The generalized form of the energy-momentum tensor for a charged anisotropic inner fluid distribution is given by

$$\begin{aligned} T_{i j}= & {} (P_t+\rho ) V_{i} V_{j} +g_{i j}P_t +(P_r - P_t) S_{i} S_{j}\nonumber \\&+\frac{1}{4\pi }(F_{i}^{m} F_{j m}-\frac{1}{4} F^{mn} F_{mn} g_{ij}), \end{aligned}$$
(2)

where \(P_t\), \(P_r\), \(\rho \), \(V_i\), \(S_i\) and \(F_{mn}\) represent the tangential pressure, radial pressure, energy density, four-velocity, four-vector and Maxwell field tensor for the inner fluid distribution. The Einstein–Maxwell field equations for the line element Eq. (1) are given by

$$\begin{aligned}&\frac{\lambda ^\prime \mathrm{e}^{-\lambda }}{r}+\frac{(1-\mathrm{e}^{-\lambda })}{r^2}=8\pi \rho +\frac{q^2}{r^4}, \end{aligned}$$
(3)
$$\begin{aligned}&\frac{\nu ^\prime \mathrm{e}^{-\lambda }}{r}-\frac{(1-\mathrm{e}^{-\lambda })}{r^2}=8\pi P_r -\frac{q^2}{r^4}, \end{aligned}$$
(4)
$$\begin{aligned}&\mathrm{e}^{-\lambda } \bigg [\frac{\nu ^{\prime \prime }}{2}-\frac{\nu ^\prime \lambda ^\prime }{4}+\frac{\nu ^{\prime ^2}}{4}+\frac{\lambda ^\prime -\nu ^\prime }{2r}\bigg ] = 8 \pi P_t+\frac{q^2}{r^4}. \end{aligned}$$
(5)

Solving Eqs. (3)–(5) simultaneously leads to HEe

$$\begin{aligned} \frac{\mathrm{d} P_r}{\mathrm{d}r}-\frac{2}{r}\Big (\Delta +\frac{q q^\prime }{8\pi r^3}\Big )+\Big (\frac{4\pi r^4 P_r-q^2+m r}{r(r^2-2mr+q^2)}\Big )(\rho +P_r)=0, \end{aligned}$$
(6)

where we have used \(\Delta =(P_t-P_r)\). We take the Reissner–Nordsträm space-time as the exterior geometry

$$\begin{aligned} \mathrm{d}s^2= & {} \Big (1-\frac{2M}{r}+\frac{Q^2}{r^2}\Big )\mathrm{d}t^2- \Big (1-\frac{2M}{r}+\frac{Q^2}{r^2}\Big )^{-1}\mathrm{d}r^2\nonumber \\&-r^2 \mathrm{d}\theta ^{2}-r^2 \sin ^2\theta {\mathrm{d}\phi ^2}. \end{aligned}$$
(7)

The junction conditions are very important in mathematical modeling of compact stars. They provide us with the criterion for the collaboration of two metrics, which might result in a physically viable solution [35, 36]. For smooth matching of two space-times, we must have

$$\begin{aligned} \mathrm{e}^{\nu }= & {} \mathrm{e}^{-\lambda }=\Big (1-\frac{2M}{r}+ \frac{Q^2}{r^2}\Big ),~~m(r)=M,~q(r)\nonumber \\= & {} Q,~P_r=0, \end{aligned}$$
(8)

and the Misner–Sharp mass [37] leads to

$$\begin{aligned} m(r)=\frac{r}{2}\left( 1-\mathrm{e}^{-\lambda }+\frac{q^2}{r^2}\right) , \end{aligned}$$
(9)

which has been used in the development of the Lane–Emden equations [30].

3 Effect of local density perturbation

In this section, we apply LDP [22, 23] on charged conformally flat polytropes in equilibrium state. In LDP scheme it is assumed that all the physical parameters involved in the model and their derivatives are functions of density. Then the density is perturbed slightly and its effects have been observed on the HEe. Two different kinds of polytropes existing in literature will be discussed here.

3.1 Case 1

We consider the GPEoS

$$\begin{aligned} P_r=\alpha _1\rho _o+K\rho _o^{\gamma }=\alpha _1\rho _o+K\rho _o^{1+\frac{1}{n}}, \end{aligned}$$
(10)

so that the original polytropic part remains conserved. Also the mass density \(\rho _o\) is related to total energy density \(\rho \) by [7]

$$\begin{aligned} \rho =\rho _{o}+n P_r. \end{aligned}$$
(11)

Now we make the following assumptions:

$$\begin{aligned} \alpha= & {} \frac{P_{rc}}{\rho _{gc}},~~~\alpha _2 =1+(n+1)(\alpha _1+\alpha \theta ),~~~\alpha _3 =(n+1)\alpha ,~~~\nonumber \\ \alpha _4= & {} \frac{4\pi P_{rc} q^2}{\alpha \alpha _3}, \end{aligned}$$
$$\begin{aligned} r=\frac{\xi }{A},~~\rho _{o}{=}\rho _{gc}\theta ^n,~~m(r) =\frac{4\pi \rho _{gc} v({\xi })}{A^3},~~A^2{=} \frac{4\pi \rho _{gc}}{(n+1)\alpha }, \end{aligned}$$
(12)

where \(P_{rc}\) is the pressure at the center of the star, \(\rho _{gc}\) is the mass density evaluated at the center of CO, \(\xi \), \(\theta \) and v are dimensionless variables. We use a conformally flat condition to find the expression of the anisotropy factor \(\Delta \). The electric part of the Weyl tensor is related to the Weyl scalar given by [7, 16]

$$\begin{aligned} W=\frac{r^3 \mathrm{e}^{-\lambda }}{6}\Bigg (\frac{\mathrm{e}^\lambda }{r^2} +\frac{\lambda ^\prime \nu ^\prime }{4} -\frac{1}{r^2} -\frac{\nu ^{\prime 2}}{4}- \frac{\nu ^{\prime \prime }}{2}-\frac{\lambda ^\prime \nu ^\prime }{2 r}\Bigg ). \end{aligned}$$
(13)

Using a conformally flat condition, i.e., \(W=0\), along with Eqs. (3)–(5) in Eq. (13), we get

$$\begin{aligned} \Delta =P_t-P_r=\frac{\mathrm{e}^{-\lambda }}{4\pi }\Bigg (\frac{\mathrm{e}^{\lambda }}{r^2} -\frac{\lambda ^\prime }{2r} -\frac{1}{r^2}\Bigg )-\frac{q^2}{4 \pi r^4}. \end{aligned}$$
(14)

Now differentiating Eq. (9) with respect to r and using the assumptions given in Eq. (12), we get

$$\begin{aligned} \frac{\mathrm{d}v(\xi )}{\mathrm{d}\xi }=\xi ^2\theta ^n(1+n\alpha _1+n\alpha \theta ) -\frac{\alpha _4}{\alpha _3\xi ^2}+\frac{\alpha _4}{\alpha _3 \xi q}\frac{\mathrm{d} q}{\mathrm{d}\xi }. \end{aligned}$$
(15)

The above equation along with Eqs. (12) and (14) yields

$$\begin{aligned} \Delta =\rho _{gc}\Bigg ((1+n\alpha _1+n\alpha \theta ) \theta ^n+3\frac{v(\xi )}{\xi ^3} -4\frac{\alpha _4}{\alpha _3 \xi ^4}+2 \frac{\alpha _4 \frac{\mathrm{d} q}{\mathrm{d} \xi }}{\alpha _3 q \xi ^3}\Bigg ). \end{aligned}$$
(16)

In order to observe the effects of LDP on conformally flat polytropes, we transform the HEe Eq. (6) by using Eqs. (10), (12) and (16) as

$$\begin{aligned}&R_1 \approx (n\alpha _1 \theta ^{n-1}+\alpha _3\theta ^{n})\frac{\mathrm{d} \theta }{\mathrm{d} \xi } -\frac{2}{\xi }\Bigg \{(\alpha _2-\alpha _1-\alpha \theta ) \theta ^{n} \nonumber \\&\quad +3\frac{v(\xi )}{\xi ^3} -4\frac{\alpha _4}{\alpha _3 \xi ^4}+2 \frac{\alpha _4 }{\alpha _3 q \xi ^3}\frac{\mathrm{d} q}{\mathrm{d} \xi } \Bigg \}\nonumber \\&\quad +(\alpha _2-1)\Bigg \{\frac{(\alpha _1+\alpha \theta )\theta ^{n}\xi ^4 - \alpha _3^{-1}\alpha _4+v(\xi )\xi }{\xi ^3\alpha _3^{-1} -2v(\xi )\xi +\alpha _3^{-1}\alpha _4 \xi }\Bigg \}\theta ^{n}\nonumber \\&\quad -\frac{\alpha _4 }{\alpha _3 q \xi ^4}\frac{\mathrm{d} q}{\mathrm{d} \xi }=0. \end{aligned}$$
(17)

Now we apply LDP to perturb all the physical variables in Eq. (17) and for this purpose we can write

$$\begin{aligned}&\theta (\rho _{gc}+\delta \rho _{gc})=\theta (\rho _{gc}) +\frac{\mathrm{d} \theta }{\mathrm{d}\rho _{gc}}\delta \rho _{gc}=\theta (\rho _{gc})+ \frac{\frac{\mathrm{d} \theta }{\mathrm{d}\xi }}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }}\delta \rho _{gc},\nonumber \\ \end{aligned}$$
(18)
$$\begin{aligned}&\frac{\mathrm{d} \theta }{\mathrm{d} \xi }(\rho _{gc}+\delta \rho _{gc})=\frac{\mathrm{d} \theta }{\mathrm{d} \xi }(\rho _{gc}) + \frac{\frac{\mathrm{d}^2 \theta }{\mathrm{d} \xi ^2}}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }} \delta \rho _{gc},\end{aligned}$$
(19)
$$\begin{aligned}&v(\rho _{gc}+\delta \rho _{gc})= v(\rho _{gc})+ \frac{\frac{\mathrm{d} v}{\mathrm{d} \xi }}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }} \delta \rho _{gc}, \end{aligned}$$
(20)
$$\begin{aligned}&P_{rc}(\rho _{gc}+\delta \rho _{gc})= P_{rc}(\rho _{gc})+ \frac{\frac{\mathrm{d} P_{rc}}{\mathrm{d} \xi }}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }} \delta \rho _{gc},\end{aligned}$$
(21)
$$\begin{aligned}&q(\rho _{gc}+\delta \rho _{gc})= q(\rho _{gc})+ \frac{\frac{\mathrm{d} q}{\mathrm{d} \xi }}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }} \delta \rho _{gc}, \end{aligned}$$
(22)
$$\begin{aligned}&\frac{\mathrm{d} q }{\mathrm{d} \xi }(\rho _{gc}+\delta \rho _{gc})=\frac{\mathrm{d} q }{\mathrm{d} \xi }(\rho _{gc}) + \frac{\frac{\mathrm{d}^2 q }{\mathrm{d} \xi ^2}}{\frac{\mathrm{d} \rho _{gc}}{\mathrm{d}\xi }} \delta \rho _{gc}. \end{aligned}$$
(23)

So the perturbed form of Eq. (17) can be written as

$$\begin{aligned} R_1=R_1 \left( \theta ,\frac{\mathrm{d} \theta }{\mathrm{d} \xi }, v, P_{rc}, q, \frac{\mathrm{d} q }{\mathrm{d} \xi }, \rho _{gc} \right) +\delta R_1, \end{aligned}$$
(24)

where

$$\begin{aligned} \delta R_1= & {} \Big (\frac{\mathrm{d} \rho _{gc}}{\mathrm{d} \xi }\Big )^{-1} \Biggl \{\frac{\partial R_1}{\partial \rho _{gc}}\delta \rho _{gc} + \frac{\partial R_1}{\partial \theta } \frac{\mathrm{d}\theta }{\mathrm{d} \xi } + \frac{\partial R_1}{\partial \frac{\mathrm{d} \theta }{\mathrm{d} \xi }} \frac{\mathrm{d}^2\theta }{\mathrm{d} \xi ^2} \nonumber \\&+ \frac{\partial R_1}{\partial v}\frac{\mathrm{d} v}{\mathrm{d} \xi }{+} \frac{\partial R_1}{\partial P_{rc}}\frac{\mathrm{d} P_{rc}}{\mathrm{d} \xi } {+} \frac{\partial R_1}{\partial q} \frac{\mathrm{d} q}{\mathrm{d} \xi } {+} \frac{\partial R_1}{\partial \frac{\mathrm{d} q }{\mathrm{d} \xi }} \frac{\mathrm{d}^2 q }{\mathrm{d} \xi ^2} \Biggr \}\delta \rho _{gc}.\nonumber \\ \end{aligned}$$
(25)

We will plot the force distribution \(\frac{\delta R_1}{\delta \rho _{gc}}\) against the dimensionless radius \(\xi \) to observe possible occurrence of cracking. We say that cracking appears if force distribution changes it sign.

3.2 Case 2

Here, we consider the GPEoS as

$$\begin{aligned} P_r=\alpha _1\rho +K\rho ^{1+\frac{1}{n}}, \end{aligned}$$
(26)

where mass density \(\rho _o\) is replaced by total energy density \(\rho \) in Eq. (10) and they are related to each other as [7]

$$\begin{aligned} \rho =\frac{\rho _o}{\bigg (1-K \rho _o^{\frac{1}{n}}\bigg )^n}. \end{aligned}$$
(27)

We make the following assumptions:

$$\begin{aligned} \alpha= & {} \frac{P_{rc}}{\rho _{c}},\quad ~~~\alpha _5=1+\alpha _1+\alpha \theta ,\nonumber \\ r= & {} \frac{\xi }{A},~~\rho _{o}=\rho _{c}\theta ^n,~~m(r) =\frac{4\pi \rho _{c} v({\xi })}{A^3},~~A^2=\frac{4\pi \rho _{c}}{(n+1)\alpha },\nonumber \\ \end{aligned}$$
(28)

where c represents the quantity at the center of the star, \(\alpha _2\), \(\alpha _3\), and \(\alpha _4\) are the same expressions as in Eq. (12) with \(\alpha \) defined in Eq. (28). Carrying out the same process as in case 1, we get

$$\begin{aligned} \frac{\mathrm{d}v(\xi )}{\mathrm{d}\xi }=\xi ^2\theta ^n-\frac{\alpha _4}{\alpha _3 \xi ^2}+\frac{\alpha _4}{\alpha _3 \xi q}\frac{\mathrm{d} q}{\mathrm{d}\xi }, \end{aligned}$$
(29)

and the anisotropy factor \(\Delta \) turns out to be

$$\begin{aligned} \Delta =\rho _{c}\Bigg (\theta ^n+3\frac{v(\xi )}{\xi ^3} -4\frac{\alpha _4}{\alpha _3 \xi ^4}+2\frac{\alpha _4 \frac{\mathrm{d} q}{\mathrm{d} \xi }}{\alpha _3 q \xi ^3}\Bigg ). \end{aligned}$$
(30)

The HEe Eq. (6) will transform as

$$\begin{aligned} \nonumber&R_2 \approx (n\alpha _1 \theta ^{n-1}+\alpha _3\theta ^{n})\frac{\mathrm{d} \theta }{\mathrm{d} \xi }\nonumber \\&\quad -\frac{2}{\xi }\Biggl \{(1+\alpha _2-\alpha _5+n(\theta _1+\alpha \theta ))\theta ^{n} \nonumber \\&\quad +3\frac{v(\xi )}{\xi ^3} -4\frac{\alpha _4}{\alpha _3 \xi ^4}+2 \frac{\alpha _4 }{\alpha _3 q \xi ^3}\frac{\mathrm{d} q}{\mathrm{d} \xi } \Biggr \} -\frac{\alpha _4 }{\alpha _3 q \xi ^4}\frac{\mathrm{d} q}{\mathrm{d} \xi }\nonumber \\&\quad +\alpha _5\Biggl \{\frac{(\alpha _1+\alpha \theta ) \theta ^{n}\xi ^4 - \alpha _3^{-1}\alpha _4+v(\xi )\xi }{\xi ^3\alpha _3^{-1}-2v(\xi )\xi +\alpha _3^{-1}\alpha _4 \xi }\Biggr \}\theta ^{n}=0,\nonumber \\ \end{aligned}$$
(31)

proceeding in the same way, the perturbed form of Eq. (31) can be written as

$$\begin{aligned} R_2=R_2 \left( \theta ,\frac{\mathrm{d} \theta }{\mathrm{d} \xi }, v, P_{rc}, q, \frac{\mathrm{d} q }{\mathrm{d} \xi }, \rho _{gc}\right) +\delta R_2, \end{aligned}$$
(32)

where

$$\begin{aligned} \nonumber \delta R_2= & {} \Big (\frac{\mathrm{d} \rho _{gc}}{\mathrm{d} \xi }\Big )^{-1} \Biggl \{\frac{\partial R_2}{\partial \rho _{gc}}\delta \rho _{gc} + \frac{\partial R_2}{\partial \theta } \frac{\mathrm{d}\theta }{\mathrm{d} \xi } + \frac{\partial R_2}{\partial \frac{\mathrm{d} \theta }{\mathrm{d} \xi }} \frac{\mathrm{d}^2\theta }{\mathrm{d} \xi ^2} \nonumber \\&+ \frac{\partial R_2}{\partial v}\frac{\mathrm{d} v}{\mathrm{d} \xi }{+} \frac{\partial R_2}{\partial P_{rc}}\frac{\mathrm{d} P_{rc}}{\mathrm{d} \xi } {+} \frac{\partial R_2}{\partial q} \frac{\mathrm{d} q}{\mathrm{d} \xi } {+} \frac{\partial R_2}{\partial \frac{\mathrm{d} q }{\mathrm{d} \xi }}\frac{\mathrm{d}^2 q }{\mathrm{d} \xi ^2} \Biggr \}\delta \rho _{gc}.\nonumber \\ \end{aligned}$$
(33)

We will plot the force distribution \(\frac{\delta R_2}{\delta \rho _{gc}}\) against the dimensionless radius \(\xi \) to observe possible occurrence of cracking. We say that cracking appears when force distribution changes it sign.

4 Effect of parametric perturbation

In this section, we will study the stability of charged polytropes by perturbing the polytropic index and anisotropy factor. For this purpose we assume that our distribution satisfies the following relation:

$$\begin{aligned} \Delta =C(\rho +P_r)\Bigg [\frac{4\pi r^4 P_r-q^2+m r}{r^2-2mr+q^2}\Bigg ], \end{aligned}$$
(34)

where C is constant, producing the following form of HEe:

$$\begin{aligned} R_3=\frac{\mathrm{d} P_r}{\mathrm{d}r}+h(\rho +P_r)\Big (\frac{4\pi r^4 P_r-q^2+m r}{r(r^2-2mr+q^2)}\Big )-\frac{q}{4\pi r^4}\frac{\mathrm{d} q}{\mathrm{d}r}, \end{aligned}$$
(35)

with \(h=1-2C\). Now we shall briefly review the main results for each case.

4.1 Case 1

Let the perturbation be carried out through polytropic model parameters,

$$\begin{aligned}&n\longrightarrow \tilde{n}+\delta n, ~~~q\longrightarrow \tilde{q}+\delta q, ~~~h\longrightarrow \tilde{h}+\delta h, \end{aligned}$$
(36)

assuming that radial pressure remains the same after perturbation, then from Eq. (10) we can write

$$\begin{aligned} \tilde{P_r}=P_r=\alpha _1 \rho _{gc}\theta ^n + K \rho _{gc}^{1+\frac{1}{n}}\theta ^{1+n}. \end{aligned}$$
(37)

Also from Eq. (11)

$$\begin{aligned} \tilde{\rho }=\rho _{gc}\theta ^{1+\tilde{n}}+\tilde{n}P_r. \end{aligned}$$
(38)

Thus the perturbed form of Eq. (26) becomes

$$\begin{aligned} \tilde{R_3}=\frac{\mathrm{d} P_r}{\mathrm{d}r}+\tilde{h} (\tilde{\rho }+P_r)\Big (\frac{4\pi r^4 P_r-q^2+\tilde{m} r}{r(r^2-2\tilde{m}r+q^2)}\Big )-\frac{\tilde{q}}{4\pi r^4}\frac{\mathrm{d} \tilde{q}}{\mathrm{d}r}=0. \end{aligned}$$
(39)

Now using Eqs. (12), (37) and (38) in Eq. (39), we get

$$\begin{aligned}&\tilde{R_3}=(n\alpha _1\theta ^{n-1}+\alpha _3 \theta ^{n})\frac{\mathrm{d} \theta }{\mathrm{d} \xi } {-} \frac{ \alpha _4 }{\alpha _3 \tilde{q}\xi ^4}\frac{\mathrm{d} \tilde{q}}{\mathrm{d} \xi } {+}\tilde{h}(\tilde{\theta ^{n}}+(2\tilde{n}+1)\nonumber \\&(\alpha _1\theta ^{n}+\alpha \theta ^{n+1}))\Bigg (\frac{(\alpha _1\theta ^{n}+ \alpha \theta ^{n+1})\xi ^4 -\alpha _3^{-1}\alpha _4+\xi \tilde{v}(\xi )}{\alpha _3^{-1}\xi ^3-2\tilde{v}(\xi )\xi ^2-\alpha _3^{-1}\alpha _4\xi }\Bigg ).\nonumber \\ \end{aligned}$$
(40)

From the above equation it follows that, up to first order, we may write

$$\begin{aligned} \delta \tilde{R_3}= & {} \tilde{R_3}(\xi ,1+\delta n, h+\delta h v+\delta v, q +\delta q),\end{aligned}$$
(41)
$$\begin{aligned} \delta {R_3}= & {} \Big (\frac{\partial {\tilde{R_3}}}{\partial \tilde{n}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=\mathrm{h},~\tilde{\mathrm{q}}=\mathrm{q}}}} \delta n + \Big (\frac{\partial {\tilde{R_3}}}{\partial \tilde{v}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=\mathrm{h},~\tilde{\mathrm{q}}=\mathrm{q}}}} \delta v\nonumber \\&+ \Big (\frac{\partial {\tilde{R_3}}}{\partial \tilde{h}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_{{\tilde{\mathrm{h}}=\mathrm{h}, ~\tilde{\mathrm{q}}=\mathrm{q}}}} \delta h+ \Big (\frac{\partial {\tilde{R_3}}}{\partial \tilde{q}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_{{\tilde{\mathrm{h}}=\mathrm{h},~\tilde{\mathrm{q}}=\mathrm{q}}}} \delta q. \end{aligned}$$
(42)

Now suppose that \(\beta =\{-2 v \xi ^2+\frac{\xi ^3}{\alpha _3}+\frac{\alpha _4}{\alpha _3 }\xi \}^{-1}\) and using Eq. (40), we obtain

$$\begin{aligned} \frac{\partial {\tilde{R_3}}}{\partial \tilde{n}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}}= & {} \beta h(\theta ^n \text {Log}[\theta ]+2 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&\times \bigg (v \xi -\frac{\alpha _4}{\alpha _3 } +\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg ) , \end{aligned}$$
(43)
$$\begin{aligned} \frac{\partial {\tilde{R_3}}}{\partial \tilde{v}}\mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}}= & {} \beta ^{2} 2 h \xi ^2 (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&\quad \times \bigg (v \xi -\frac{\alpha _4}{\alpha _3 }+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg )\nonumber \\&\quad + \beta h \xi (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 )) \end{aligned}$$
(44)
$$\begin{aligned} \frac{\partial {\tilde{R_3}}}{\partial \tilde{h}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}}= & {} \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&\times \bigg (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg ), \end{aligned}$$
(45)
$$\begin{aligned} \frac{\partial {\tilde{R_3}}}{\partial \tilde{q}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}}= & {} -\frac{8 h \pi q P_{\text {rc}}}{\alpha _3^2 \alpha } \nonumber \\&\Big \{ \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n} +\theta ^n \alpha _1 ) )+\beta ^2 \xi (\theta ^n\nonumber \\&+(1+2 n) (\alpha \theta ^{1+n} +\theta ^n \alpha _1 ) )\nonumber \\&\Big (v \xi -\frac{\alpha _4}{ \alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \Big ) \Big \}-\frac{4 \pi P_{\text {rc}} \frac{\mathrm{d} q}{\mathrm{d} \xi }}{\alpha _3^2 \alpha \xi ^4}\nonumber \\&-\frac{4 \pi q P_{\text {rc}} \frac{\mathrm{d}^2 q}{\mathrm{d} \xi ^2} }{\alpha _3^2 \alpha \xi ^4}. \end{aligned}$$
(46)

Also from Eq. (15) we have

$$\begin{aligned} \tilde{v}=\int _0^{\xi } \Bigg [\bar{\xi }^2 \big \{\theta ^{\tilde{n}}{+}\tilde{n} (\alpha _1\theta ^{n}{+}\alpha \theta ^{n+1})\big \} {-}\frac{\alpha _4}{\alpha _3 \bar{\xi }^2} {+}\frac{\alpha _4}{\alpha _3 \bar{\xi } q}\frac{d q}{d \xi }\Bigg ]\mathrm{d} \bar{\xi }\nonumber \\ \end{aligned}$$
(47)

and

$$\begin{aligned} \delta v=F_1 \delta n,~~~\delta q=\frac{F_1}{F_2}\delta n\quad ~~~\delta h=-\Gamma \delta n, \end{aligned}$$
(48)

where

$$\begin{aligned}&F_1=\int _0^{\xi } \bar{\xi }^2\big \{\theta ^{\tilde{n}}\mathrm{log} \theta + (\alpha _1\theta ^{n}+\alpha \theta ^{n+1})\big \} \mathrm{d} \bar{\xi },\nonumber \\&F_2 =\int _0^{\xi } \frac{\alpha _4}{\alpha _3 \bar{\xi } q} \Bigg [ -\frac{1}{q \bar{\xi }}+\frac{\mathrm{d} q}{\mathrm{d} \xi }+q\frac{\mathrm{d}^2 q}{\mathrm{d} \xi ^2}\Bigg ]\mathrm{d} \bar{\xi } \end{aligned}$$
(49)

and

$$\begin{aligned} \Gamma =\Biggl ( \frac{F_1\frac{\partial \tilde{{R}}_3}{\partial \tilde{v}} +F_2\frac{\partial \tilde{{R}}_3}{\partial \tilde{{q}}} +\frac{\partial \tilde{{R}}_3}{\partial \tilde{n}} }{\frac{\partial \tilde{{R}}_3}{\partial \tilde{h}}}\Biggr ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}} _{{\tilde{\mathrm{h}}=\mathrm{h},~\tilde{\mathrm{q}}=\mathrm{q}}}}. \end{aligned}$$
(50)

So

$$\begin{aligned} \delta R_3= & {} \Biggl ( \beta h (\theta ^n \text {Log}[\theta ]+2 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&\biggl (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \biggr ) \nonumber \\&- \Gamma \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&\times \biggl (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \biggr )\nonumber \\&+ F_1 \Big ( h\beta \xi (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) )\nonumber \\&+2h\beta ^2 \xi ^2 (\theta ^n+(1+2 n) \nonumber \\&\times (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \biggl (v \xi - \frac{\alpha _4}{\alpha _3} +\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \Big ) \Big ) \nonumber \\&+ \frac{F_1}{F_2} \Biggl ( -\frac{8 h \pi q P_{\text {rc}} }{\alpha _3^2\alpha } \Biggl ( \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) )+ \xi \beta ^2 (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) ) \biggl (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \Big )\Big ) \nonumber \\&- \frac{4 \pi P_{\text {rc}} \frac{\mathrm{d} q}{\mathrm{d} \xi }}{\alpha \alpha _3^2 \xi ^4}-\frac{4 \pi q P_{\text {rc}} \frac{\mathrm{d}^2 q}{\mathrm{d} \xi ^2} }{\alpha \alpha _3^2 \xi ^4} \Biggr ) \Biggr )\delta \text {n}. \end{aligned}$$
(51)

It would be more convenient to use the variable x defined by

$$\begin{aligned} \xi = \bar{A}x,\quad ~~~\bar{A}=A r_\Sigma =\xi _\Sigma , \end{aligned}$$
(52)

then

$$\begin{aligned} \delta R_3= & {} \Bigg ( \beta h (\theta ^n \text {Log}[\theta ]+2 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) (v (\bar{A}x)\nonumber \\&-\frac{\alpha _4}{\alpha _3}+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&- \Gamma \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n} +\theta ^n \alpha _1 ) ) (v (\bar{A}x)\nonumber \\&-\frac{\alpha _4}{\alpha _3}+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&+ F_1 \Biggl ( h\beta (\bar{A}x) (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) )\nonumber \\&+2h\beta ^2 (\bar{A}x)^2 (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) ) \biggl (v (\bar{A}x) - \frac{\alpha _4}{\alpha _3} +(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \biggr ) \biggr ) \nonumber \\&+ \frac{F_1}{F_2} \Biggl ( -\frac{8 h \pi q P_{\text {rc}} }{\alpha _3^2\alpha }( \beta (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \nonumber \\&+ (\bar{A}x) \beta ^2 (\theta ^n+(1+2 n) (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) (v (\bar{A}x)\nonumber \\&-\frac{\alpha _4}{\alpha _3}+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) )\Biggr ) \nonumber \\&- \frac{4 \pi P_{\text {rc}} \frac{\mathrm{d} q}{\mathrm{d} x}}{\alpha \alpha _3^2 \bar{A}^5 x^4}-\frac{4 \pi q P_{\text {rc}} \frac{\mathrm{d}^2 q}{\mathrm{d} x^2} }{\alpha \alpha _3^2 \bar{A}^6 x^4} \Biggr ) \Biggr )\delta \text {n}. \end{aligned}$$
(53)

We will use the above equation to plot the perturbed force \(\frac{\delta R_3}{\delta n}\) against the radius of the star and observe it for possible occurrence of cracking (overturning) in polytropes of the first kind, developed under the GPEoS.

4.2 Case 2

Now we apply the parametric perturbation on polytropes of the second kind. So from Eq. (26) we have

$$\begin{aligned} \tilde{P_r}=P_r=\alpha _1 \rho _c \theta ^n + K \rho _c^{1+\frac{1}{n}}\theta ^{n+1}. \end{aligned}$$
(54)

Now Eq. (39) will transform into

$$\begin{aligned} \tilde{R_4}= & {} (n\alpha _1\theta ^{n-1}+\alpha _3 \theta ^{n})\frac{\mathrm{d} \theta }{\mathrm{d} \xi } - \frac{ \alpha _4 }{\alpha _3 \tilde{q}\xi ^4}\frac{\mathrm{d} \tilde{q}}{\mathrm{d} \xi }\nonumber \\&+\tilde{h}(\tilde{\theta ^{n}}+\alpha _1\theta ^{n}+\alpha \theta ^{n+1}) \nonumber \\&\times \Bigg (\frac{(\alpha _1\theta ^{n}+ \alpha \theta ^{n+1})\xi ^4 -\alpha _3^{-1}\alpha _4+\xi \tilde{v}(\xi )}{\alpha _3^{-1}\xi ^3-2\tilde{v}(\xi )\xi ^2-\alpha _3^{-1}\alpha _4\xi }\Bigg ). \end{aligned}$$
(55)

From the above equation it follows, up to first order, that we may write

$$\begin{aligned} \delta \tilde{R_4}=\tilde{R_4}(\xi ,1+\delta n, h+\delta h v+\delta v, q +\delta q), \end{aligned}$$
(56)
$$\begin{aligned} \delta {R_4}= & {} \Big (\frac{\partial {\tilde{R_4}}}{\partial \tilde{n}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} \delta n + \Big (\frac{\partial {\tilde{R_4}}}{\partial \tilde{v}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} \delta v\nonumber \\&+ \,\,\Big (\frac{\partial {\tilde{R_4}}}{\partial \tilde{h}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_{{\tilde{h}=h, ~\tilde{q}=q}}} \delta h+ \Big (\frac{\partial {\tilde{R_4}}}{\partial \tilde{q}}\Big ) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_{{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} \delta q. \end{aligned}$$
(57)

Then using Eq. (55), we obtain

$$\begin{aligned}&\frac{\partial {\tilde{R_4}}}{\partial \tilde{n}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} = \beta h \theta ^n \text {Log}[\theta ] (v \xi -\frac{4 \pi q^2 P_{\text {rc}}}{(1+n)^2 \alpha ^3}\nonumber \\&\quad +\,\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ), \end{aligned}$$
(58)
$$\begin{aligned} \frac{\partial {\tilde{R_4}}}{\partial \tilde{v}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}}= & {} \beta h \xi (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 )\nonumber \\&+ 2 \beta ^2 h \xi ^2 (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \nonumber \\&\times \Big (v \xi -\frac{4 \pi q^2 P_{\text {rc}}}{(1+n)^2 \alpha ^3}+ \xi ^4 (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) \Big ), \end{aligned}$$
(59)
$$\begin{aligned}&\frac{\partial {\tilde{R_4}}}{\partial \tilde{h}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} =\beta (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \nonumber \\&\quad \bigg (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg ), \end{aligned}$$
(60)
$$\begin{aligned}&\frac{\partial {\tilde{R_4}}}{\partial \tilde{q}} \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}}_ {{\tilde{\mathrm{h}}=h,~\tilde{\mathrm{q}}=q}}} = \frac{8 h \pi q P_{\text {rc}}}{\alpha _3^2 \alpha } \Biggl \{ \beta (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 )\nonumber \\&\quad - \xi \beta ^2(\theta ^n+\alpha \theta ^{1+n} \nonumber \\&\quad +\theta ^n \alpha _1 ) (v \xi -\frac{4 \pi q^2 P_{\text {rc}}}{(1+n)^2 \alpha ^3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \Biggr \}\nonumber \\&\quad -\frac{4 \pi P_{\text {rc}} \frac{\mathrm{d} q}{\mathrm{d} \xi }}{(1+n)^2 \alpha ^3 \xi ^4}-\frac{4 \pi q P_{\text {rc}} \frac{\mathrm{d}^2 q}{\mathrm{d} \xi }^2}{(1+n)^2 \alpha ^3 \xi ^4}. \end{aligned}$$
(61)

From Eq. (29), we find

$$\begin{aligned} \tilde{v}=\int _0^{\xi } \Bigg [\bar{\xi }^2 \theta ^{\tilde{n}} -\frac{\alpha _4}{\alpha _3 \bar{\xi }^2}+\frac{\alpha _4}{\alpha _3 \bar{\xi } q}\frac{\mathrm{d} q}{\mathrm{d} \xi }\Bigg ]\mathrm{d} \bar{\xi }, \end{aligned}$$
(62)

and

$$\begin{aligned} \delta v=F_3 \delta n,~~~\delta q=\frac{F_3}{F_2}\delta n,~~~\delta h=-\Gamma \delta n, \end{aligned}$$
(63)

where

$$\begin{aligned} F_3=\int _0^{\xi } \bar{\xi }^2 \theta ^{\tilde{n}} \mathrm{log} \theta \mathrm{d} \bar{\xi } \end{aligned}$$
(64)

and

$$\begin{aligned} \Gamma =\left( \frac{F_1\frac{\partial \tilde{{R}}_4}{\partial \tilde{v}} +F_2\frac{\partial \tilde{{R}}_4}{\partial {\tilde{q}}} +\frac{\partial \tilde{{R}}_4}{\partial \tilde{n}} }{\frac{\partial \tilde{{R}}_4}{\partial \tilde{h}}}\right) \mathrel {\mathop {\Big |_{\tilde{n}=n,~\tilde{v}=v}} _{{\tilde{\mathrm{h}}=\mathrm{h},~\tilde{\mathrm{q}}=\mathrm{q}}}}. \end{aligned}$$
(65)
Fig. 1
figure 1

Case 1: Perturbation through LDP. \(\frac{\delta R_1}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1,~\alpha =8 \times 10 ^{-11},~\alpha _1=0.2\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 2
figure 2

Case 1: Perturbation through LDP. \(\frac{\delta R_1}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1.5,~\alpha =2 \times 10 ^{-10},~\alpha _1=0.5\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 3
figure 3

Case 1: Perturbation through LDP. \(\frac{\delta R_1}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1,~\alpha =0.5,~\alpha _1=0.8\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 4
figure 4

Case 2: Perturbation through LDP. \(\frac{\delta R_2}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1,~\alpha =8 \times 10 ^{-11},~\alpha _1=0.2\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 5
figure 5

Case 2: Perturbation through LDP. \(\frac{\delta R_2}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1.5,~\alpha =2 \times 10 ^{-10},~\alpha _1=0.5\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 6
figure 6

Case 2: Perturbation through LDP. \(\frac{\delta R_2}{\delta \rho _{gc}}\) as a function of \(\xi \) for \(n=1,~\alpha =0.5,~\alpha _1=0.8\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 7
figure 7

Case 1: Perturbation through nq and h. \(\frac{\delta R_3}{\delta n}\) as a function of x for \(n=1,~\alpha =8 \times 10 ^{-11},~\alpha _1=0.2, h=1.5, \Gamma =1.4\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 8
figure 8

Case 1: Perturbation through nq and h. \(\frac{\delta R_3}{\delta n}\) as a function of x for \(n=1,~\alpha =2 \times 10 ^{-10},~\alpha _1=0.4, h=0.5, \Gamma =1.0\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 9
figure 9

Case 1: Perturbation through nq and h. \(\frac{\delta R_3}{\delta n}\) as a function of x for \(n=1,~\alpha =0.8,~\alpha _1=0.2, h=1.5, \Gamma =1.5\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 10
figure 10

Case 2: Perturbation through nq and h. \(\frac{\delta R_4}{\delta n}\) as a function of x for \(n=1,~\alpha =8 \times 10 ^{-11},~\alpha _1=0.2, h=1.5, \Gamma =1.4\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

Fig. 11
figure 11

Case 2: Perturbation through nq and h. \(\frac{\delta R_4}{\delta n}\) as a function of x for \(n=1,~\alpha =2 \times 10 ^{-10},~\alpha _1=0.4, h=0.5, \Gamma =1.0\), red curve \(q=0.2\) \(M_\odot \), blue curve \(q=0.4\) \(M_\odot \), green curve \(q=0.6\) \(M_\odot \), magenta curve \(q=0.64\) \(M_\odot \)

So

$$\begin{aligned} \delta R_4= & {} \Bigg (\beta h \theta ^n \text {Log}[\theta ] \bigg (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg )\nonumber \\&-\beta \Gamma (\theta ^n+\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) \bigg (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg )\nonumber \\&+ F_3 \Bigg ( h \beta \xi (\theta ^n+\alpha \theta ^{1+n} \nonumber \\&+\theta ^n \alpha _1 )+ 2\beta ^2 h \xi ^2 (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \nonumber \\&\times \bigg (v \xi -\frac{\alpha _4}{\alpha _3}+\xi ^4 (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) \bigg ) \Bigg )+\frac{F_3}{F_2}\Bigg (\frac{8 h \pi q P_{\text {rc}}}{\alpha _3^2\alpha }\bigg (\beta (\theta ^n+\alpha \theta ^{1+n} \nonumber \\&+\theta ^n \alpha _1 )-\xi \beta ^2 (\theta ^n+\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \nonumber \\&\times \bigg (v \xi -\frac{4 \pi q^2 P_{\text {rc}}}{(1+n)^2 \alpha ^3}+\xi ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) \bigg ) \Bigg ) \nonumber \\&-\frac{4 \pi P_{\text {rc}} \frac{d q}{d \xi } }{(1+n)^2 \alpha ^3 \xi ^4}-\frac{4 \pi q P_{\text {rc}} \frac{d^2 q}{d \xi ^2} }{(1+n)^2 \alpha ^3 \xi ^4} \Bigg ) \Bigg ) \delta \text {n}. \end{aligned}$$
(66)

It would be more convenient to use the variable x defined by

$$\begin{aligned} \xi = \bar{A}x,\quad ~~~\bar{A}=A r_\Sigma =\xi _\Sigma , \end{aligned}$$
(67)

then

$$\begin{aligned} \nonumber \delta R_4= & {} \Bigg (\beta h \theta ^n \text {Log}[\theta ] (v (\bar{A}x) -\frac{\alpha _4}{\alpha _3}\nonumber \\&+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) -\beta \Gamma (\theta ^n+\alpha \theta ^{1+n} \nonumber \\&+\theta ^n \alpha _1 ) (v (\bar{A}x) -\frac{\alpha _4}{\alpha _3}+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) )\nonumber \\&+ F_3 \Big ( h \beta (\bar{A}x) (\theta ^n+\alpha \theta ^{1+n} \nonumber \\&+\theta ^n \alpha _1 )+ 2\beta ^2 h (\bar{A}x) ^2 (\theta ^n+\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) \bigg (v (\bar{A}x) -\frac{\alpha _4}{\alpha _3}+(\bar{A}x) ^4 (\alpha \theta ^{1+n}\nonumber \\&+\theta ^n \alpha _1 ) \bigg ) \Big )+\frac{F_3}{F_2}\Bigg (\frac{8 h \pi q P_{\text {rc}}}{\alpha _3^2\alpha }\Bigg (\beta (\theta ^n\nonumber \\&+\alpha \theta ^{1+n}+\theta ^n \alpha _1 )-(\bar{A}x) \beta ^2 (\theta ^n \nonumber \\&+\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) (v (\bar{A}x) -\frac{4 \pi q^2 P_{\text {rc}}}{(1+n)^2 \alpha ^3}\nonumber \\&+(\bar{A}x) ^4 (\alpha \theta ^{1+n}+\theta ^n \alpha _1 ) ) \Bigg ) \nonumber \\&-\frac{4 \pi P_{\text {rc}} \frac{d q}{d x} }{(1+n)^2 \alpha ^3 \bar{A}^5 x ^4}-\frac{4 \pi q P_{\text {rc}} \frac{d^2 q}{d x^2} }{(1+n)^2 \alpha ^3 \bar{A}^6x ^4} \Biggr ) \Biggr ) \delta \text {n}. \end{aligned}$$
(68)

We will use above equation to plot the perturbed force \(\frac{\delta R_4}{\delta n}\) against the radius of the star and observe it for possible occurrence of cracking (overturning) in polytropes of first kind developed under the GPEoS.

5 Conclusion and discussion

In this work, we have applied two different perturbation schemes on two types of charged polytropes, developed under the assumption of GPEoS [30]. In the first perturbation scheme, we have used LDP scheme with a conformally flat condition and sketched the force distribution function against the radius of the star. Here we have assumed that all physical parameters involved in the model and their derivatives are functions of the central density. Figures 1, 2 and 3 show the plot of the force distribution function \(\frac{\delta R_1}{\delta \rho _{gc}}\) against the dimensionless radius \(\xi \). It is observed that for different values of the central density and charge the system remains stable even after perturbation. These plots represent a picture of a system just after perturbation. We observe rapid growth in the perturbed force near the center but it becomes consistent, stable and smooth as we move from the center to the outer surface of the star. The zoom box inside the figure depicts perturbed forces near the center. It clearly indicates that as the magnitude of charge increases, the peak of the perturbed forces gradually becomes comparatively less. This indicates that the presence of charge stabilizes the system after perturbation. Such behavior is observed in both types of polytropes under LDP scheme (see Figs. 1, 2, 3, 4, 5, 6).

In the second perturbation scheme, we have perturbed the system through parameters involved in the model like charge, anisotropy and polytropic index. Such perturbation is carried out with the assumption that radial pressure remains the same even after perturbation. In this perturbation scheme, the perturbed force distribution \(\frac{\delta R_3}{\delta n}\) is plotted against the radius of the star (see Figs. 7, 8, 9). We get stable regions for small values of \(\alpha \) as shown in Figs. 7 and Figs. 8. These plots also show that the system is very sensitive toward the choice of parameters. Initially the perturbed force \(\frac{\delta R_3}{\delta n}\) shows a strong behavior near the boundary of the star (see Fig. 7) but a slight change in parameters shifts the magnitude of force toward the center of the star (see Fig. 8). In Figs. 7 and 8 stable configurations are observed. If the value of \(\alpha \) is increased significantly then the system becomes unstable after perturbation and cracking (overturning) is observed. For smaller values of charge weak cracking near the center and strong overturning occur in the outer region. For sufficiently high values of charge we observe weak overturning near the center and strong cracking in the outer regions as shown in Fig. 9. Under parametric perturbation the second kind of polytropes did not show any stable region and remains unstable under different combinations of parametric values. Cracking and overturning is observed in polytropes of the second type as shown in Figs. 10 and 11.

From the above discussion, it is concluded that charged polytropes developed under GPEoS remain stable if the LDP scheme is applied under a conformally flat condition. They are not sensitive to perturbations in central density; and such behavior appeared in both types discussed in this work. When perturbation is carried out through the parameters, then the first kind of polytropes shows a stable behavior for small values of \(\alpha \) in the presence of charge but cracking (overturning) also appeared in this case for larger values. Further, the second kind of polytropes remains unstable under a parametric perturbation. Hence the proper choice of parameters is very crucial in the study of polytropic models.