1 Introduction

A well known fact is that the compact objects such as white dwarfs, neutron stars or black hole are formed at the end point of the gravitational collapse of a star when most of their nuclear fuel has been consumed. They are supported by either nuclear or electromagnetic forces which act as an internal pressures, but gravity plays an important role in both the process of the gravitation collapse and in the final equilibrium configuration. The factor which is reasonable behind the type of the ends up object is the star’s mass. White dwarfs are formed from light stars with masses \(M<4M_{\odot }\) and radius is \(\sim 10^{-2}R_{\odot }\) Moreover it has shown that the maximum allowed mass for white dwarfs is around \(1.4M_{\odot }\). [1] (\(M_{\odot },\,R_{\odot }\) are the solar mass and solar radius respectively).

Ruderman [2] was the pioneer who proposed that the pressure inside a highly compact objects shows anisotropic in nature, i.e., it has two components: one is radial pressure \(p_r\) and other one is transverse pressure \(p_t\) orthogonal to the former. \(\Delta =p_t-p_r\) is known as anisotropic factor and \(\frac{2\Delta }{r}\) is anisotropic force which becomes attractive or repulsive according to \(p_r<p_t\) or \(p_r>p_t\). Bowers and Liang [3], in 1974, wrote a paper on the study of anisotropic distribution of matter which got wide attention. Anisotropy can be revealed due to the existence of solid stellar core or by phase transitions, pion condensation in a star [4], the presence of type-IIIA superfluid [5, 6], rotation, electromagnetic field [7,8,9] etc. The effect of pressure anisotropic has been studied in details in the Refs. [10, 11]. By using uniform matter density, anisotropic model has been investigated in [12]. Chan et al. [13] studied the role of the local pressure anisotropy in detail and showed that small anisotropies might in principle drastically change the stability of the system. Some anisotropic compact star models are obtained which admit conformal motion. The solutions depend on the conformal factor and matter density \(\rho \) [14, 15] or a relation between radial and transverse pressure etc. [14]. In Ref. [15], a new class of interior solutions for anisotropic stars are obtained by choosing a particular density distribution function of Lorentzian type as provided by Nazari and Mehdipour [16, 17] which admits conformal motion in higher dimensional noncommutative spacetime. Some researchers obtained the polytropic quark star model [21] in order to establish a relation between theory and observations. Heintzmann and Hillebrandt [19] described a model of a relativistic, anisotropic neutron star model at high densities by means of several simple assumptions and have shown that for an arbitrary large anisotropy there is no limiting mass for neutron stars, however the maximum mass of a neutron star still lies beyond \(3-4 M_{\odot }\). Sharma et al. [20] considered the theoretical possibility of anisotropy in strange stars, with densities greater than that of neutron stars but less than that of black holes. Lai and Xu [21] proposed that the polytropic equations of state are stiffer than the conventional realistic models, i.e., the MIT bag model. In the framework of a polytropic model , they show that a very low massive quark star can also exist and be still gravitationally stable even if the polytropic index \(n > 3\). The properties of compact stars depends on the assumed description of matter in their interiors. Xu et al. [22] and Azam et al. [23] studied the behavior and the physical properties of several compact objects. A general scheme for compact astrophysical objects which are not composed of neutron matter, but where, given the conditions of very high density in their interiors are presented by Alcock et al. [24] and Haensel et al. [25].

The Randall–Sundrum (RS) second brane-world model [26] is stand on the concept that our 4-dimensional space-time is a hypersurface embedded into the 5-dimensional bulk. After the work done by Randall and Sundrum [26] on brane theory, the study on embedding spacetime attracted the researchers more. If a n-dimensional space \(V_n\) can be embedded in \((n + k)\)-dimensional space, where k is a minimum number of extra dimensions, then \(V_n\) is said to be of embedding class k of n-dimensional space. Two very well known important solutions, e.g. Friedmann universe and Schwarzschild’s interior solutions are of class I, (so in this case \(k=1\)), on the other hand, Schwarzschild exterior solution is of class II \((k = 2)\) and the Kerr metric [27] is of class V \((k = 5)\). The Karmarkar condition relates to class one spacetimes. Pandey and Sharma [39] showed that the Karmarkar condition is only a necessary condition for a spacetime to be of class 1. A further requirement has to be imposed for sufficiency of the Karmarkar condition. The derivation of the Karmarkar Both charged and uncharged star model of embedding class-I spacetime extensively study in the Refs. [28,29,30,31,32,33,34,35,36,37,38].

We have organized the paper as follows: in Sect. 2 the basic field equations have been discussed, in Sect. 3 we have given a short discussion about embedding class-I spacetime and also obtained a new model. In next section we match our interior space-time with the exterior Schwarzschild line element and junction condition is also discussed. The physical analysis of the model are discussed in Sect. 5. In Sect. 6 we discussed the stability conditions of the present model and some discussions are made in the final section.

2 Basic field equations

The interior of a static spherically symmetric spacetime in standard co-ordinate \(x^a=(t,\,r,\,\theta ,\,\phi )\) is described by the following line element:

$$\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}$$
(1)

where \(\lambda \) and \(\nu \) are the functions of radial coordinate r only.

The Einstein field equation is,

$$\begin{aligned} G_{ij}=8\pi T_{ij}. \end{aligned}$$
(2)

Here \(G_{ij}\) is the Einstein’s tensor having the following expressions,

$$\begin{aligned} R_{ij}-\frac{1}{2}R g_{ij}= & {} G_{ij}, \end{aligned}$$
(3)

where \(R_{ij},\,R\) and \(g_{ij}\) are the Ricci tensors and Ricci scalar and metric tensor respectively. \(T_{ij}\) is the energy-momentum tensor of the underlying fluid distribution.

Let us assume that the matter involved in the distribution is anisotropic in nature, by using the general expression, we, therefore, get the expression for energy-momentum tensor as follows:

$$\begin{aligned} T^\mu _\xi= & {} \rho v^\mu v_\xi + p_r \chi _\xi \chi ^\mu + p_t(v^\mu v_\xi -\chi _\xi \chi ^\mu -g^\mu _\xi ), \end{aligned}$$
(4)

