1 Introduction

The studies on anisotropic compact stars have always remained a topic of great interest in relativistic astrophysics. The detailed work of several scientists [1,2,3,4,5] made our understanding clear of the highly dense spherically symmetric fluid spheres having a pressure anisotropic in nature. Usually anisotropy arises due to the presence of a mixture of fluids of different types, rotation, existence of superfluid, presence of magnetic field or external field and phase transitions etc. According to Ruderman [2] for a high density (>10\(^{15}\,\)gm/cm\(^{3}\)) anisotropy is the inherent nature of nuclear matter and their interactions are relativistic. In this connection some other work on the anisotropic compact star models can be found in Refs. [6,7,8,9,10,11,12,13].

A recent study by Randall–Sundram and Anchordoqui–Bergliaffa [14, 15] re-establishes the idea that our 4-dimensional spacetime is embedded in higher dimensional flat space as predicted earlier by Eddington [16]. It is well known that the manifold \({V}_{n}\) can be embedded in pseudo-Euclidean space of \(m=n(n+1)/2\) dimensions. The class of manifold \({V}_{n}\) which is less than or equal to \(m-n=n(n-1)/2\) can be defined as the minimum extra dimension (p) of the pseudo-Euclidean space required for embedding \({V}_{n}\) in \({E}_{m}\). It is to be noted that when \(n=4\), i.e. for a relativistic spacetime \({V}_{4}\), the corresponding value of the relativistic embedding class p is 6. The values of the same for the plane and spherical symmetric spacetime are, respectively, 3 and 2. The class of Kerr is 5 [17] whereas the class of Schwarzschild’s interior and exterior solutions are, respectively, 2 and 1 and in the same way for the Friedman–Robertson–Lemaître spacetime [18] it is 1. In some of our previous works [22,23,24,25] we have successfully discussed different stellar models under the embedding class 1. In this paper utilising the embedding class 1 metric we have attempted to study an anisotropic spherically symmetric stellar model. In this investigation we have assumed that the metric potential \(\nu =n\ln \left( 1+{{ Ar}}^{2} \right) +\ln ~B\), where \(n \ge 2\).

In the present article using the observed parameters [19,20,21] of ultra-dense compact stars like \({ RXJ}\) 1856-37, \({ SAX}~J\) 1808.4-3658 (SS1) and \({ SAX}~J\) 1808.4-3658 (SS2), we have studied the consistency of the proposed model with these compact stars. One may notice that all these stars are nothing but pulsars. Li et al. [19] argued that the object SAXJ1808.4-3658 with its two variants SS1 and SS2 are actually “by far the fastest-rotating, lowest-field accretion-driven pulsar known”. It is observed that in Ref. [19] several equations of state (EOS) for rotating neutron star models have been investigated which are not able to reproduce the fast rotation of the object SAXJ 1808.4-3658. However, by taking the EOS of strange star models one can understand SAXJ and as such there are two different EOS so that one has two models: SS1 and SS2. Thus it is found [19] that for these stars the use of a strange star model is appropriate and the outcomes are physically more acceptable than the neutron star model.

In our investigation though we have assumed a non-rotating static model of the above mentioned stars, it is interesting to note that the outcomes clearly show that they correspond to the features of strange stars. Though in our study we are unable to explain physical properties like the pulsation or the thermonuclear burst observed in these stars, we can justify some of the basic and important physical features of these ultra-dense compact stars. However, at this juncture one can argue that a non-rotating model and an extreme fast rotating astrophysical object simply do not match. But as a first try to show that an anisotropic model could fit the data and that further investigation of rotating models makes sense, and one can use them and refer to them in this work.

Against the above background the outline of the present work is as follows: we provide the Einstein field equations and their solutions in Sect. 2. In Sect. 3 the boundary conditions are discussed to find the constants of integration. Section 4 deals with the applications of the solutions to check several physical properties of the model regarding validity with the stellar structure. Some remarks are made in the concluding section, Sect. 5.

2 Basic field equations and solutions

To describe the interior of a static and spherically symmetry object the line element in the Schwarzschild coordinate \((x^{a})=(t,r,\theta ,\phi )\) can be written as

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

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

Now if the spacetime Eq. (1) satisfies the Karmarkar condition [28],

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

with \(R_{2323}\ne 0\) [29], it represents the spacetime of emending class 1.

For the condition (2), the line element of Eq. (1) gives the following differential equation:

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

with \(e^{\lambda }\ne 1\).

Solving Eq. (3) we get

$$\begin{aligned} e^{\lambda }=1+F\nu '^{2}e^{\nu }, \end{aligned}$$
(4)

where \(F \ne 0\) is an arbitrary integrating constant.

We are assuming that within the star the matter is anisotropic and the corresponding energy-momentum tensor can be taken in the form

