1 Introduction

Einstein’s gravitational field equations are partial nonlinear differential equations – their solution is very difficult with exception of some simplified situations. Immediately after Einstein introduced the general relativity(GR), Schwarzschild solved the vacuum Einstein equations [1] describing exterior of a spherically symmetric and static sphere. The simple internal spherically symmetric solution with special uniform distribution of matter has been found by Schwarzschild [1], and generalized for spacetimes with non zero cosmological constant in [2, 3]. Some important internal solutions of the Einstein equations were found by Tolman for perfect fluid spheres with fluid described by polytropic equations of state [4]. The polytropes in spacetimes with non-zero cosmological constant were extensively discussed in [2, 5]. Interesting properties of the spherically symmetric polytropes were discussed in [5,6,7,8,9].

Anisotropic pressure in stellar distribution implies unequal radial and tangential pressure. The possible reasons for anisotropies in fluid pressure are presence of mixture of different fluids, different kinds of phase transitions [10], viscosity, rotation, magnetic field, superfluid [11] or existence of a solid core. From our general notion, it is understandable that anisotropic solutions could represent a realistic description of astrophysical interest. Anisotropy of pressure in a perfect fluid sphere was first described by Lemaître [12]. In 1974, Bower and Liang [13] described importance of locally anisotropic equations of state for relativistic spheres. Ruderman has shown in his significant work that nuclear matter may be anisotropic in very high density regions (\(\rho >10^{17}\, \mathrm {kg/m^3}\)) [14]. A few articles devoted to generating anisotropic solutions are available in literature [15,16,17].

There are eight perfect fluid solutions of the Einstein field equations presented by Tolman [4]. Among these solutions, the Tolman IV and the Tolman VII solutions are physically interesting and could depict some neutron star configurations. For detailed analysis of the Tolman VII solution see [18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]. Note that the Tolman IV and VII solutions represent a simple exact general relativistic model of neutron stars improving in a realistic way the well known unrealistic internal Schwarzschild solution for the uniform energy density distribution. For precision of the Tolman VII neutron star model as compared to the neutron star models based on fully realistic equations of state see [31].

Ovalle and his colleagues introduced an anisotropic modified version of the isotropic Tolman IV solution in [33], and of the internal Schwarzschild solution in [34], by using the so called minimal geometric deformation (MGD) method developed in [33, 35]. Our objective in the present paper is to generate a new anisotropic solution from the isotropic Tolman VII solution [4], by using the Ovalle MGD method.

The MGD method is the first simple, systematic and direct method of decoupling gravitational sources in GR. Initially, MGD method was proposed [36, 37] in the context of the Randall–Sundrum braneworld model [38, 39] –references for earlier works on the MGD method,  [40,41,42,43,44,45], and for some recent applications see  [33, 46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73]). The notable feature of the MGD method is that it preserves the spherical symmetry, as well as the physical acceptability. MGD method thus opens up a new window to search for physically acceptable anisotropic solutions.

We review first the formulation of decoupling the Einstein field equations for different gravitational sources. We have to solve

$$\begin{aligned} \hat{G}_{\mu \nu }=-k^2{\hat{T}_{\mu \nu }};\quad \text {to find the metric}\ \hat{g}_{\mu \nu }, \end{aligned}$$
(1)

and

$$\begin{aligned} {\tilde{G}_{\mu \nu }}=-k^2{\tilde{T}_{\mu \nu }};\quad \text {to find the metric}\ \tilde{g}_{\mu \nu }, \end{aligned}$$
(2)

instead of looking for solution for the total energy momentum tensor \(T_{\mu \nu }=\hat{T}_{\mu \nu }+\tilde{T}_{\mu \nu }\),

$$\begin{aligned} {G_{\mu \nu }}=-k^2{T_{\mu \nu }};\quad \text {to find the metric}\ g_{\mu \nu }, \end{aligned}$$
(3)

where the constant \(k^2=8\pi G/c^4\), and in the geometric units (\(c=1=G\)) there is \(k^2=8\pi \). \(T_{\mu \nu }\) is the total energy momentum tensor, \(\hat{T}_{\mu \nu }\) is the energy momentum tensor for one gravitational source and \(\tilde{T}_{\mu \nu }\) is the energy momentum tensor for another gravitational source. After solving Eqs. (1) and (2), we can find metric \(g_{\mu \nu }\) by combining \(\hat{g}_{\mu \nu }\) and \(\tilde{g}_{\mu \nu }\).

Generally, we can extend this formalism for any number of gravitational sources. In that case we have to solve Einstein’s field equations for each source term, and combine the separately found metrics in order to get the metric related to the total energy momentum tensor. The number of physically acceptable solutions is not large. Delgaty and Lake examined physically acceptability of 127 known isotropic solutions  [75]. They found that only 16 of them has physical relevance.