with \(v^\mu v_{\xi }=1=-\chi _\xi \chi ^\mu \), \(\chi _\xi \) is the unit space-like vector and \(v^\mu \) is the fluid-4 velocity of the rest frame and therefore \(v^\mu \chi _\xi =0\). The above formula gives the components of the energy-momentum tensor of an anisotropic fluid at any point in terms of the density \(\rho \), the anisotropic and transverse pressures \(p_r,\,p_t\) respectively. With the simple form of line element, \(T^\mu _\xi \) takes the form:

$$\begin{aligned} T_0^0=\rho ,\, T_1^1=-p_r,\,T_2^2=T_3^3=-p_t, \end{aligned}$$
(5)

and

$$\begin{aligned} T_j^k=0\quad { if}\;\; j\ne k, \end{aligned}$$

using (5), for the line element (1), (2) takes the form:

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

where differentiations with respect to r are denoted by \(`\prime '\) and we have chosen \(G=c=1\). Here G is the gravitational constant and c is the speed of light. The gravitational mass in a sphere of radius ‘r’ is given by,

$$\begin{aligned} m(r)=4\pi \int _0^r \rho (\omega )\omega ^2 d\omega . \end{aligned}$$
(9)

In next section we shall solve the Eqs. (6)–(8) to obtain the model of compact star.

3 A particular model

So form the above field equations (6)–(8), it is noted that we have three field equations for five unknown functions: \(e^{\nu },\,e^{\lambda },\,\rho ,\,p_r\) and \(p_t\). So to generate a model of compact star, we are free to chose any two of them, though to be a physically realistic model a number of physical conditions to be satisfied by our present model.

To generate a particular model of compact star, let us assume that the co-efficient of \(dr^2\), i.e., \(g_{rr}\) has the following form:

$$\begin{aligned} e^{\lambda }=1 + a^2 r^2 (1 + b^5 r^5)^{-n}, \end{aligned}$$
(10)

where a,b are some positive constants having the unit \(length^{-1}\) and \(n \in {\mathcal {R}}\), \({\mathcal {R}}\) is the set of real numbers. We are the first to use this metric potential.

Now using the relation between the mass function and the metric potential,

$$\begin{aligned} e^{-\lambda }= & {} 1-\frac{2m(r)}{r}, \end{aligned}$$
(11)

the mass function of the star is obtained as,

$$\begin{aligned} m(r)= & {} \frac{a^2r^3}{2\left[ a^2r^2+(1+b^5r^5)^n\right] }. \end{aligned}$$
(12)

The metric potential that we use in this paper gives a mass function which is monotonic increasing in nature and regular at the center of the star. At the same time it provides a matter density which gives a profile of monotonic decreasing in nature and gives a finite value at the center of the star. So our chosen metric potential is physically reasonable.

Now for a symmetric tensor \(b_{\mu \nu }\) of a 4-dimensional Riemannian space satisfying the Gauss and Codazzi equations given as

$$\begin{aligned} R_{\mu \nu \alpha \beta }= & {} \epsilon (b_{\mu \alpha }b_{\nu \beta }-b_{\mu \beta }b_{\nu \alpha }) \end{aligned}$$
(13)
$$\begin{aligned} b_{\mu \nu ;\alpha }-b_{\mu \alpha ;\nu }= & {} 0, \end{aligned}$$
(14)

can be embedded in 5-dimensional Pseudo-Euclidean space. where ‘(;)’ represents covariant derivatives and \(\epsilon \) takes the value \(-1\) or \(+1\) according to the normal to the manifold being time-like or space-like respectively. For the line element given in (1), the non-zero components of the Riemann curvature tensor are given as,

$$\begin{aligned} R_{2323}= & {} \,r^2\,sin^{2}\theta \,\left[ 1-e^{-\lambda }\right] \\ R_{1212}= & {} \frac{1}{2}\,\lambda '\,r\\ R_{1224}= & {} 0 \\ R_{1414}= & {} e^{\nu }\left[ \frac{1}{2}\,\nu ''+\frac{1}{4}\,{\nu '}^{2}-\frac{1}{4}\,\lambda '\,\nu '\right] \\ R_{3434}= & {} \frac{r}{2}sin^{2}\theta \nu 'e^{\nu -\lambda }. \end{aligned}$$

It is clear that the non-zero components of the symmetry tensor \(b_{\mu \nu }\) are \(b_{11},~b_{22},~b_{33},~b_{44}\) and also \(b_{14}(=b_{41})\) due to its symmetry nature and \(b_{33}=b_{22}\sin ^2 \theta \). By substituting the components of \(b_{\mu \nu }\) from (13) we get,

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

with \(R_{2323}\ne 0\) [39]. The space-time that satisfies the condition (15) represents the space time of embedding class I.

For the condition (15), the line element (1) gives the following differential equation

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

with \(e^{\lambda }\ne 1.\) Solving Eq. (16) we get,

$$\begin{aligned} e^{\nu }=\left( A+B\int \sqrt{e^{\lambda }-1}~dr\right) ^2, \end{aligned}$$
(17)

where A and B being the constants of integration.

By using (16) and (17), from Eqs. (6) and (7), we obtain the pressure anisotropic \(\Delta =p_t-p_r\) as,

$$\begin{aligned} 8\pi \Delta = {\nu ' \over 4e^\lambda }\left[ {2\over r}-{\lambda ' \over e^\lambda -1}\right] ~\left[ {\nu ' e^\nu \over 2rB^2}-1\right] . \end{aligned}$$
(18)

From the Eq. (18), it follows that the anisotropic factor will vanish if the following two case arises:

  • Case 1:

    $$\begin{aligned} \frac{\lambda ' }{ e^\lambda -1}=\frac{2}{r}, \end{aligned}$$
    (19)

    which on integrating gives,

    $$\begin{aligned} e^{-\lambda }=1-A_1r^{2}, \end{aligned}$$
    (20)

    \(A_1\) is the constant of integration. Now using (20), from Eq. (17), we obtain the other metric co-efficient as follows:

    $$\begin{aligned} e^{\nu }= & {} \left[ A-\frac{B}{\sqrt{A_1}}\sqrt{1-A_1r^2}\right] ^2. \end{aligned}$$
    (21)

    Now using the expression of \(e^{\lambda }\) in (20), from Eq. (8), we obtain the constant matter density and this solution is nothing but the Schwarzschild’s interior solution [40].

  • Case 2:

    $$\begin{aligned} \frac{\nu ' e^\nu }{2rB^2}-1=0, \end{aligned}$$

    which on integrating, we get,

    $$\begin{aligned} e^{\nu }= & {} B^2r^2+A_2. \end{aligned}$$
    (22)

    And like previous case we obtain,

    $$\begin{aligned} e^{\lambda }= & {} \frac{A_2+2B^2r^2}{A_2+B^2r^2}. \end{aligned}$$
    (23)

    Where \(A_2\) is the constant of integration.

    The solution obtained in (22) and (23) gives, Kohler–Chao solution [41] and it gives non-vanishing Weyl tensor which is suitable for cosmological mode. So we are not interested to consider isotropic pressure.

Substituting the expression for \(e^{\lambda }\) in (17) and integrating it, the metric coefficient \(e^{\nu (r)}\) becomes,

$$\begin{aligned} e^{\nu }=\left[ A + \frac{1}{2} a B r^2 \phi _1(r)\right] ^2, \end{aligned}$$

where

$$\begin{aligned} \phi _1(r)=\text {hypergeometric }_2F_1\left[ \frac{2}{5}, \frac{n}{2}, \frac{7}{5}, -b^5 r^5\right] , \end{aligned}$$

and hypergeometric \(_2F_1\) is defined as

$$\begin{aligned} \text {hypergeometric }_2F_1(a,~b;~c;~x) = \sum _{k=0}^\infty {(a)_k (b)_k \over (c)_k} {x^k \over k!}, \end{aligned}$$
(24)

where, \(|x|<1\); \(a,\,b,\,c\) are real numbers and \(c \ne 0,\,-1,\,-2,\ldots \) Here \((a)_n\) (n is a positive integer) being Pochhammer symbol defined by,

$$\begin{aligned} (a)_n = a(a+1)\cdots (a+n-1), \end{aligned}$$

with \((a)_0=1\).

With the help of simple algebra, \((a)_n\) takes the form,

$$\begin{aligned} (a)_n= & {} \frac{\Gamma (a+n)}{\Gamma (a)}. \end{aligned}$$

Now the series expansion of r.h.s of (24) is,

$$\begin{aligned} 1+\frac{a\cdot b}{1\cdot c}x+\frac{a(a+1)b(b+1)}{1\cdot 2\cdot c(c+1)}x^2+\cdots . \end{aligned}$$

Once we have the two metric potentials, by substituting the expressions of metric co-efficient in the field equations (6)–(8), the matter density, radial and transverse pressure becomes,

$$\begin{aligned} \rho= & {} \frac{a^2}{8\pi }\frac{(1 + b^5 r^5)^n \left\{ 3 + b^5 (3 - 5 n) r^5\right\} + a^2 (r^2 + b^5 r^7)}{(1 + b^5 r^5) \left\{ a^2 r^2 + (1 + b^5 r^5)^{n}\right\} ^2} \end{aligned}$$
(25)
$$\begin{aligned} p_r= & {} \frac{a}{8\pi } \frac{-2 a A + 4 B (1 + b^5 r^5)^{\frac{n}{2}}- a^2 B r^2 \phi _1(r)}{\left\{ a^2 r^2 + (1 + b^5 r^5)^{n}\right\} \left\{ 2 A + a B r^2 \phi _1(r)\right\} } \end{aligned}$$
(26)
$$\begin{aligned} p_t= & {} \frac{a(1 + b^5 r^5)^{-1 + \frac{n}{2}} }{16 \pi \left[ a^2 r^2 + (1 + b^5 r^5)^n\right] ^2 \left\{ 2 A + a B r^2 \phi _1(r)\right\} } \nonumber \\&\times \,\left[ 4 a^2 B r^2(1 + b^5 r^5) - 2 B (1 + b^5 r^5)^{n} \phi _2(r) \right. \nonumber \\&\left. +\,a (1 + b^5 r^5)^{\frac{n}{2}}\phi _3(r)\left\{ 2 A + a B r^2 \phi _1(r)\right\} \right] . \end{aligned}$$
(27)

And the anisotropic factor \(\Delta \) is given by,

$$\begin{aligned} \Delta= & {} (p_t-p_r)\nonumber \\= & {} \frac{1}{16 \pi (1 + b^5 r^5) \left[ a^2 r^2 + (1 + b^5 r^5)^n\right] ^2 \xi (r)}\nonumber \\&\times \,\left[ a r^2 \left\{ 2 a^2 (1 + b^5 r^5) + 5 b^5 n r^3 (1 + b^5 r^5)^n\right\} \left\{ 2 a A\nonumber \right. \right. \\&\left. \left. -\, 2 B (1 + b^5 r^5)^{\frac{n}{2}} + a^2 B r^2 \phi _1(r)\right\} \right] . \end{aligned}$$
(28)

Where the expressions for \(\phi _2(r),\,\phi _3(r),\,\xi (r)\) are given by,

$$\begin{aligned} \phi _2(r)= & {} -4 + b^5 (-4 + 5 n) r^5,\\ \phi _3(r)= & {} -2 + b^5 (-2 + 5 n) r^5,\\ \xi (r)= & {} 2 A + a B r^2 \phi _1(r). \end{aligned}$$

4 Exterior spacetime and matching conditions

In this section we match our interior spacetime to the Schwarzschild exterior solution

$$\begin{aligned} ds^2= & {} \left( 1-{2M\over r}\right) dt^2-\left( 1-{2M\over r}\right) ^{-1}dr^2\nonumber \\&-\,r^2(d\theta ^2+\sin ^2 \theta d\phi ^2), \end{aligned}$$
(29)

at the boundary \(r=r_{\Sigma }\), \(r_{\Sigma }\) being the radius of the star and therefore it is obvious that \(r_{\Sigma }>2M\), M is the mass of the black hole.

Now for an isotropic fluid sphere at a stellar surface, O’Brien–Synge [42] and Robson [43] proposed a proper junction condition given by,

$$\begin{aligned} p(r_{\Sigma }+0)= & {} p(r_{\Sigma }-0), \end{aligned}$$
(30)
$$\begin{aligned} g_{ab}(r_{\Sigma }+0)= & {} g_{ab}(r_{\Sigma }-0), \end{aligned}$$
(31)
$$\begin{aligned} \partial _r g_{ab}(r_{\Sigma }+0)= & {} \partial _r g_{ab}(r_{\Sigma }-0), \end{aligned}$$
(32)

where \(r_{\Sigma }\) is the stellar radius, p is the isotropic pressure, \(g_{ab}\) is the metric components \((a,b=r,\,t,\theta , \phi )\). Now conditions (31) and (32) provide the following relationship,

$$\begin{aligned} \left( 1-\frac{2m}{r_{\Sigma }}\right) ^{-1}= & {} 1 + a^2 r_{\Sigma }^2(1 + b^5 r_{\Sigma }^5)^{-n}, \end{aligned}$$
(33)
$$\begin{aligned} 1-\frac{2m}{r_{\Sigma }}= & {} \left[ A + \frac{a B r_{\Sigma }^2\phi (r_{\Sigma })}{2}\right] ^2, \end{aligned}$$
(34)
$$\begin{aligned} \frac{2m}{r_{\Sigma }^2}= & {} a B r_{\Sigma }(1{+} b^5 r_{\Sigma }^5)^{-\frac{n}{2}} \left[ 2 A {+} a B r_{\Sigma }^2 \phi _1(r_{\Sigma })\right] , \end{aligned}$$
(35)
$$\begin{aligned} \frac{2m}{r_{\Sigma }^2\left( 1-\frac{2m}{r_{\Sigma }}\right) ^2}= & {} a^2 r_{\Sigma }(1 + b^5 r_{\Sigma }^5)^{-1 - n}\left[ 2 + b^5 (2 - 5 n) r_{\Sigma }^5\right] .\nonumber \\ \end{aligned}$$
(36)

Since we are considering the anisotropic fluid sphere the condition given in Eq. (30) changes in our present paper in presence of both radial and tangential pressure. Now \(p_r(r=r_{\Sigma })=0\) gives,

$$\begin{aligned} -2 a A + 4 B (1 + b^5 r_{\Sigma }^5)^{\frac{n}{2}}- a^2 B r_{\Sigma }^2 \phi _1(r_{\Sigma })=0, \end{aligned}$$
(37)

but there is a discontinuous tangential pressure. Now to avoid the discontinuity we calculate the surface stresses at the junction boundary by using the Darmois–Israel [44, 45] formation.

The expression for surface energy density \(\sigma \) and the surface pressure \({\mathcal {P}}\) at the junction surface \(r = r_{\Sigma }\) are obtained as,

$$\begin{aligned} \sigma= & {} -\frac{1}{4\pi r_{\Sigma }}\left[ \sqrt{e^{-\lambda }} \right] _{-}^{+} \nonumber \\= & {} -\frac{1}{4\pi r_{\Sigma }}\left[ \sqrt{1-\frac{2m}{r_{\Sigma }}}-\sqrt{\frac{(1+b^5r_{\Sigma }^5)^n}{a^2r_{\Sigma }^2 +(1+b^5r_{\Sigma }^5)^n}}\right] , \end{aligned}$$
(38)
$$\begin{aligned} {\mathcal {P}}= & {} \frac{1}{8\pi r_{\Sigma }}\left[ \left\{ 1+\frac{a\nu '}{2}\right\} \sqrt{e^{-\lambda }}\right] _{-}^{+} \nonumber \\= & {} \frac{1}{8\pi r_{\Sigma }}\left[ \frac{1-\frac{m}{r_{\Sigma }}}{\sqrt{1-\frac{2m}{r_{\Sigma }}}}-\frac{1 + \frac{2 a B r_{\Sigma }^2 (1 + b^5 r_{\Sigma }^5)^{-\frac{n}{2}}}{ 2 A + a B r_{\Sigma }^2 \phi _1(r_{\Sigma })}}{\sqrt{1 + a^2 r_{\Sigma }^2 (1 + b^5 r_{\Sigma }^5)^{-n}}}\right] .\nonumber \\ \end{aligned}$$
(39)

5 Physical analysis

  • For our present model, \(e^{\lambda (0)}=1\) and \(e^{\nu (0)}=A^2\), a positive constant, and

    $$\begin{aligned} (e^{\nu })'= & {} a^2 r (1 + b^5 r^5)^{-1 - n}\left( 2 + b^5 (2 - 5 n) r^5\right) ,\\ (e^{\nu })'= & {} a B r (1 + b^5 r^5)^{\frac{-n}{2}}\left( 2 A + a B r^2 \phi _1(r)\right) . \end{aligned}$$

    Clearly \((e^{\nu })'_{r=0}=0\) and \((e^{\lambda })'_{r=0}=0\), indicates that metric co-efficients are regular at the center.

  • The central density of the star is given by,

    $$\begin{aligned} 8\pi \rho _c= & {} 8\pi \rho (r=0)=3a^2>0, \end{aligned}$$
    (40)

    and density gradient is obtained as,

    $$\begin{aligned} 8\pi \frac{d\rho }{dr}= & {} \frac{1}{(1 + b^5 r^5)^2 \left\{ a^2 r^2 + (1 + b^5 r^5)^n\right\} ^3}\nonumber \\&\times \,\left[ -2 a^6 r^3 (1 + b^5 r^5)^2- 5 a^4 r (1 + b^5 r^5)^ n \phi _5(r)\right. \nonumber \\&\left. +\,5 a^2 b^5 n r^4 (1 + b^5 r^5)^{2n}\phi _4(r)\right] . \end{aligned}$$
    (41)

    At the point \(r=0\),

    $$\begin{aligned} \frac{d\rho }{dr}=0;~~\frac{d^{2}\rho }{dr^{2}}=\frac{-10 a^4}{\kappa }<0. \end{aligned}$$
  • The central pressure of the star is given by,

    $$\begin{aligned} p_c= & {} p_r(r=0)=p_t(r=0)=\frac{a}{8\pi }\left( -a+\frac{2B}{A}\right) >0,\nonumber \\ \end{aligned}$$
    (42)
    Table 1 The numerical values of \(a,\,A,\,B\), central density \((\rho _c)\), surface density \((\rho _s)\), central pressure \((p_c)\) are obtained by fixing \(b = 0.0095\) for a compact star of mass \(M =1.85 M_{\odot }\) and radius = 9.5 km for different values of n. The units of \(a,\,A,\,B,\,b,\,\rho _c,\,\rho _s,\,p_c\) are \(\text {km}^{-1},\,\text {km}^{-2},\,\text {km}^{-2},\,\text {km}^{-1},\,gm \cdot cm^{-3},\,gm \cdot cm^{-3},\,dyne \cdot cm^{-2}\) respectively

    and radial and transverse pressure gradients are obtained as,

    $$\begin{aligned} 8\pi \frac{dp_r}{dr}= & {} \frac{ar}{(1 + b^5 r^5)\left\{ a^2 r^2 + (1 + b^5 r^5)^n\right\} ^2 \chi (r)}\nonumber \\&\times \,\left[ \left\{ 2 A + a B r^2 \phi _1(r)\right\} \left\{ 2 a^2 B (1 + b^5 r^5)^{\frac{n}{2}}\phi _2(r)\right. \right. \nonumber \\&\left. -\,10 b^5 B n r^3 (1 + b^5 r^5)^{\frac{ 3 n}{2}}\right\} + 2 a^3 (1 + b^5 r^5)\nonumber \\&\times \,\left\{ 2 A - 2 B r + a B r^2 \phi _1(r)\right\} \nonumber \\&\times \,\left\{ 2(A + B r) + a B r^2 \phi _1(r)\right\} \nonumber \\&\left. +\,a (1 + b^5 r^5)^ n \phi _6(r)\right] \end{aligned}$$
    (43)
    $$\begin{aligned} 8 \pi \frac{dp_t}{dr}= & {} \frac{ar}{2(1 + b^5 r^5)^2 \left\{ a^2 r^2 + (1 + b^5 r^5)^n\right\} ^3 \chi (r)}\nonumber \\&\times \,\left[ -8 a^5 r^4 (B + b^5 B r^5)^2 +4 a (1 + b^5 r^5)^{2 n}\phi _8(r)\right. \nonumber \\&+\, 10 A b^5 B n r^3 (1 + b^5 r^5)^{\frac{5 n}{2}} \phi _7(r) \nonumber \\&+\,4 a^4 A B r^2 (1 + b^5 r^5)^{1 +\frac{ n}{2}}\phi _2(r) \nonumber \\&-\,2 a^2 A B (1 + b^5 r^5)^{\frac{3 n}{2}}\phi _9(r) \nonumber \\&+\,4 a^3 (1 + b^5 r^5)^n \phi _{10}(r) \nonumber \\&+\,a^3 B^2 r^4 (1 + b^5 r^5)^n \phi _{11}(r) \psi (r) \nonumber \\&\left. +\, a B r^2 (1 +b^5 r^5) \phi _{12}(r)g_1(r)\right] . \end{aligned}$$
    (44)

    Where the expressions for \(\chi (r),\,\phi _i(r)\) (i=1,2,...,12), \(g_1(r),\,\psi (r)\) are given by,

    $$\begin{aligned} \chi (r)= & {} \left\{ 2 A + a B r^2 \phi _1(r)\right\} ^2;\\ \phi _4(r)= & {} \left\{ -8 + b^5 (-3 + 5 n) r^5\right\} ;\\ \phi _5(r)= & {} 2 + b^5 r^5 \left\{ 4 + b^5 (2 + 5 (-1 + n) n) r^5\right\} \\ \phi _6(r)= & {} 20 A^2 b^5 n r^3 - 8 B^2 (1 + b^5 r^5) \\&+\, 5 a b^5 B n r^5 \phi _1(r)\left\{ 4 A + a B r^2 \phi _1(r)\right\} \\ \phi _7(r)= & {} -14 + b^5 (-4 + 5 n) r^5\\ \phi _8(r)= & {} 5 A^2 b^5 n r^3 \left\{ 7 + b^5 (2 - 5 n) r^5\right\} \\&+\,B^2 (1 + b^5 r^5)\left\{ -4 + b^5 (-4 + 5 n) r^5\right\} \\ \phi _9(r)= & {} 24 + b^5 r^5 (48 - 20 n + b^5 (24 - 70 n + 75 n^2) r^5)\\ \phi _{10}(r)= & {} B^2 r^2 (1 + b^5 r^5) \left\{ -6 + b^5 (-6 + 5 n) r^5\right\} \\&+\,A^2 \left[ 8 + b^5 r^5 \left\{ 16 - 5 n\right. \right. \\&\left. \left. +\, b^5 (-4 + 5 n) (-2 + 5 n) r^5\right\} \right] \\ \phi _{11}(r)= & {} -5 b^5 n r^3 (1 + b^5 r^5)^n \left\{ -7 + b^5 (-2 + 5 n) r^5\right\} \\&+\, a^2 \left[ 8 + b^5 r^5 \left\{ 16 - 5 n \right. \right. \\&\left. \left. +\, b^5 (-4 + 5 n) (-2 + 5 n) r^5\right\} \right] \\ \phi _{12}(r)= & {} 5 b^5 B n r^3 (1 + b^5 r^5)^{2 n}f_7(r) \\&+\, 2 a^4 B r^2 (1 + b^5 r^5)\phi _2(r) - 20 a A b^5 n r^3 \\&\times \,(1 + b^5 r^5)^{\frac{3 n}{2}}\left\{ -7 + b^5 (-2 + 5 n) r^5\right\} \\&+\, 4 a^3 A (1 + b^5 r^5)^{\frac{n}{2}}\left[ 8 + b^5 r^5 \left\{ 16 - 5 n \right. \right. \\&\left. \left. +\, b^5 (-4 + 5 n) (-2 + 5 n) r^5\right\} \right] \\&- a^2 B (1 + b^5 r^5)^n \left[ 24 + b^5 r^5 \left\{ 48 - 20 n \right. \right. \\&\left. \left. +\, b^5 (24 - 70 n + 75 n^2) r^5\right\} \right] \\ g_1(r)= & {} \text {hypergeometric }_2 F_1\left[ 1, \frac{7}{5} - \frac{n}{2}, \frac{7}{5}, -b^5 r^5\right] \\ \psi (r)= & {} \text {hypergeometric }_2F_1\left[ \frac{2}{5}, \frac{n}{2}, \frac{7}{5}, -b^5 r^5\right] ^2. \end{aligned}$$

    Now at the point \(r=0\),

  • From Eq. (42), we get,

    $$\begin{aligned} \frac{B}{A}>\frac{a}{2}. \end{aligned}$$
    (45)
    Table 2 The numerical values of the metric potential \(e^{\lambda }\) and \(e^{\nu }\) are obtained by fixing \(b = 0.0095\) for a compact star of mass \(M =1.85 M_{\odot }\) and radius = 9.5 km for different values of n
    Table 3 Matter density \(\rho \) in MeV fm\(^{-3}\) unit are obtained by fixing \(b = 0.0095\) for a compact star of mass \(M =1.85 M_{\odot }\) and radius \( = 9.5\hbox { km}\). for different values of n

    Again, in the interior of a compact star model, the inequalities \(\rho - p_r \ge 0,\, \rho - p_t \ge 0\) should satisfy what is called the dominant energy condition, proposed by Zeldovich [46]. Therefore, the above two inequalities should hold at the center of the star, which implies, \(\frac{p_c}{\rho _c}\le 1\), i.e.,

    $$\begin{aligned} \frac{B}{A}<2a. \end{aligned}$$
    (46)

    Combining the inequalities in (45) and (46), we get a bound for \(\frac{B}{A}\) as,

    $$\begin{aligned} \frac{a}{2}< \frac{B}{A}<2a. \end{aligned}$$
    (47)
  • The equation of state parameters \(\omega _r\) and \(\omega _t\) are obtained as:

    $$\begin{aligned} \omega _r=\frac{p_r}{\rho };~~\omega _t=\frac{p_t}{\rho }. \end{aligned}$$
  • The gravitational redshift is given by,

    $$\begin{aligned} Z=\sqrt{e^{-\nu }}-1=\frac{1}{A + \frac{1}{2} a B r^2 \phi _1(r)}-1, \end{aligned}$$
    (48)

    and the central redshift is given by,

    $$\begin{aligned} Z_c=\sqrt{e^{-\nu (0)}}-1=\frac{1}{A}-1. \end{aligned}$$
    (49)

    Inside the stellar interior this should be non-negative, i.e., \(\frac{1}{A}-1>0\) implies, \(0<A<1\) , this range of constant A is well satisfied with the numerical values of A obtained in Table 1.

    Now,

    $$\begin{aligned} \frac{dZ}{dr}=-\frac{4 a B r (1 + b^5 r^5)^{-\frac{n}{2}}}{\left[ 2 A + a B r^2\phi _1(r)\right] ^2}, \end{aligned}$$
    (50)

    at \(r=0\),

    $$\begin{aligned} \frac{dZ}{dr}=0, \quad \frac{d^{2}Z}{dr^{2}}=-\frac{aB}{A^2}<0. \end{aligned}$$

    It shows that the profile of gravitational redshift is a monotonic decreasing function of ‘r’.

  • The surface redshift is given by,

    $$\begin{aligned} Z_s=\sqrt{e^{\lambda (r_{\Sigma })}}-1=\sqrt{1+a^2 r_{\Sigma }^2 (1 + b^5 r_{\Sigma }^5)^{-n}}-1.\nonumber \\ \end{aligned}$$
    (51)

    In literature, we found that in the absence of a cosmological constant the surface redshift (\(z_s\)) lies in the range \(z_s\le 2\) [47,48,49]. On the other hand, Bohmer and Harko [49] showed that for an anisotropic star in the presence of a cosmological constant the surface redshift obeys the inequality \(z_s\le 5\). For our present model, the surface redshift is obtained as 0.5333 and it is interesting to note that the surface redshift of the model do not depend on n.

  • Energy condition

    The model of an anisotropic compact star will satisfy the all the energy conditions namely, (i) the Null energy condition (NEC), (ii) Weak energy condition (WEC), (iii) Strong energy condition and (iv) Dominant energy conditions if and only if the following inequalities hold:

    $$\begin{aligned} \rho -p_r\ge 0,\,\rho -p_t\ge 0,\,\rho -p_r-2p_t\ge 0. \end{aligned}$$
    (52)

    We shall check the above inequalities with the help of graphical representation.

Fig. 1
figure 1

(Left) In this figure, along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the metric co-efficient \(e^\lambda \) which is a dimensionless quantity. (middle) along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the metric co-efficient \(e^\nu \) which is a dimensionless quantity. (Right) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the matter density \(\rho \) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. All the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star \( = 9.5\hbox { km}\). by fixing \(b=0.0095~\text {km}^{-1}\)

Fig. 2
figure 2

(Left) In this figure, along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-200 \le n \le 200\) and the radial pressure \(p_r\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. (Middle) along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-200 \le n \le 200\) and the transverse pressure \(p_t\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. (Right) along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-200 \le n \le 200\) and the anisotropic factor \(\Delta \) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. All the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star \( = 9.5\hbox { km}\). by fixing \(b=0.0095~\hbox {km}^{-1}\)

Fig. 3
figure 3

(Top) In this figure, along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the ratio of radial pressure \(p_r\) to the matter density \(\rho \) which is a dimensionless quantity. (bottom) along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the ratio of transverse pressure \(p_t\) to the matter density \(\rho \) which is a dimensionless quantity. Both the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 km by fixing \(b=0.0095~\hbox {km}^{-1}\)

Fig. 4
figure 4

(Top) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and mass of the star in km unit. (Bottom) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the gravitational redshift which is also a dimensionless quantity. Both the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 km by fixing \(b=0.0095~\hbox {km}^{-1}\)

Before going to plot the model parameters of the present model one can note that the expressions of \(e^{\lambda },\,e^{\nu },\,\rho ,\,p_r,\,p_t\) etc. contains four constants \(a,\,b,\,A\) and B. So first we have to fix some reasonable values to these constants satisfying the Eqs. (33)–(36). For drawing the plots we have consider a compact star of mass \(1.85 M_{\odot }\) and radius \(= 9.5\hbox { km}\) and we fix \(b=0.0095\). For these values, by using boundary conditions, we obtain the other constants \(a,\,A,\,B\) for different values of n which have shown in Table 1.

Using the values of the constant mentioned in the table, the metric potential \(e^{\lambda }\) and \(e^{\nu }\) are plotted in Fig. 1(left) and (middle). We can see that both the metric potentials are monotonic increasing function of ‘r’. For different values of ‘n’, the numerical values of the metric potentials are obtained in table 2. The profile of the matter density \(\rho \) is shown in Fig. 1(right) which is a monotonic decreasing function of ‘r’. For different values of ‘n’, the numerical values of the matter density in MeV fm\(^{-3}\) unit are obtained in table 3. The radial pressure \(p_r\) and transverse pressure \(p_t\) are plotted in Fig. 2(left) and (middle) respectively. Both are monotonic decreasing function of ‘r’ and \(p_r(r=r_{\Sigma })=0\) where as \(p_r(r=r_{\Sigma })>0\). The measure of anisotropy \(\Delta =p_t-p_r\) is plotted in Fig. 2(right). From the graph of \(\Delta \) one can note that \(\Delta >0\) for \(0<r\le r_{\Sigma }\) and the positive nature of the anisotropic factor helps to construct more compact object which was prosed in [50] because for positive anisotropy offers an repulsive force which helps to hold the model against the collapse. Moreover at the center of the star the anisotropic factor vanishes, i.e.,\(\Delta =0\) at \(r=0\),which is also a necessary condition to construct a compact star model [51, 52]. The equation of state parameters \(\omega _r\) and \(\omega _t\) are plotted in Fig. 3(top) and (bottom) respectively. Both the profiles are monotonic decreasing functions of ‘r’ as well as \(0~\le \omega _r,\,\omega _t\le ~1\) and it verifies that the underlying fluid distribution is in-exotic in nature [53]. The profile of the mass function and gravitational redshift are shown in Fig. 4(top) and (bottom) respectively. The mass function is monotonic increasing of ‘r’ and \(m(r)_{r=0}=0\) and the gravitational redshift is monotonic decreasing function of ‘r’. However Buchdahl [54] gave a clear predictions about the maximum possible mass of relativistic stars in the form of the limit \(M<\frac{4R}{9}\). For our present model the ratio of \(\frac{M}{R}\) is obtained as 0.287 lies in the range proposed by Buchdahl [54]. The profiles of \(\rho -p_r,\,\rho -p_t,\,\rho -p_r-2p_t\) are shown in Fig. 5 and it verifies that all the inequalities stated in Eq. (52) are holds and consequently our model satisfies all the energy conditions.

6 Stability

6.1 The static stability criterion due to Harrison–Zeldovich–Novikov

Based on the work done by Harrison et al. [55] and Zeldovich–Novikov [46], for a star to be stable, it has to satisfy the inequality \(\frac{\partial M}{\partial \rho _c}>0\) (for a details discussion one may consult [56].) \(\rho _c\) is the central density of the star whose expression has given in (40) and \(M=m(r=r_{\Sigma })\). For our present model the expression is obtained as,

$$\begin{aligned} \frac{\partial M}{\partial \rho _c}=\frac{4 \pi r_{\Sigma }^3 (1 + b^5 r_{\Sigma }^5)^{-n}}{3 \left( 1 + \frac{8}{3} \rho _c \pi r_{\Sigma }^2 (1 + b^5 r_{\Sigma }^5)^{-n}\right) ^2}. \end{aligned}$$
(53)

With the help of the graphical representation, in Fig. 6, we have shown that the above inequality is satisfied by our present model.

6.2 Causality condition and method of cracking

For any relativistic anisotropic stellar model, some basic physical conditions should be satisfied, some of them have been discussed in the previous section. One of the most important properties among the physical conditions is the causality condition, i.e., the radial and transverse velocity of sound should not exceed the speed of the light, i.e., \(v_r^2,\,v_t^2 \le 1\) [57, 58]. At the same time, Le Chatelier’s principle requires that speed of sound must be positive i.e., \(v_r^2,\,v_t^2 >0\). Using the above two inequalities one gets, \(0~<v_r^2,\,v_t^2\le ~1.\)

Fig. 5
figure 5

(Left) In this figure, along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and \(\rho -p_r\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. (Middle) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and \(\rho -p_t\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. (Right) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and \(\rho -p_r-2p_t\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. All the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 k. by fixing \(b=0.0095~\text {km}^{-1}\)

Where \(v_r^2\) and \(v_t^2\) are defined as,

$$\begin{aligned} v_r^2= & {} \frac{dp_r}{d\rho } =\frac{p_r'}{\rho '} \end{aligned}$$
(54)
$$\begin{aligned} v_t^2= & {} \frac{dp_t}{d\rho } =\frac{p_t'}{\rho '}. \end{aligned}$$
(55)

In the Eqs. (54) and (55) \(`\prime '\) denotes differentiation with respect to ‘r’ and the expressions of \(\rho ',\,p_r',\,p_t'\) are obtained in Eqs. (41)–(44). The causality condition is well verified by the Fig. 7(left) and (middle).