$$\begin{aligned} T_{\nu }^{\mu }=(\rho +p_\mathrm{r})u^{\mu }u_{\nu }-p_\mathrm{t} g_{\nu }^{\mu }+(p_\mathrm{r}-p_\mathrm{t})\eta ^{\mu }\eta _{\nu }, \end{aligned}$$
(5)

with \( u^{i}u_{j} =-\eta ^{i}\eta _j = 1 \) and \(u^{i}\eta _j= 0\), the vector \(u_i\) being the fluid 4-velocity and \(\eta ^{i}\) the space-like vector which is orthogonal to \( u^{i}\). Here \(\rho \) is the matter density, \(p_\mathrm{r}\) is the radial and \(p_\mathrm{t}\) is the tangential pressure of the fluid in the direction orthogonal to \(p_\mathrm{r}\).

Assuming \(\kappa =8\pi \) with \(G=c=1\) (in relativistic geometrised units) the Einstein field equations are given by

$$\begin{aligned}&\frac{1-e^{-\lambda }}{r^{2}}+\frac{e^{-\lambda }\lambda '}{r}=\kappa \rho ,\end{aligned}$$
(6)
$$\begin{aligned}&\frac{e^{-\lambda }-1}{r^{2}}+\frac{e^{-\lambda }\nu '}{r}=\kappa \, p_\mathrm{r},\end{aligned}$$
(7)
$$\begin{aligned}&e^{-\lambda }\left( \frac{\nu ''}{2}+\frac{\nu '^{2}}{4}-\frac{\nu '\lambda '}{4}+\frac{\nu '-\lambda '}{2r} \right) =\kappa \, p_\mathrm{t}. \end{aligned}$$
(8)

Here we have four equations with five unknowns, namely \(\lambda ,~\nu ,~\rho ,~p_\mathrm{r}\) and \(p_\mathrm{t}\), which are to be found in the proposed model. This immediately prompts us to explore for some suitable relationship between the unknowns or an existing physically acceptable metric potential can be opted for, which will help us to overcome the mathematical situation of redundancy.

Therefore, to solve the above set of Einstein field equations let us take the metric coefficient, \(e^{\nu }\), as proposed by Lake [30],

$$\begin{aligned} e^{\nu }=B(1+Ar^{2})^{n}, \end{aligned}$$
(9)

where A and B are constants and \(n \ge 2\).

Fig. 1
figure 1

Variation of the metric functions \(e^{\nu }\) and \(e^{\lambda }\) with the fractional coordinate r / R for RXJ 1856-37 with the mass \(M= 0.9042~M_\odot \) and the radius \(R=6.002\) km (Table 1). For this graph, the values of the constants are as follows: (i) \(A=0.0043, B=0.3623, F=81.0930, D=4.5094\) for \(n=3\), (ii) \(A=0.0031, B=0.3651, F=81.0968, D=5.8353\) for \(n=4\), (iii) \(A=0.0012, B=0.3700, F=81.0905, D=13.8611\) for \(n=10\), (iv) \(A=1.1136 \times 10^{-4}, B=0.3727, F=81.0794, D=134.5882\) for \(n=100\), (v) \(A=1.1089\times 10^{-6}, B=0.3730, F=81.0930, D=1.3418\times 10^{4}\) for \(n=10{,}000\) (Table 2). Here the unit of A is in km\(^{-2}\), F is in km\(^{2}\), whereas B and D are dimensionless; these are to be considered henceforth to hold as the units of any A, F, B and D

Solving Eqs. (4) and (9) we obtain

$$\begin{aligned} e^{\lambda }=[1+D\,Ar^2 (1+Ar^2)^{(n-2)}], \end{aligned}$$
(10)

where \(D=4n^2\,A\,B\,F.\)

Now using Eqs. (6)–(10) we obtain the expression for \(\rho \), \({{p}_\mathrm{r}}\) and \({{p}_\mathrm{t}}\):

$$\begin{aligned}&\frac{\kappa \rho }{A}=\frac{D\,(1+Ar^2)^n\,[3+(2n-1)A^2r^4+2Ar^2+2\,n\,Ar^2+D\,Ar^2(1+Ar^2)^n]}{[1+A^2r^4+2\,Ar^2 +D\,Ar^2\,(1+Ar^2)^n]^2}, \end{aligned}$$
(11)
$$\begin{aligned}&\frac{\kappa \, p_\mathrm{r}}{A}=\frac{2\,n\,(1+Ar^2)-D\,(1+Ar^2)^n}{[1+A^2r^4+2\,Ar^2\,+D\,Ar^2\,(1+Ar^2)^n]}, \end{aligned}$$
(12)
$$\begin{aligned}&\frac{\kappa p_\mathrm{t}}{A}=\frac{(1+Ar^2)\,[2\,n\,(1+Ar^2)+n^2\,Ar^2\,(1+Ar^2)+D\,(Ar^2-1)\,(1+Ar^2)^n]}{[1+A^2r^4+2\,Ar^2\,+D\,Ar^2\,(1+Ar^2)^n]^2}. \end{aligned}$$
(13)
Fig. 2
figure 2

Variation of the effective density (\(\tilde{\rho }=\rho /nA\)) with the fractional coordinate r / R for RXJ 1856-37. For plotting of this figure, we have employed same data set values as used in Fig. 1

Fig. 3
figure 3

Variation of the effective radial pressure, \(\tilde{p}_\mathrm{r}={p}_\mathrm{r}/nA\), (left panel) and effective tangential pressure, \(\tilde{p}_\mathrm{t}={p}_\mathrm{t}/nA\), (right panel) with the fractional coordinate r / R for RXJ 1856-37. For plotting of this figure, the values of the arbitrary constants have used here same as Fig. 1. The numerical values can be found in Tables 1 and 2

The anisotropic factor \(\Delta \) is obtained as

$$\begin{aligned} \Delta =\frac{A^2r^2\,[n^2\,f^2-2n\,f\,(f+D\,f^n)+D\,f^n(2+2\,Ar^2+D\,f^n)]}{\kappa \,[1+A^2r^4+2\,Ar^2\,+D\,Ar^2\,(1+Ar^2)^n]^2},\!\!\!\nonumber \\ \end{aligned}$$
(14)

where \(f=(1+Ar^2)\). The profiles of the metric functions, density, the radial and tangential pressures and the anisotropic factor are, respectively, shown in Figs. 1, 2, 3 and 4.

From Fig. 4 we also find that for our system the anisotropic factor is minimum at the centre and it is maximum at the surface as proposed by Deb et al. [31] for the anisotropic stellar model. However, the anisotropy factor is zero for all radial distance r if and only if \(A=0\). This implies that in the absence of anisotropy the radial and tangential pressures and density become zero. Also in this case the metric turns out to be flat.

3 Boundary conditions to determine the constants

For fixing the values of the constants, we match our interior spacetime to the exterior Schwarzschild line element given by

$$\begin{aligned} \mathrm{d}s^{2}= & {} \left( 1-\frac{2m}{r}\right) \mathrm{d}t^{2}-\left( 1-\frac{2m}{r}\right) ^{-1}\nonumber \\&\mathrm{d}r^{2}-r^{2}(\mathrm{d}\theta ^{2}+\sin ^{2}\theta \mathrm{d}\phi ^{2}). \end{aligned}$$
(15)

Outside the event horizon \(r>2m\), m being the mass of the black hole. Also the radial pressure \(p_\mathrm{r}\) must be finite and positive at the centre of the star which must vanish at the surface \(r = R\) [32]. Then \(p_\mathrm{r}(R)\) = 0 gives

$$\begin{aligned} D=4n^2\,A\,B\,F=2\,n\,(1+A\,R^2)^{1-n}. \end{aligned}$$
(16)
Fig. 4
figure 4

Variation of the anisotropic factor (\(\Delta _i=8\pi \Delta /A\)) with the fractional coordinate r / R for RXJ 1856-37 with mass \(M= 0.9042~M_\odot \) and radius \((R)=6.002\) km (Table 1). For plotting of this figure, the values of the constants are as follows: (i) \(A=0.0043, B=0.3623, F=81.0930, D=4.5094\) for \(n=3\), (ii) \(A=0.0031, B=0.3651, F=81.0968, D=5.8353\) for \(n=4\), (iii) \(A=0.0012, B=0.3700, F=81.0905, D=13.8611\) for \(n=10\), (iv) \(A=1.1136\times 10^{-4}, B=0.3727, F=81.0794, D=134.5882\) for \(n=100\), (v) \(A=1.1089\times 10^{-6}, B=0.3730, F=81.0930, D=1.3418\times 10^{4}\) for \(n=10{,}000\) (Table 2)

This yields the radius of the star:

$$\begin{aligned} R=\sqrt{\frac{(2\,n\,A\,B\,F)^{1/(1-n)}-1}{A}}, \end{aligned}$$
(17)

by using the continuity of the metric coefficient \(e^{\nu },e^{\lambda }\) and \(\frac{\partial g_{tt}}{\partial r}\) (matching of the second fundamental form at \(r=R\) is the same as the radial pressure should be zero at \(r=R\)) across the boundary, and we get the following three equations:

$$\begin{aligned}&1-\frac{2M}{R}=B(1+A R^{2})^{n},\end{aligned}$$
(18)
$$\begin{aligned}&\left( 1-\frac{2M}{R}\right) ^{-1}=1+D\,AR^2 (1+AR^2)^{(n-2)},\end{aligned}$$
(19)
$$\begin{aligned}&\frac{2M}{R^{3}}=2\,n\,B\,A(1+AR^{2})^{n-1}. \end{aligned}$$
(20)

Solving Eqs. (16) and (18)–(20), in terms of the mass of the radius of compact stars, we obtained the expressions for B, F and M as

$$\begin{aligned}&B=\frac{\left( 1+AR^2\right) ^{1-n}}{1+(1+2\,n)AR^2},\end{aligned}$$
(21)
$$\begin{aligned}&F=\frac{1+(1+2\,n)AR^2}{2\,n\,A},\end{aligned}$$
(22)
$$\begin{aligned}&\frac{M}{R}=\frac{n\,AR^2}{1+AR^2(1+2n)}. \end{aligned}$$
(23)

However, the value of arbitrary constant A is determined by using the density of star at the surface, i.e. \(\rho _{r=R} = \rho _{R}\) as

$$\begin{aligned} A=\frac{\kappa \rho _{R}[1+A^2R^4+2\,AR^2\,+D\,AR^2\,(1+AR^2)^n]^2}{D\,(1+AR^2)^n\,[3+(2n-1)A^2R^4+2AR^2+2\,n\,AR^2+D\,AR^2(1+AR^2)^n]}. \end{aligned}$$
(24)
Fig. 5
figure 5

Variation of the energy condition with respect to fractional radius (r / R) for RXJ 1856-37: (i) NEC (top left), (ii) WEC\(_\mathrm{r}\) for (top right), (iii) WEC\(_\mathrm{t}\) (bottom left), (iv) SEC (bottom right). For this figure, we have employed data set values of the constants here same as used in Fig. 4. The numerical values are mentioned in Tables 1 and 2

We have derived different values of AB and F for the different values of n of the compact star RXJ 1856-37 in Table 2.

The gradients of the density and radial pressure (by taking \(x=Ar^2\)) are

$$\begin{aligned} \frac{\kappa }{A}\,\frac{\mathrm{d}\rho }{\mathrm{d}x}=-\frac{D\,f^n\,[-2\,x^3+10+5D\,f^n+6\,x^2+3D\,x^2\,f^n+\rho _1(x)-2\,n^2\,x\,\rho _2(x)]}{[1+x^2+2\,x\,+D\,x\,(1+x)^n]^3}, \end{aligned}$$
(25)
$$\begin{aligned} \frac{\kappa }{A}\,\frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}x}=-\frac{2\,D\,n^2\,x\,f^n-D\,f^n\,[2f+D\,f^n]+n\,[2+2x^2+3D\,f^n+4\,x+D\,x\,f^n)]}{[1+x^2+2\,x\,+D\,x\,(1+x)^n]^2},\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \end{aligned}$$
(26)

where

\(\rho _1(x)=x\,[18+4\,D\,(1+x)^n+D^2~(1+X)^{2n}]+n\,(x-1)[5+5\,x^2+x\,(10-3\,D\,(1+x)^n)]\),

\(\rho _2(x)=[1+x^2+2x-D\,x\,(1+x)^n]\), \(f=(1+x)\).

4 Physical features of the anisotropic models

In this section different physical features of the compact stars will be discussed.

4.1 Energy conditions

To satisfy the energy conditions, i.e. the null energy condition (NEC), the weak energy condition (WEC) and the strong energy condition (SEC), the anisotropic fluid spheres must be consistent with the inequalities simultaneously holding inside the stars given by

$$\begin{aligned} \mathrm{NEC:} \rho \ge 0, \end{aligned}$$
(27)
$$\begin{aligned} \mathrm{WEC:} \rho - {{p}_\mathrm{r}} \ge 0 (\mathrm{WEC}_\mathrm{r})\,\mathrm{and}\, \rho - p_\mathrm{t} \ge 0 (\mathrm{WEC}_\mathrm{t}), \end{aligned}$$
(28)
$$\begin{aligned} \mathrm{SEC:} \rho -p_\mathrm{r}-2{{p}_\mathrm{t}} \ge 0. \end{aligned}$$
(29)

From Fig. 5 it is clear that the energy conditions are satisfied in the interior of the compact stars simultaneously.

Table 1 Numerical values of the physical parameters \(M(M_\odot )\), R (km) and \(A{R}^{2}\) for the different values of n [19,20,21]
Table 2 Numerical values of the physical parameters nA, \(AR^2\), A, B, F and D for the different values of n for RXJ 1856-37
Table 3 The central density, surface density and central pressure for the compact star candidate RXJ 1856-37

4.2 Mass–radius relation

For the physical validity of the model according to Buchdahl [33] the mass to radius ratio for a perfect fluid should be \(2M/R \le 8/9\), which was later proposed in a more generalised expression by Mak and Harko [6].

Fig. 6
figure 6

Variation of the maximum mass M (in \(M_\odot \)) with respect to corresponding radius R (in km) for different values of n. The values of the constants can be determined by putting M and R in Eqs. (16), (21), (22) and (23) for each different n

The mass of the compact stars from our model is obtained:

$$\begin{aligned} M=\frac{\kappa }{2}\int _0^{R}\rho \, r^{2}\mathrm{d}r=\frac{n\,AR^3}{1+AR^2(1+2n)}. \end{aligned}$$
(30)

We would like to compare our proposed model with the observational data of the different realistic stars. For that purpose, we have calculated model parameters (see Tables 1, 2 and 3) by choosing the radius of the compact stars RXJ 1856-37,SAXJ1808.4- 3658 (SS2) and SAXJ1808.4-3658 (SS1). The calculated mass in Table 1 of the different compact stars are matched well with the proposed values by Li et al. [19], Tikekar and Jotania [20] and Thirukkanesh and Ragel [21].

In Fig. 6 the variation of the maximum mass with respect to the corresponding radius of the compact stars with the different values of n are shown. We have also plotted in Fig. 7 a variation of the maximum values of 2M / R for the different values of n. We found throughout the study for the different values of n that our system is valid with the Buchdahl conditions [33], which is also clear from Fig. 7.

Fig. 7
figure 7

Variation of the maximum values of \(\frac{2M}{R}\) for the different values of n of the anisotropic compact stars. The values of the constants can be found in Table 2

4.3 Compactification parameter and redshift

The compactification factor of the stars is obtained:

$$\begin{aligned} u(r)=\frac{m(r)}{r}=\frac{n\,Ar^{2}}{[1+Ar^{2}\,(1+2n)]}. \end{aligned}$$
(31)

The surface redshift \(Z_{s}\) with respect to the above compactness u is given as

$$\begin{aligned} Z_{s}=\sqrt{{\frac{1+A{R}^{2} \left( 1+2\,n \right) }{1+A{R}^{2}}}}-1, \end{aligned}$$
(32)

whose behaviour is shown in Fig. 8 with the fractional coordinate r / R for RXJ 1856-37.

Fig. 8
figure 8

Variation of the redshift (Z) with the fractional coordinate r / R for RXJ 1856-37 with mass \(M= 0.9042~M_\odot \) and radius \(R=6.002\) km (Table 1). For plotting of this figure, the values of the constants are as follows: (i) \(A=0.0043, B=0.3623, F=81.0930, D=4.5094\) for \(n=3\), (ii) \(A=0.0031, B=0.3651, F=81.0968, D=5.8353\) for \(n=4\), (iii) \(A=0.0012, B=0.3700, F=81.0905, D=13.8611\) for \(n=10\), (iv) \(A=1.1136\times 10^{-4}, B=0.3727, F=81.0794, D=134.5882\) for \(n=100\), (v) \(A=1.1089\times 10^{-6}, B=0.3730, F=81.0930, D=1.3418\times 10^{4}\) for \(n=10{,}000\) (Table 2)

4.4 Stability of the model

In the following sections we will study the stability of the proposed mathematical model.

4.4.1 Generalised TOV equation

Following Tolman [34], Oppenheimer and Volkoff [35] we want to examine whether our present model is stable under the three forces, viz. the gravitational force (\(F_\mathrm{g}\)), the hydrostatic force (\(F_\mathrm{h}\)) and the anisotropic force (\(F_\mathrm{a}\)) so that the sum of the forces becomes zero for the system to be in equilibrium, i.e.

$$\begin{aligned} F_\mathrm{g}+F_\mathrm{h}+F_\mathrm{a}=0. \end{aligned}$$
(33)

The generalised Tolman–Oppenheimer–Volkoff (TOV) equation [8, 36] for our system takes the form

$$\begin{aligned} -\frac{M_G(r)(\rho +p_\mathrm{r})}{r^{2}}e^{\frac{\nu -\lambda }{2}}-\frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}r}+\frac{2}{r}(p_\mathrm{t}-p_\mathrm{r})=0, \end{aligned}$$
(34)