The paper is organized as follows. In Sect. 2 we discuss decoupling of Einstein’s field equations. In Sect. 3 we introduce the MGD method. In Sect. 4 we study the condition for matching the interior solution to the exterior one. Section 5 is devoted to description of the Tolman VII perfect fluid solution. In Sect. 6 we derive the new anisotropic solution and demonstrate its interesting properties. After that in Sect. 7 we investigate the physical viability of new anisotropic solution. In Sect. 8 conclusions are presented.

2 Decoupling of Einstein’s field equations

We shortly review the method of the gravitational decoupling developed by Ovalle [35]. In the framework of the decoupling method, Einstein’s field equations are expressed in the form

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2}Rg_{\mu \nu }=-k^2T_{\mu \nu }^{\mathrm {(tot)}}, \end{aligned}$$
(4)

where,

$$\begin{aligned} {T}_{\mu \nu }^{\mathrm {(tot)}}={T}_{\mu \nu }^{(\mathrm {perfect fluid)}} +{T}_{\mu \nu }^{\mathrm {(other source)}}. \end{aligned}$$
(5)

The energy momentum tensor for perfect fluid reads

$$\begin{aligned} {T}_{\mu \nu }^{(\mathrm {perfect fluid)}} =\left( \rho + p\right) u_{\mu }u_{\nu }-pg_{\mu \nu }, \end{aligned}$$
(6)

where, \(\rho \), p and \(u_{\mu }\) are density, pressure and four velocity of perfect fluid, respectively. We consider the contribution from other gravitational source(\(\theta _{\mu \nu }\)) modified by an intensity parameter \(\alpha \)

$$\begin{aligned} {T}_{\mu \nu }^{\mathrm {(other source)}}=\alpha \theta _{\mu \nu }. \end{aligned}$$
(7)

The total energy momentum tensor for perfect fluid coupled with another gravitational source causing anisotropy in the self gravitating system then reads

$$\begin{aligned} {T}_{\mu \nu }^{\mathrm {(tot)}} =\left( \rho + p\right) u_{\mu }u_{\nu } -pg_{\mu \nu }+\alpha \theta _{\mu \nu }. \end{aligned}$$
(8)

The term \(\theta _{\mu \nu }\) in Eq. (7) stands for any source like scalar, vector, or tensor field, causing anisotropies in the fluid. As a consequence of Bianchi identity the conservation law holds

$$\begin{aligned} \nabla _{\nu }{T}^{\mathrm {(tot)} \mu \nu } = 0. \end{aligned}$$
(9)

The line element of spherically symmetric spacetime in Schwarzschild coordinates \(\left( t,r,\theta ,\phi \right) \) takes the form

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

where, \(\nu (r)\) and \(\lambda (r)\) are functions of the radial coordinate (r) which ranges from the compact object centre (\(r=0\)) to its surface (\(r=R\)). Four-velocity of the static fluid is given by \(u^\mu =e^{-\nu /2} \delta _{0}^{\mu }\), at radii \(0 \le r \le R\). The general metric given by Eq. (10) obeys the Einstein field equations having the following form