Based on the radial and transverse velocity of sound,in 1992, Herrera [57] proposed a rule which state if the tangential speed of pressure wave \(v_t\) is larger than the radial speed of pressure waves \(v_r\) then the model is potentially stable and this fact is known as “cracking method” and mathematically it implies \(v_t^2-v_r^2<0\) is needed throughout the interior of the stellar configuration for star’s stability. Since we are dealing here very complicated expression for \(v_r\) and \(v_t\), it is not possible for us to check this inequality by analytically rather to check the inequality, we have drawn the profile of \(v_t^2-v_r^2\) in Fig. 7(right).

Now at the center of the star, the expressions for \(v_r^2\) and \(v_t^2\) are obtained as,

$$\begin{aligned} v_{r0}^2= & {} \frac{-a^2 A^2 + 2 a A B + B^2}{5 a^2 A^2};~~v_{t0}^2=\frac{-2 a^2 A^2 + 3 a A B + B^2}{5 a^2 A^2}\\ v_{t0}^2-v_{r0}^2= & {} \frac{aAB-a^2A^2}{5a^2A^2}<0~~ \Rightarrow ~\frac{B}{A}<a. \end{aligned}$$

The above inequality refines the range of \(\frac{B}{A}\) in Eq. (47) as,

$$\begin{aligned} \frac{a}{2}<\frac{B}{A}<a. \end{aligned}$$
Fig. 6
figure 6