where \(M_G(r)\) represents the gravitational mass within the radius r, which can be derived from the Tolman–Whittaker formula [37] and the Einstein field equations are given by

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

Plugging the value of \(M_G(r)\) in Eq. (25), we get

$$\begin{aligned} -\frac{\nu '}{2}(\rho +p_\mathrm{r})-\frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}r}+\frac{2}{r}(p_\mathrm{t}-p_\mathrm{r})=0. \end{aligned}$$
(36)

Now using Eqs. (16)–(18), the expressions for \(F_\mathrm{g}\), \(F_\mathrm{h}\) and \(F_\mathrm{a}\) can be written

$$\begin{aligned} F_\mathrm{g}= & {} -\frac{\nu '}{2}(\rho +p_\mathrm{r})\nonumber \\= & {} -\frac{2n\,A^2\,r\,[D\,(1-x)\,f^n+n+n\,x^2+2\,n\,x+2\,D\,n\,x\,f^n]}{\kappa \,[1+x^2+2\,x\,+D\,x\,(1+x)^n]^2},\nonumber \\ \end{aligned}$$
(37)
$$\begin{aligned} F_\mathrm{h}= & {} -\frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}r}\nonumber \\= & {} \frac{2A^2\,r}{\kappa }\,\frac{2\,D\,n^2\,x\,(1+x)^n-D\,f^n\,[2+2x+D\,f^n]+n\,F_{h1}}{[1+x^2+2\,x\,+D\,x\,(1+x)^n]^2},\nonumber \\ \end{aligned}$$
(38)
$$\begin{aligned} F_\mathrm{a}= & {} \frac{2}{r}(p_\mathrm{t}-p_\mathrm{r})\nonumber \\= & {} \frac{2A^2\,r\,[n^2\,f^2-2n\,f\,(f+D\,f^n)+D\,f^n(2\,f+D\,f^n)]}{\kappa \,[1+x^2+2\,x\,+D\,x\,(1+x)^n]^2},\nonumber \\ \end{aligned}$$
(39)