$$\begin{aligned} -k^2\left( \rho + \alpha \theta _{0}^{0}\right)= & {} -\frac{1}{r^2} +e^{-\lambda }\left( \frac{1}{r^2}-\frac{\lambda '}{r}\right) , \end{aligned}$$
(11)
$$\begin{aligned} -k^2\left( -p+ \alpha \theta _{1}^{1}\right)= & {} -\frac{1}{r^2}+e^{-\lambda } \left( \frac{1}{r^2} +\frac{\nu '}{r}\right) , \end{aligned}$$
(12)
$$\begin{aligned} -k^2\left( -p\!+ \!\alpha \theta _{2}^{2}\right)= & {} \frac{1}{4} e^{-\lambda }\left( 2\nu ''\!+\!\nu '^2\!-\!\lambda '\nu '+2\frac{\nu '-\lambda '}{r}\right) .\nonumber \\ \end{aligned}$$
(13)

The conservation Eq. (9), which is linear combination of Eqs. (11), (12) and (13), reads

$$\begin{aligned}&-p'-\frac{\nu '}{2}\left( \rho +p\right) +\alpha \left( \theta _{1}^{1}\right) ' -\frac{\nu '}{2}\alpha \left( \theta _{0}^{0}-\theta _{1}^{1}\right) \nonumber \\&\quad -\frac{2}{r}\alpha \left( \theta _{2}^{2}-\theta _{1}^{1}\right) =0. \end{aligned}$$
(14)

Here \('\) denotes differentiation of the function with respect to r. We want to emphasize that the spherical symmetry implies \(G_{2}^{2}=G_{3}^{3}\) and therefore \(T^{{(\mathrm tot)}2}_{2}=T^{{(\mathrm tot)}3}_{3}\). Hence \(\theta _{2}^{2}=\theta _{3}^{3}\).

We can easily identify from Eqs. (11), (12) and (13) the effective density

$$\begin{aligned} \rho _\mathrm {eff}\mathrm {(radial)}=\rho +\alpha \theta _{0}^{0}, \end{aligned}$$
(15)

the effective isotropic pressure

$$\begin{aligned} p_{r}=p-\alpha \theta _{1}^{1}, \end{aligned}$$
(16)

and the effective tangential pressure

$$\begin{aligned} p_{t}=p-\alpha \theta _{2}^{2}. \end{aligned}$$
(17)

It is evident that the \(\theta _{\mu \nu }\) source introduces an anisotropy into perfect fluid which is given by

$$\begin{aligned} \pi =p_{t}-p_{r}=\alpha (\theta _{1}^{1}-\theta _{2}^{2}). \end{aligned}$$
(18)

Now, we have five unknowns, namely the metric coefficients \(\nu (r)\), \(\lambda (r)\), the effective density (\(\rho _\mathrm {eff}\)), the effective radial pressure (\(p_{r}\)), and the effective tangential pressure (\(p_{t}\)). To solve the Einstein equations to obtain these functions, we have to proceed using the MGD method.

3 Minimal geometric deformation

MGD method is a very strong technique to decouple Einstein’s field equations for different source terms. This method has been developed in a simple and elegant way recently [35], we shortly review this method. We consider a perfect fluid solution of energy density \(\rho \) and pressure p that is described by the metric coefficients \(\left( e^\epsilon ,e^\gamma \right) \). The line element of the corresponding spherically symmetric solution reads

$$\begin{aligned} ds^2 = e^{\epsilon (r)} dt^2 - e^{\gamma (r)} dr^2 -r^2(d\theta ^2 + sin^2\theta d\phi ^2), \end{aligned}$$
(19)

where the radial metric coefficient takes the form

$$\begin{aligned} e^{\gamma (r)}=\left( 1-\frac{2m(r)}{r}\right) ^{-1}, \end{aligned}$$
(20)

with m(r) being so called GR mass function. We introduce the MGD transformations in the form [35]

$$\begin{aligned}&e^\epsilon \mapsto e^\nu =e^{\epsilon +\alpha g}, \end{aligned}$$
(21)
$$\begin{aligned}&e^{-\gamma } \mapsto e^{-\lambda }=e^{-\gamma }+\alpha f, \end{aligned}$$
(22)

where g and f are deformations of temporal and radial metric coefficients respectively, arising as an effect of introduction of the anisotropy. The minimal geometric deformation is given by the conditions

$$\begin{aligned} g \mapsto 0, \end{aligned}$$
(23)

and

$$\begin{aligned} f \mapsto f^*. \end{aligned}$$
(24)

Then temporal component of the metric \(e^\nu \) remains unchanged, while the additional gravitational source (\(\theta _{\mu \nu }\)) causes a deformation of the radial component according to Eq. (22). If we incorporate the deformed metric into Eqs. (11), (12) and (13), we see that each equation can be decomposed into two equations – one holds for the perfect fluid, the other one is involving \(\theta _{\mu \nu }\). The set of equations for perfect fluid (\(\alpha =0\)) is fully determined by the metric coefficient \(\epsilon (r)=\nu (r)\) and takes the form

$$\begin{aligned} k^2 \rho= & {} \frac{1}{r^2}-e^{-\gamma } \left( \frac{1}{r^2}-\frac{\gamma '}{r}\right) , \end{aligned}$$
(25)
$$\begin{aligned} k^2 p= & {} -\frac{1}{r^2}+e^{-\gamma } \left( \frac{1}{r^2}+\frac{\nu '}{r}\right) , \end{aligned}$$
(26)
$$\begin{aligned} k^2 p= & {} \frac{1}{4}e^{-\gamma }\left( 2\nu ''+\nu '^2+\frac{2\nu '}{r}\right) -\frac{1}{4}\gamma ' e^{-\gamma }\left( \nu '+\frac{2}{r}\right) .\nonumber \\ \end{aligned}$$
(27)

The conservation equation takes the form

$$\begin{aligned} p'=-\frac{\nu '}{2}(\rho +p). \end{aligned}$$
(28)

The equations involving the \(\theta _{\mu \nu }\) term read

$$\begin{aligned} k^2 \theta _{0}^{0}= & {} -\frac{f^*}{r^2}-\frac{f^{*'}}{r}, \end{aligned}$$
(29)
$$\begin{aligned} k^2 \theta _{1}^{1}= & {} - f^*\left( \frac{1}{r^2}+\frac{\nu '}{r}\right) , \end{aligned}$$
(30)
$$\begin{aligned} k^2 \theta _{2}^{2}= & {} -\frac{f^*}{4}\left( 2\nu ^{''}+\nu '^2+\frac{2\nu '}{r}\right) -\frac{f^{*'}}{4}\left( \nu '+\frac{2}{r}\right) . \end{aligned}$$
(31)

The conservation equation for the \(\theta _{\mu \nu }\) term takes the form

$$\begin{aligned} (\theta _{1}^{1})'-\frac{\nu '}{2}(\theta _{0}^{0}-\theta _{1}^{1}) -\frac{2}{r}(\theta _{2}^{2}-\theta _{1}^{1})=0, \end{aligned}$$
(32)

and it is a linear combination of Eqs. (29), (30) and (31).

We see that Einstein’s equations (11), (12) and (13) are decoupled by deforming the radial metric component according to Eq. (21). The conservation Eqs. (28) and (32) for the MGD solution have to be satisfied simultaneously with the general conservation law given by Eq. (9). We conclude that both systems, perfect fluid and other gravitational source, conserve independently, i.e., these two systems cannot exchange energy-momentum, and their interaction is solely gravitational [35]. Such an approach seems to be relevant e.g. for configurations accreting dark matter that interacts only gravitationally.

4 Matching condition

The matching of the interior (\(r<R\)) and exterior (\(r>R\)) solutions of any mass distribution at the boundary of the interior (\(r=R\)), has to be considered very carefully in the case of mixed sources treated in the framework of the MGD method [35]. The interior metric of our consideration is given by Eq. (19) along with Eqs. (20), (21), (22) and (23), and its line element can be written as

$$\begin{aligned} ds^2=e^{\nu ^-(r)} dt^2-\left( 1-\frac{2\tilde{m}}{r}\right) ^{-1} dr^2 - r^2(d\theta ^2 + sin^2\theta d\phi ^2), \end{aligned}$$
(33)

where the interior mass function reads

$$\begin{aligned} \tilde{m}=m(r)-\frac{r}{2} \alpha f^*(r), \end{aligned}$$
(34)

m(r) is the standard GR mass function in Eq. (20), and the function \(f^*\) has to be calculated later. We assume there is no matter outside, i.e., \(\rho ^{+}=p^{+}=0\). In general, additional gravitational source \(\theta _{\mu \nu }\) could influence the exterior geometry, and in such a case the general exterior metric can be written as

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

where the functional form of \(\nu ^+(r)\) and \(\lambda ^+(r)\) can be determined by solving Einstein’s equations for the exterior geometry

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2} R g_{\mu \nu }=-k^2 \alpha \theta _{\mu \nu }. \end{aligned}$$
(36)

Continuity of the first fundamental form implies

$$\begin{aligned} ds^2\vert _{r \rightarrow R^+}-ds^2\vert _{r \rightarrow R^-}=0. \end{aligned}$$
(37)

From above we obtain equations

$$\begin{aligned} \nu ^-(R)=\nu ^+(R), \end{aligned}$$
(38)

and

$$\begin{aligned} 1-\frac{2M_0}{R}+\alpha f^*_R=e^{-\lambda ^+(R)}. \end{aligned}$$
(39)

Here \(M_0=m(R)\) and \(f^*_R\) is the minimal geometric deformation at the boundary of the fluid distribution. Considering the Israel–Darmois matching condition at the surface (\(r=R\)), we get second fundamental form that reads

$$\begin{aligned} G_{\mu \nu } r^\nu \vert _{r \rightarrow R^+}-G_{\mu \nu } r^\nu \vert _{r \rightarrow R^-}=0, \end{aligned}$$
(40)

where \(r^\mu \) is the unit radial vector. Proportionality of \(G_{\mu \nu }\) and \(T_{\mu \nu }\) implies

$$\begin{aligned} T_{\mu \nu }^\mathrm {(tot)} r^\nu \vert _{r \rightarrow R^+} -T_{\mu \nu }^\mathrm {(tot)} r^\nu \vert _{r \rightarrow R^-}=0. \end{aligned}$$
(41)

Equation (41) can be rewritten with the help of Eq. (12) in the form

$$\begin{aligned} (p- \alpha \theta _{1}^{1}) \vert _{r \rightarrow R^+} -(p- \alpha \theta _{1}^{1})\vert _{r \rightarrow R^-}=0. \end{aligned}$$
(42)

As there is no fluid (matter) assumed outside the configuration, we can write

$$\begin{aligned} p_R-\alpha (\theta _{1}^{1})_{R}^-=-\alpha (\theta _{1}^{1})_{R}^+ , \end{aligned}$$
(43)

where \(p_R=p^-(R)\). With the use of Eq. (30) for the inner and the outer geometry, we can write

$$\begin{aligned} p_R\!+ \!\alpha \frac{f^{*}_{R}}{k^2}\left( \frac{1}{R^2}\!+\!\frac{\nu ^{'}_{R}}{R}\right) \!=\!\alpha \frac{g^*_R}{k^2}\left[ \frac{1}{R^2}+\frac{2M_s}{R^3} \frac{1}{\left( 1-\frac{2M_s}{R}\right) }\right] , \end{aligned}$$
(44)

here \(g^*_R\) is the deformation of the outer geometry due to the matter term \(\theta _{\mu \nu }\), and \(M_s\) is the Schwarzschild mass. So, for matching the interior geometry with the exterior one, Eqs. (38), (39) and (44) are necessary and sufficient condition. If the outside geometry is the Schwarzschild vacuum one, Eq. (44) reduces to

$$\begin{aligned} p_R+ \alpha \frac{f^{*}_{R}}{k^2} \left( \frac{1}{R^2}+\frac{\nu ^{'}_{R}}{R}\right) =0, \end{aligned}$$
(45)

which implies that the effective radial pressure at the surface should vanish.

Fig. 1
figure 1

The dependence of the effective quantities of the new anisotropic solution and Tolman VII perfect fluid solution with dimensionless radius (r / R) for \(\alpha =0.2\) are shown. The pictures are drawn for \(M_0=1\) and \(R=5\)

5 Interior perfect fluid Tolman VII solution

Let us summarize properties of the well known interior Tolman VII perfect fluid solution [4] for which we apply the MGD method. Its metric coefficients are given by

$$\begin{aligned}&e^{\nu (r)}=B^2\left[ \sin \left( \log \sqrt{\frac{e^{-\gamma (r)/2} +\frac{2r^2}{A^2}-\frac{A^2}{4R^2}}{C}}\right) \right] ^2, \end{aligned}$$
(46)
$$\begin{aligned}&e^{-\gamma (r)}=1-\frac{r^2}{R^2}+\frac{4r^4}{A^4}, \end{aligned}$$
(47)

where A, B, C are constants of the solution, yet to be determined. The line element for this solution is described by Eq. (19) with \(e^{\epsilon (r)}=e^{\gamma (r)}\). Using Eqs. (25) and (26), we calculate radial profiles of the pressure and density of the perfect fluid

$$\begin{aligned} p(r)=\frac{-A^4+4 R^2 r^2+4 R^2 b_{1} A^2 \cot z }{8\pi R^2 A^4}, \end{aligned}$$
(48)

and

$$\begin{aligned} \rho (r)=\frac{-\frac{20 r^2}{A^4}+\frac{3}{R^2}}{8\pi }, \end{aligned}$$
(49)

where \(z=\left[ \log \sqrt{\frac{\frac{2r^2}{A^2}-\frac{A^2}{4R^2} +b_{1}}{C}}\right] \), \(b_{1}=\sqrt{1+\frac{4 r^4}{A^4} -\frac{r^2}{R^2}}\). From Eq. (49) we can calculate the central density of the stellar object. There is \(\rho _0=\frac{3}{8 \pi R^2} \sim 10^{-3}\) for typical compactness \(C_m=M_0/R=1/5\). Combining Eqs. (48) and (49) we can obtain direct analytical relationship between the density and the pressure in the form

$$\begin{aligned} p(r)= \frac{-A^2(1+4 \pi R^2 \rho )+z_1 \cot \left( \log \sqrt{\frac{A^2 (1-16 \pi R^2 \rho )+2 z_1}{20 C R^2}}\right) }{20 \pi A^2 R^2 }, \end{aligned}$$
(50)

where \(z_1\) is given by,

$$\begin{aligned} z_1=R^2 \sqrt{100+ \frac{2 A^4 (1+4 \pi R^2 \rho )(-3+8 \pi R^2 \rho )}{R^4}}. \end{aligned}$$

The expression in Eq. (50) shows that is not possible to write a simple equation of state.

The constants A, B and C are calculated according to the matching conditions given by Eqs. (37) and (40), under assumption of the outside Schwarzschild vacuum solution, and read

$$\begin{aligned} A= & {} \pm \left( \frac{4R^5}{R-2M_0}\right) ^\frac{1}{4}, \end{aligned}$$
(51)
$$\begin{aligned} B= & {} \pm \csc \left[ cot^{-1} \left( \frac{M_0 b_{2} b_{3}}{R^7}\right) \right] b_{2}, \end{aligned}$$
(52)
$$\begin{aligned} C= & {} \frac{e^{-2\cot ^{-1}\left( \frac{M_0 b_{2} b_{3}}{R^7}\right) } \left( 2R^3 b_{2}-4M_0 b_{3}+R b_{3}\right) }{2R^3}, \end{aligned}$$
(53)

where \(\frac{M_0}{R} \le 4/9\) , \(b_\mathrm {2}=\sqrt{1-\frac{2M_0}{R}}\), \(b_\mathrm {3}=\left( \frac{R^5}{-2M_0+R} \right) ^{\frac{3}{2}}\), and \(M_\mathrm {0}=m(R)\) is the total mass of the fluid configuration given by Eq. (20). For the realistic fluid configurations, the perfect fluid density should be positive everywhere within \(0<r<R\). For such configurations, the condition \(\rho ^2 < \frac{3R^2}{5(R-2M_0)}\) has to be satisfied for all values of r. The configurations that do not satisfy this condition are not physically acceptable. Using expression of A from (51) and Eq. (49), we can calculate the density at the surface of the stellar object, this is given by \(\rho (R)=(2/8\pi R^2)(5C_m-1)\), where \(C_m\) is the compactness. We can clearly see that the density at the surface is positive if \(C_m > 1/5\) and it vanishes when \(C_m=1/5\). So, it is relevant and interesting to consider this special compactness (\(C_m=1/5\)) to illustrate the situation in figures. Examples of the density and pressure radial profiles of the Tolman VII solution are shown in Fig. 1. We can see they resemble profiles attained for (neutron) stars and could be thus applied in astrophysical context. For detailed study and application of the Tolman VII solution see [4, 31].

6 Anisotropic Tolman VII solution by gravitational decoupling

Now let us turn-on the parameter \(\alpha \) to get an anisotropic solution. According to the matching condition (Eq. (45)), the effective pressure should vanish at the boundary which implies from Eq. (12) that \(p_R \sim \alpha (\theta _{1}^{1})_{R}\) . If we choose the deformation in the radial component of metric

$$\begin{aligned} f^{*}=-e^{-\gamma }+\frac{1}{1+r \nu ^{'}(r)}, \end{aligned}$$
(54)

it essentially means that

$$\begin{aligned} \theta _{1}^{1}(r)=p(r). \end{aligned}$$
(55)

Equation (54) is denoted as ‘mimic’ constraint by Ovalle [35], and it requires to effective pressure to vanish at the boundary. Using Eqs. (22) and (48), we get the radial metric component

$$\begin{aligned} e^{-\lambda }=e^{-\gamma }+ \alpha \left( \frac{A^2 b_{1}}{A^2 b_{1} + 4 r^2 \cot z }-e^{-\gamma }\right) . \end{aligned}$$
(56)

So, Eqs. (46) and (56) represent the Tolman VII solution being minimally deformed by the gravitational source \(\theta _{\mu \nu }\); the original Tolman VII perfect fluid solution can be recovered while \(\alpha \rightarrow 0\). Now, we have a new anisotropic solution ((46) and (56)). Our task is to match the new solution with the exterior Schwarzschild vacuum metric. Due to the matching conditions (Eqs. (38) and (39)) we arrive to the relations

$$\begin{aligned} B^2 \sin ^2 z \vert _{r=R}=1-\frac{2M_s}{R}, \end{aligned}$$
(57)

and

$$\begin{aligned} (1-\alpha )e^{-\gamma } \vert _{r=R} + \alpha \left( \frac{A^2 b_{1}}{A^2 b_{1} + 4 r^2 \cot z }\right) \vert _{r=R}=1-\frac{2M_s}{R}. \end{aligned}$$
(58)

By using Eq. (20), the above equation gives the Schwarzschild mass(\(M_s\)) due to the relation

$$\begin{aligned} \frac{2M_s}{R}=\frac{2M_0}{R}+\alpha \left( 1-\frac{2M_0}{R}\right) -\alpha \frac{A^2 b_{1}}{A^2 b_{1} + 4 r^2 \cot z } \vert _{r=R}. \end{aligned}$$
(59)

Considering the Schwarzschild vacuum outside, the second fundamental form (Eq. (43)) reads

$$\begin{aligned} p_R-\alpha (\theta _{1}^{1})_{R}^-=0, \end{aligned}$$
(60)

and as a consequence of the ‘mimic’ constraint (Eq. (54)), it reduces to the condition

$$\begin{aligned} p_R=0. \end{aligned}$$
(61)

Using Eq. (48) this implies for the constant C the relation

$$\begin{aligned} C=\left( -\frac{A^2}{4R^2}+\frac{2R^2}{A^2} +2\frac{R^2}{A^2}\right) e^{-2 \cot ^{-1} \left( \frac{A^4}{8R^2}(\frac{1}{R^2}-\frac{4R^2}{A^4}\right) }. \end{aligned}$$
(62)

Using the expression for the Schwarzschild mass given in Eq. (58), we obtain from Eq. (57)

$$\begin{aligned} B^2 \sin ^2 z =(1-\alpha ) \left( 1-\frac{2M_0}{R}\right) +\alpha \frac{A^2 b_{1}}{A^2 b_{1} + 4 r^2 \cot z } \vert _{r=R}, \end{aligned}$$
(63)

from which we can determine B while C is given by Eq. (61). Eqs. (61) and (62) are necessary and sufficient conditions for matching the anisotropic interior solution with exterior Schwarzschild vacuum.

By using the ‘mimic’ constraint (Eq. (54)) in Eq. (16), from Eq. (48) we get the radial pressure in the form

$$\begin{aligned} p_r(r,\alpha )=(1-\alpha )\frac{(-A^4+4 R^2 r^2 +4 R^2 b_{1} A^2 \cot z)}{8\pi R A^4}. \end{aligned}$$
(64)

The radial profiles of the effective density and the tangential pressure are then given by the relations

$$\begin{aligned} \rho _\mathrm {eff}(r,\alpha )=\rho (r)+\delta \rho (r,\alpha ), \end{aligned}$$
(65)

and

$$\begin{aligned} p_t(r,\alpha )=p_r(r,\alpha ) +\pi (r,\alpha ), \end{aligned}$$
(66)

here \(\delta \rho \) is change in density and \(\pi (r,\alpha )\) is measure of anisotropy, being defined as

$$\begin{aligned}&\delta \rho =\alpha \frac{Y_1 \cot z+ Y_2 b_1 \cot ^2 z -A^2 b_1 (Y_3 + Y_4 \csc ^2 z)}{8\pi A^6 R^4 b_1 (A^2 b_1 + 4r^2 \cot z)^2}, \nonumber \\ \end{aligned}$$
(67)
$$\begin{aligned}&\pi (r,\alpha )=\alpha \frac{r^2 \cot z \csc ^2 z(Y_5 \cos z^2 + A^2 b_1 Y_5 \sin z^2)}{4 \pi b_1 Y_5 (A^3 b_1 + 4Ar^2 \cot z)^2},\nonumber \\ \end{aligned}$$
(68)

where the parameters are determined by the relations

\(Y_1=4[160r^8 R^4 + A^8(6r^4-8r^2 R^2+3R^4)+A^4(-64r^6R^2+44r^4 R^4)]\) ,

\(Y_2=16 A^2 r^2 R^2[20 r^4 R^2 + A^2 (-3 r^2+R^2)]\) ,

\(Y_3=[-80r^6 A^4-3A^8(r^2-R^2)+4A^4(8r^4 R^2-5 r^2 R^4)]\) ,

\(Y_4=8 A^4 r^2 R^4\) ,

\(Y_5=4r^4 R^2+A^4(-2r^2+3R^2)\) .

Fig. 2
figure 2

The dependence of anisotropy with dimensionless radius (r / R) for different values of coupling constant(\(\alpha \)) are shown. The pictures are drawn for \(M_0=1\) and \(R=5\)

Fig. 3
figure 3

The dependence of the velocity of sound and adiabatic index with dimensionless radius (r / R) for \(\alpha =0.2\) are shown. The pictures are drawn for \(M_0=1\) and \(R=5\)

In the left panel of Fig. 1 comparison of the energy density profile for the perfect fluid Tolman VII solution, and the new anisotropic solution is shown. In the right panel of Fig. 1 comparison of the pressure profile for the perfect fluid Tolman VII and the new anisotropic solution is shown. The dependences of the anisotropy on the radius and the coupling constant (\(\alpha \)) are shown in Fig. 2. We have chosen \(M_0=1\) and \(R=5\) (in the geometric units \(c=1=G\)), which correspond to a compact configuration of radius \(R \sim \,13\)  km, and central energy density \(\rho _c \sim \ 10^{17}\) kg/m\(^3\).

We see that the behavior of the effective density \(\rho _{\mathrm {eff}}\) and pressures do not show any signal of instability. In this respect, it would be useful to obtain a simple equation of state to analyze the speed of sound. Unfortunately, the exact analytical expressions relating directly pressure and energy density (\(p=p(\rho )\)) cannot be obtained due to complex dependence of \(\rho \) on the radius r. However, this does not prevent to study the causality conditions by the standard way [see further Eqs. (69) and (70)]. The equation of state is given in a parametric form with radius r taking the role of the parameter; we thus use the relation \(dp/d\rho =\frac{dp/dr}{d\rho /dr}\) in order to handle the equation of state.

7 Physical viability

In this section, we check some most important conditions for physically acceptability of new anisotropic solution.

7.1 Energy conditions

We now write the four well-known energy conditions [76] and we check if these hold for anisotropic version of Tolman VII solution. Energy conditions are given by,

  1. (a)

    null energy condition (NEC): \(\rho _{\mathrm {eff}}+p_r \ge 0\), \(\rho _{\mathrm {eff}}+p_t \ge 0\),

  2. (b)

    weak energy condition (WEC): \(\rho _{\mathrm {eff}} \ge 0\), \(\rho _{\mathrm {eff}}+p_r \ge 0\), \(\rho _{\mathrm {eff}}+p_t \ge 0\),

  3. (c)

    strong energy condition (SEC): \(\rho _{\mathrm {eff}}+p_r \ge 0\), \(\rho _{\mathrm {eff}}+p_t \ge 0\), \(\rho _{\mathrm {eff}}+2p_t+p_r \ge 0\)

  4. (d)

    dominant energy condition (DEC): \(\rho _{\mathrm {eff}}-|p_r| \ge 0\), \(\rho _{\mathrm {eff}}-|p_t| \ge 0\).

From Fig. 1, it is evident that these four energy conditions are holding for new anisotropic solution.

7.2 Causality conditions

In order to be a physically relevant solution, the speed of sound both in radial and tangential direction should be less than the speed of light (in geometrical units \(\hbox {c}=1\)) which mathematically means

$$\begin{aligned} v_r(r)= & {} \sqrt{\frac{dp_r(r)}{d\rho (r)}} \le 1, \end{aligned}$$
(69)
$$\begin{aligned} v_t(r)= & {} \sqrt{\frac{dp_t(r)}{d\rho (r)}} \le 1. \end{aligned}$$
(70)

We can see in Fig. 3, that the speed of sound holds the causality condition. Also we notice that these two velocity profile are not monotonically decreasing with radius, which could be interpreted as a signal of instability. However this is not true when anisotropic effects are presents, as the stability conditions become non trivial [77, 78].

7.3 Stability conditions

To check the stability of the solution, we have to calculate the adiabatic index (\(\Gamma \)) of our solution. In order to avoid gravitational collapse \(\Gamma \) should be greater than 4 / 3 . The expressions of adiabatic index are given by [79]

$$\begin{aligned} \Gamma _r= & {} \frac{d(\log p_r)}{d(\log \rho )}, \end{aligned}$$
(71)
$$\begin{aligned} \Gamma _t= & {} \frac{d(\log p_t)}{d(\log \rho )}. \end{aligned}$$
(72)

We see from Fig. 3 that the adiabatic index in tangential direction (\(\Gamma _t\)) is not always obeying this condition but this condition is holding always for the adiabatic index in radial direction (\(\Gamma _r\)). We can say it is enough to check \(\Gamma \) only in radial direction [79] as gravitational collapse occurs in this direction. So, in our case, new anisotropic solution is in agreement with stability condition.

8 Conclusions

We started from the Tolman VII perfect fluid solution and using the framework of MGD we get a new exact and analytical solution. This new solution represents the anisotropic version of the Tolman VII solution, which satisfies all criteria for physical acceptability, namely, regular at the origin, pressure and density defined positive, well defined mass and radius, monotonic decrease of the density and pressure with increasing radius, dominant energy condition satisfied, subliminal sound speed, etc. Hence, this could be used to model realist stellar configurations, like neutron stars.

We demonstrate that the effect of anisotropy is increasing with increasing coupling constant(\(\alpha \)). We also demonstrate that with increasing radius the radial profile of the anisotropy effect increases reaching its maximum value and then it is decreasing to vanish at the edge of the configuration. We calculate the Schwarzschild mass, \(M_s\) (from Eq. 58) which is same as the mass of the perfect fluid stellar distribution, \(M_0\). So, in the case considered here, the anisotropy effect is not affecting the mass of the stellar distribution. The reason behind this is evident from the Fig. 1 where we see that the effective density crosses the perfect fluid density profile. The effect of trapping of null geodesics in the anisotropic solution has the same character as in the perfect fluid solution [30], because the corresponding effective potential of the null geodesics depends on the metric components \(g_{tt}\) and \(g_{\phi \phi }\) on, which remain unchanged in comparison with the isotropic solution – only \(g_{rr}\) changes in the case considered in our paper.