In this figure, along x-axis, y-axis and z-axis we have respectively plotted the matter density \(\rho \) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and \(\frac{\partial M}{\partial \rho _c}\). The profile is drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star \(= 9.5\hbox { km}\). by fixing \(b=0.0095~\text {km}^{-1}\)

6.3 Adiabatic index

The adiabatic index \(\Gamma \) for an isotropic fluid sphere was proposed by Chan et al. [13] given by,

$$\begin{aligned} \Gamma = {\rho +p \over p}~{dp \over d\rho }, \end{aligned}$$
(56)

and the above definition for anisotropic fluid sphere changes as,

$$\begin{aligned} \Gamma _r = {\rho +p_r \over p_r}~{dp_r \over d\rho } \quad \text {and}\quad \Gamma _t= {\rho +p_t \over p_t}~{dp_t \over d\rho .} \end{aligned}$$
(57)

Bondi [59] proposed that, \(\Gamma >4/3\), is the condition for the stability of a Newtonian sphere and \(\Gamma =4/3\) being the condition for a neutral equilibrium. The profile of the adiabatic index \(\Gamma _r\) and \(\Gamma _t\) are shown in Fig. 8 and the numerical values of \(\Gamma _r,\,\Gamma _t\) are obtained in Table 4. We note that both \(\Gamma _r,\,\Gamma _t>\frac{4}{3}\) everywhere inside the anisotropic stellar model for all values of n.