where \(F_{h1}=[2+2x^2+3D\,(1+x)^n+4\,x+D\,x\,(1+x)^n)]\) and \(f=(1+x)\). We have shown the behaviour of the TOV equation with \(n=3-10{,}000\) in Fig. 9 for RXJ 1856-37. As far as equilibrium is concerned the plots are of a satisfactory nature.

Fig. 9
figure 9

Variation of the different forces with respect to fractional radius (r / R) for RXJ 1856-37 with mass \(M= 0.9042 M_\odot \) and radius \((R)=6.002\) km (Table 1): (i) \(n=3\) (top left), (ii) \(n=4\) (top right), (iii) \(n=10\) (middle left), (iv) \(n=100\) (middle right), (v) \(n=10{,}000\) (bottom). For plotting of this figure, the values of the constants are as follows: (i) \(A=0.0043, B=0.3623, F=81.0930, D=4.5094\) for \(n=3\), (ii) \(A=0.0031, B=0.3651, F=81.0968, D=5.8353\) for \(n=4\), (iii) \(A=0.0012, B=0.3700, F=81.0905, D=13.8611\) for \(n=10\), (iv) \(A=1.1136\times 10^{-4}, B=0.3727, F=81.0794, D=134.5882\) for \(n=100\), (v) \(A=1.1089\times 10^{-6}, B=0.3730, F=81.0930, D=1.3418\times 10^{4}\) for \(n=10{,}000\) (Table 2)