Fig. 7
figure 7

(Left) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the radial velocity of sound \(\sqrt{\frac{dp_r}{d\rho }}\) which is a dimensionless quantity. (Middle) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the transverse velocity of sound \(\sqrt{\frac{dp_t}{d\rho }}\) which is a dimensionless quantity. (Right) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the difference between transverse and radial velocity of sound \(\sqrt{\frac{dp_t}{d\rho }}-\sqrt{\frac{dp_r}{d\rho }}\) which is a dimensionless quantity. All the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 km by fixing \(b=0.0095~\text {km}^{-1}\)

Fig. 8
figure 8

(Top) In this figure, along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the radial adiabatic index \(\Gamma _r\) which is a dimensionless quantity. (Bottom) Along x-axis, y-axis and z-axis we have respectively plotted the radius of the star in km unit, the dimensionless quantity n which lies in the range \(-\,200 \le n \le 200\) and the transverse adiabatic index \(\Gamma _t\) which is a dimensionless quantity. Both the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 km by fixing \(b=0.0095~\text {km}^{-1}\)

7 Discussion

In our present paper, a new model of compact star has been obtained by assuming the underlying fluid distribution is anisotropic in nature. The model is obtained by solving the Einstein’s field equations which contains three non linear ordinary differential equations with five unknown functions (\(\rho ,\,p_r,\,p_t,\,e^{\lambda },\,e^{\nu }\)). So to solve the equations one have to choose any two of them and by our knowledge of algebra we can do it in \(5C_2=10\) different ways. If one choose Krori–Barua ansatz [60], both \(e^{\lambda }\) and \(e^{\nu }\) are known functions of ‘r’ and by choosing this ansatz one need not solve any differential equations to model a compact star rather one has to just replace the expressions for the metric co-efficients and has to perform some algebraic calculations. In literature several number of papers have done by choosing KB ansatz [53, 61,62,63,64,65,66,67,68]. Some compact star models are developed by choosing metric co-efficients \(e^{\lambda }\) along with a reasonable equation of state (relation between the matter density \(\rho \) and radial pressure \(p_r\)) [69,70,71,72,73,74], by choosing \(e^{\lambda }\) along with \(p_r\) [75,76,77].