Fig. 10
figure 10

Variation of the square of radial velocity \(V^{2}_\mathrm{r}\) and tangential velocity \(V^{2}_\mathrm{t}\) with the radial coordinate (r / R) for RXJ 1856-37 with mass \(M= 0.9042 M_\odot \) and radius \(R=6.002\) km (Table 1). The numerical values of the constants A, B, F and D can be found in Table 2 or Fig. 9 for each different value of n

Fig. 11
figure 11

Variation of the difference of the square of the sound velocities with the radial coordinate r / R for RXJ 1856-37. For this figure, we have employed same data set of values used as in Figs. 9 and 10. The numerical values are from Tables 1 and 2

4.4.2 Herrera’s cracking concept

With the help of Herrera’s [38] ‘cracking concept’ we examine the stability of the proposed configuration. For the physical validity the fluid distribution must admit the condition of causality which suggests that the squares of the radial \(({{V}_\mathrm{r}}^2)\) and the tangential \(({{V}_\mathrm{t}}^2)\) sound speeds individually must lie within the limit 0 and 1. Also following Herrera [38] and Abreu et al. [39] it can be concluded that for the stable region the provided condition is \(|{V_\mathrm{t}}^2- {V_\mathrm{r}}^2| \le 1\), which indicates that for the stable region ‘no cracking’ is another essential condition. For our system the sound velocities are