In present paper we obtain a new class of compact star model in embedding class one spacetime. The study has been done by choosing a new expression for \(e^{\lambda }\) and the reason of adopting such an metric potential has been discussed earlier. Since our spacetime satisfy the Karmakar’s condition the other metric co-efficient has been obtained very easily from a well known relation, as in case of embedding class-I spacetime the two metric co-efficients are related to each other by a differential equation. So this model has been obtained without assuming any equation of state (a relation between the matter density and the pressure). But we have shown the relation between the pressure and density through graphical representation in Fig. 9. Figure 9 shows that \(p_r\) vs. \(\rho \) and \(p_t\) vs. \(\rho \) follow almost linear equation of state. The value of the constant a and both central density \(\rho _c\) and central pressure \(p_c\) increase as n increases on the contrary the values of the integrating constant A decreases as n increases and B remains unchanged for all values of n.

In 2008, Herrera et al. [79] proposed an algorithm to obtain static spherically symmetric anisotropic solutions of Einstein’s field equations and they showed that this solution can be generated from EFEs by two generating functions \(\varsigma (r),\,\Pi (r)\) given as,

$$\begin{aligned} e^{\nu (r)}= & {} \exp \int \left[ \left( 2\varsigma (r)-\frac{2}{r}\right) dr\right] , \end{aligned}$$
(58)
$$\begin{aligned} \Pi (r)= & {} p_r-p_t. \end{aligned}$$
(59)