$$\begin{aligned} V_\mathrm{r}^{2}= & {} \frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}\rho }=\frac{h(x)}{D\,f^n}\left[ \frac{2\,D\,n^2\,x\,f^n-D\,f^n\,[2+2x+D\,f^n]+n\,v_{r1}}{g(x)+3D\,x^2\,f^n+\rho _1(x)-2\,n^2\,x\,\rho _2(x)]}\right] , \end{aligned}$$
(40)
$$\begin{aligned} V_\mathrm{t}^{2}=\frac{\mathrm{d}p_\mathrm{t}}{\mathrm{d}\rho }=\frac{-1}{D\,f^n}\,\left[ \frac{-2\,f\,v_{t1}+\,v_{t2}[1+x^2+2\,x+ D\,x\,f^n]+f\,v_{t3}.h(x)}{g(x)+3D\,x^2\,f^n+\rho _1(x)-2\,n^2\,x\,\rho _2(x)]}\,\right] ,\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \end{aligned}$$
(41)

where

\(h(x)=[1+x^2+2\,x+D\,x\,f^n]\); \(g(x)=[-2\,x^3+10+5D\,f^n+6\,x^2]\)

\(v_{r1}=[2+2x^2+3D\,f^n+4\,x+D\,x\,f^n)]\);

\(v_{t1}=[2nf+n^{2}xf+D(x-1)f^{n}]\,[2+D\,f^n+2\,x+D\,n\,x\,f^{n-1}]\);

\(v_{t2}=[2\,n\,f+n^2\, x\,f+D\,(-1 + x)\,f^n]\);

\(v_{t3}=D\,f^n+n^2 (1+2\,x)+n\,[2+D(-1 + x)\,f^{n-1}]\).

From Figs. 10 and 11 it is clear that our stellar system satisfies all the conditions stated above and hence provides a stable configuration.

Fig. 12
figure 12

Variation of the adiabatic index \(\gamma _\mathrm{r}\) and \(\gamma _\mathrm{t}\) with the radial coordinate (r / R) for RXJ 1856-37 with mass \(M= 0.9042 M_\odot \) and radius \(R=6.002\) km (Table 1). For this figure, the values of the constants are: (i) \(A=0.0043, B=0.3623, F=81.0930, D=4.5094\) for \(n=3\), (ii) \(A=0.0031, B=0.3651, F=81.0968, D=5.8353\) for \(n=4\), (iii) \(A=0.0012, B=0.3700, F=81.0905, D=13.8611\) for \(n=10\), (iv) \(A=1.1136\times 10^{-4}, B=0.3727, F=81.0794, D=134.5882\) for \(n=100\), (v) \(A=1.1089\times 10^{-6}, B=0.3730, F=81.0930, D=1.3418\times 10^{4}\) for \(n=10{,}000\) (Table 2)

4.4.3 Adiabatic index

According to Heintzmann and Hillebrandt [40] the condition for the stability of isotropic compact stars is that the adiabatic index obeys \(\gamma > \frac{4}{3}\) in all the interior points of the stars. For our model we have

$$\begin{aligned} \gamma _\mathrm{r}= & {} \frac{\rho +p_\mathrm{r}}{p_\mathrm{r}}\frac{\mathrm{d}p_\mathrm{r}}{\mathrm{d}\rho }\nonumber \\= & {} \frac{2(1+x)\,[D\,(1-x)\,(1+x)^n+n+n\,x^2+\Gamma _{r1}]}{2\,n\,(1+x)-D\,(1+x)^n}\frac{\mathrm{d}p_\mathrm{r}}{h(x)\mathrm{d}\rho },\nonumber \\ \end{aligned}$$
(42)
$$\begin{aligned} \gamma _\mathrm{t} = \frac{\rho +p_\mathrm{t}}{p_\mathrm{t}}\frac{\mathrm{d}p_\mathrm{t}}{\mathrm{d}\rho }=\frac{n^2\,x\,(1+x)^2+2\,n\,(1+x)[1+x+Dx\,(1+x)^n]+\Gamma _{t1}}{(1+x)\,[(2\,n\,+n^2\,x)\,(1+x)+D\,(-1+x)\,(1+x)^n]} \frac{\mathrm{d}p_\mathrm{t}}{\mathrm{d}\rho }, \end{aligned}$$
(43)

where

\(\Gamma _{r1}=[2\,n\,x+2\,D\,n\,x\,(1+x)^n]\), \(\Gamma _{t1}=D\,(1+x)^n\,[2+2\,x+D\,x\,(1+x)^n]\).

From Fig. 12 it is obvious that for all n the values of \(\gamma _\mathrm{r},\gamma _\mathrm{t}\) are greater than 4 / 3 and hence our system is stable.

Table 4 The central density, surface density and central pressure for the compact star candidate SAXJ1808.4-3658 (SS1)
Table 5 The central density, surface density and central pressure for the compact star candidate SAXJ1808.4-3658 (SS2)

5 Discussions and conclusions

In the present paper we have performed investigations on the nature of compact stars by utilising the embedding class 1 metric. Here an anisotropic spherically symmetric stellar model has been considered. To carry out the investigations we have considered the following assumption for the metric: \(\nu =n\ln (1+{{ Ar}}^{2}) +\ln ~B\), where \(n \ge 2\). The reasons for the choice of \(n \ge 2\) are as follows:

  1. (i)

    with the choice of \(n=0\) the spacetime becomes flat;

  2. (ii)

    with the choice of \(n=1\) this becomes the famous Kohlar–Chao solution [26];

  3. (iii)

    with the choice of \(n=2\), as the velocity of sound is not decreasing, we will get a solution which is not well behaved.