For our present model, these two generating functions are obtained as,

$$\begin{aligned} \varsigma (r)= & {} \frac{1}{r} + \frac{2 a B r (1 + b^5 r^5)^{-\frac{n}{2}}}{ 2 A + a B r^2 \phi _1(r)} \end{aligned}$$
(60)
$$\begin{aligned} \Pi (r)= & {} -\Delta . \end{aligned}$$
(61)

The most important characteristic of the present study is that all the results have been discussed through 3- dimensional analysis when \(-200\le n \le 200\). Similar plot can be drawn for \(n>200\) as well as \(n<-200\).

Table 4 The numerical values of \(\Gamma _r\) and \(\Gamma _t\) are obtained by fixing \(b = 0.0095\) for a compact star of mass \(M =1.85 M_{\odot }\) and radius \( = 9.5\hbox { km}\). for different values of n
Fig. 9
figure 9

In this figure we have shown the variation of the radial and transverse pressure with respect to the matter density. (Top) Along x-axis and y-axis we have respectively plotted the matter density \(\rho \) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit and radial pressure \(p_r\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. (Bottom) Along x-axis and y-axis we have respectively plotted the matter density \(\rho \) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit and transverse pressure \(p_t\) in \(\hbox {MeV}\,\hbox {fm}^{-3}\) unit. Both the profiles are drawn for a compact star of mass \(M =1.85 M_{\odot }\) and radius of the star = 9.5 km by fixing \(b=0.0095~\text {km}^{-1}\). Both the figures are drawn for \(n=100\)