Under the above circumstances, therefore, we have studied our proposed model for a variation of \(n=3\) to \(n=10{,}000\). We find from Table 2 that, for \(n \ge 10\), the product nA becomes almost a constant (say C). Thus we can conclude that for large values of n (say infinity) we have the metric potential \(\nu =C{r}^{2}+\ln ~B\) as considered by Maurya et al. [22, 27] in the literature. This result therefore helps us in turn to explore the behaviour of the mass and radius of the spherical stellar system as can be observed from Fig. 6. We have shown here the variation of the maximum mass M (in km) with respect to the corresponding radius R (in km) for different values of n. The profile is very indicative: it shows that up to \(n=3\) and \(R=8.2295\) km the maximum mass feature is roughly steady and after \(n > 3\) it gradually decreases. However, after \(n=500\) and \(R=7.8015\) km the maximum mass again acquires almost a steady feature. In Fig. 7 the Buchdahl condition, i.e. the mass–radius relation regarding a stable configuration of the stellar system has been shown to be satisfactory.

The main features of the present work therefore can be highlighted for the nature of compact stars as follows:

  1. (1)

    The stars are anisotropic in their configurations unless \(p_\mathrm{r} \ne p_\mathrm{t}\). The radial pressure \(p_\mathrm{r}\) vanishes but the tangential pressure \(p_\mathrm{t}\) does not vanish at the boundary \(r = R\) (radius of the star). However, the radial pressure is equal to the tangential pressure at the centre of the fluid sphere. The anisotropy factor is zero for all radial distance r if and only if \(A=0\). This implies that in the absence of anisotropy the radial and tangential pressures and density become zero. Also the metric turns out to be flat.

  2. (2)

    To solve the Einstein field equations we consider the metric coefficient, \(e^{\nu }=B(1+Ar^{2})^{n}\) as proposed by Lake [30] and hence the spacetime of the interior of compact stars can be described by the Lake metric.

  3. (3)

    We observe from Fig. 4 that for our system the anisotropic factor is minimum at the centre and maximum at the surface as proposed by Deb et al. [31]. However, the anisotropy factor is zero for all the radial distance r if and only if \(A=0\). This implies that in the absence of anisotropy the pressures and density become zero, which in turn renders the metric flat.

  4. (4)

    The energy conditions are fulfilled as can be seen from Fig. 5 under the variation of n.

  5. (5)

    We have discussed the stability of the model by applying (i) the TOV equation, (ii) the Herrera cracking concept and (iii) the adiabatic index of the interior of star. It can be observed that stability of the model has been attained from all the above mentioned tests in our model (see Figs. 9, 10, 11 and 12).

  6. (6)

    The surface redshift analysis for our case shows that for the compact star RXJ 1856-37 it turns out that 0.65 is the maximum value. In the isotropic case and in the absence of the cosmological constant it has been shown that \(Z \le 2\) [33, 41, 42], whereas Böhmer and Harko [42] argued that for an anisotropic star in the presence of a cosmological constant the surface redshift must obey the general restriction \(Z \le 5\), which is consistent with the bound \(Z \le 5.211\) as obtained by Ivanov [5]. Therefore, for an anisotropic star without cosmological constant our present value \(Z \le 0.65\) seems to be satisfactory. It is to further noteworthy that this low value surface redshift is not at unavailable in the literature where Shee et al. [43] obtained a numerical value for Z as 0.30 (also see Refs. [12, 44,45,46,47] for a low value surface redshift).

  1. (7)

    In Tables 1, 2 and 3 we have calculated the central density, surface density and central pressure as well as the mass and radius of different compact stars. It is interesting to note that all the data fall within the observed range of the corresponding star’s physical parameters [12, 22, 31, 44,45,46,47]. It would be interesting to perform a comparative study with the data of our Table 3 with that of Table 4 of Maurya et al. [25] where they have prepared the table for the value of \(n=3.3\) only for different compact stars whereas in the present study our table includes a wide range of \(n=3\) to \(n=10{,}000\). Thus, Tables 3, 4 and 5 describe the behaviour of certain physical parameters for varying n. It is observed that the central density decreases with increasing n unlike the surface density, which behaves oppositely. However, the central pressure increases with increasing n.

  2. (8)

    The compactification factor, \(u\simeq 0.30\), clearly suggests that SAXJ1808.4-3658 (SS1) and SAXJ1808.4-3658 (SS2) are ultra-dense strange stars of type I and the small u \((0.2\le u \le 0.3)\) value for RXJ 1856-37 suggests that it is a strange star of type II. The values of the central densities and surface densities (see Tables 3, 4 and 5) of the stars are several times higher than the value of the nuclear saturation density, which is another clear proof of the above classifications of the strange stars. Moreover, the predicted results of these stars are consistent with the observational data and the theoretical models of the strange stars which are the same as proposed by Refs. [19,20,21]. Hence SAXJ1808.4-3658 (SS1), SAXJ1808.4-3658 (SS2) and RXJ 1856-37 are strange star candidates. The overall observation is that our proposed model satisfies all the above mentioned physical requirements. The entire analysis has been performed in connection to direct comparison of some of the compact star candidates, e.g. RXJ 1856-37, SAX J 1808.4-3658 (SS1) and SAX J 1808.4-3658 (SS2), which confirms the validity of the present model.