1 Introduction

The study of relativistic stellar structure is now more than 100 years old. It began with the discovery in 1916 by Karl Schwarzschild of a universal vacuum exterior solution [1]. He also gave in the same year the first interior stellar solution [2], which should be matched to the exterior one. It has a constant energy density \(\rho \). For a long time the star interior was considered to be made of a perfect fluid, which has equal radial (\(p_r\)) and tangential (\(p_t\)) pressures. This leads to the isotropic condition \(p_r=p_t\), imposed on the Einstein equations. However, spherical symmetry demands only the equality of the two tangential pressures. This fact was noticed by Einstein and developed first by Lemaitre in 1933 [3]. He discussed a model sustained solely by \(p_t\) and with constant \( \rho \). His work remained unnoticed for a long time.

In 1972 Ruderman [4] argued for the first time that nuclear matter at very high densities of the order of \(10^{15}\) g/cm\(^3\) may have anisotropic features and its interactions are relativistic. The pioneering work of Bowers and Liang [5] on building anisotropic models in 1974 gave start to a number of such solutions. Anisotropy may have a lot of sources [6]: a mixture of fluids of different types, presence of a superfluid, existence of a solid core, phase transitions, presence of magnetic field, viscosity, etc. Such models describe compact stellar objects like neutron stars, strange stars, quark stars, boson stars, gravastars, dark stars and others.

The Einstein equations describe the effect of matter upon the metric of spacetime. For static, spherically symmetric fluid solutions the metric may be written in canonical or isotropic coordinates and has two components \(\nu \) and \(\lambda \) or \(\nu \) and \(\mu \). The energy-momentum tensor is represented by its diagonal components, mentioned above: \(\rho \), \(p_r\) and \( p_t\). There are only three equations for these five characteristics, so that two of them may be chosen freely. They should satisfy, however, a lot of regularity, stability and energy conditions for a realistic model. The situation is analogous to the search of charged isotropic star models [7]. This is not surprising since charge can be looked upon as an effective anisotropy of the model [8]. Different choices of the two given functions have been made.

The simplest one is to propose ansatze for the two metric functions. Then the Einstein equations become expressions for the matter components. One of the first solutions was given in [9], where some of the Tolman isotropic solutions [10] were modified to become anisotropic. Another [11] relies on the metric of the well-known charged Krori and Barua solution [12]. Others were based on different isotropic solutions, found in the past [13, 14]. A solution in isotropic coordinates also exists [15].

String theory has inspired embedding of branes like in the Randall–Sundrum model [16]. This rekindled the interest in stellar models embedded in 5-dimensional flat spacetime (embedding class one). They must satisfy the Karmarkar condition [17]. It can be written as a relation between \(\lambda \) and \(\nu ^{\prime }\) where \(^{\prime }\) means radial derivative. Consequently, one can choose one of these functions as generating the whole solution. It is interesting that the isotropic condition, which is an equality between the pressures, can be translated into a similar relation, giving different generating functions [18,19,20,21,22]. This is more easily done in isotropic coordinates, but canonical coordinates can be used too [20].

There are just two perfect fluid solutions of the Karmarkar condition – the interior Schwarzschild one [2], which has infinite speed of sound and a cosmological one. When the fluid is anisotropic, a plethora of realistic solutions have been found in the last two years. In some of them the generating metric component is a polynomial [23,24,25,26,27,28], in others it is a rational function [29,30,31]. There are also trigonometric [32, 33], hyperbolic [34] and exponential generating metric components [35, 36].

There is a group of hybrid solutions with given one metric and one matter function. Such is the model in higher-dimensional spacetime with prescribed \( \nu \) and the anisotropy factor \(\varDelta =p_t-p_r\), which measures the diversion from isotropy [37]. An algorithm was given how to find any anisotropic solution provided these potentials are known [38]. It is based on linear differential equations, which are integrable. Different examples were given, but the regularity conditions were not studied. For isotropic solutions it becomes the algorithm of Lake [20]. It was used in [39], where a special function appears. Solutions were also found in isotropic coordinates [40, 41]

Conformally flat anisotropic spheres have vanishing Weyl tensor. This leads to a linear differential equation for \(\nu ^{\prime }\), which can be integrated and even a relation between \(\nu \) and \(\lambda \) is the outcome [42]. Several models were given with \(p_r=0\) or prescribed \(\lambda \). Recently, a conformally flat model with polytropic equation of state was discussed [43]. More solutions have been given by other authors [44, 45].

Closely related are solutions which admit conformal motion. They depend on the conformal factor and a matter component, which can be \(\rho \) [46, 47], or the mass m [48]. One can add here a model with given \(\lambda \) [49], since the expressions for \(\rho \), m and \(\lambda \) are simply related. There is a model with a linear equation of state (LEOS) between \(p_r\) and \(\rho \) [50], and another one with LEOS between the pressures [51]. Reference [42] has been generalised to non-static and electrically charged solutions [52].

Algorithms have been proposed for obtaining anisotropic solutions from isotropic relativistic [53,54,55] or Newtonian ones [56].

The last group of known solutions are the models with two freely prescribed matter components. The interior Schwarzschild solution [2] is one of them, but it is isotropic with \(p_r=p_t\) and \(\rho =\mathrm{const}\). The first anisotropic solution was proposed by Lemaitre [3]. It has vanishing \(p_r\) and constant \(\rho \) and was found independently by Florides [57]. It was studied further in [58]. A very important equation of hydrostatic equilibrium exists, involving only \(\rho \), \(p_r\) and \(p_t\) in canonical coordinates. This is the TOV (Tolman, Oppenheimer and Volkoff) equation [10, 59] found initially for isotropic solutions. Its anisotropic version was used by Bowers and Liang [5] to find the first well-known star model, which has constant \(\rho \), while \( \varDelta \) is given in a form suitable to solve the TOV equation. They asserted that anisotropic models may have arbitrarily large surface redshifts, which can explain the big redshifts of quasars. However, when the energy conditions are taken into account, realistic models have bounded redshifts [60]. The surface redshift, the mass and the radius of the star are characteristics that can be measured by astronomers. A model with constant \(\rho \) and non-vanishing \(p_r\) has been given [61]. In [62] the method of [5] was further developed and a model with singular \(\rho \) was studied too. Bondi [63] searched for models with large redshifts, including a solution with constant \(\rho \), and another, with constant \(Q=p_r+2p_t\), and found that the latter shows more perspective.

Recently, it was shown that in isotropic coordinates the existence of an EOS gives an expression of \(\lambda \) in terms of \(\mu \), which may serve as a generating function. The case with \(p_r=0\) was solved completely [64], giving an example of a new solution. The same was done for solutions with LEOS \(p_r=\alpha \rho -\beta \) [65] and for the Chaplygin EOS [66].

A number of solutions with given \(\rho \) and \(p_r\), not linked by an EOS, are known [67,68,69,70]. Recently, solutions with prescribed \(\lambda \) and \(p_r\) have been given full physical analysis [71,72,73,74]. At first sight, these are hybrid solutions, but since \(\lambda \) is closely related to \(\rho \), we mention them here. Solutions, containing free \(\varDelta \), exist in several combinations. Thus \(\varDelta \), \(\rho \) solutions either simplify the TOV equation [75, 76] or the Einstein equations, which acquire simple solutions [77, 78], or even such in hypergeometric functions [79, 80].

A subgroup of this last group are models, where \(p_r\) satisfies some EOS. The simplest one is the so-called \(\gamma \)-law, \(p_r=\gamma \rho \), linear and without a free term. Anisotropy allows for much more solutions. This resembles the addition of charge to isotropic solutions [7, 81]. There are models with prescribed \(\rho \) [82, 83] or m [84]. For the usual compact stars \(\gamma \in [0,1]\). For dark energy stars it may be negative [85, 86]. Quintessence stars have a second dark energy density \(\rho _q\) imposed on normal matter [87,88,89,90]. Some earlier models of this type with \(p_r=-\rho \) can be found in Refs. [91, 92].

Another class of models have a linear EOS with a free term, the so-called MIT bag constant, which is suitable for more compact stars, \(p_r=\alpha \rho -\beta \). There are models with in addition given m, [93, 94] or \(\lambda \) [95,96,97,98,99]. There are also models with quadratic EOS and \( \lambda \) [100,101,102]. The popular polytropic EOS from Newtonian gravity was shown to lead in the anisotropic Newtonian case to the well-known Lane–Emden equations [103] and to their relativistic generalisation in Einstein’s gravity [104]. A simple solution for a simple ansatz for \(\lambda \) has been found [105]. Finally a solution with \(\lambda \) and the modified Van der Vaals EOS was presented recently [106].

The above classification of anisotropic star models does not pretend to be exhaustive, especially for the more exotic cases. There are additional recent references. We wanted to draw a global picture, showing where the general method for finding physically realistic solutions, proposed in the present paper, stands. In Sect. 2 the Einstein field equations are given, as well as the definitions of the main characteristics of a static anisotropic star. In Sect. 3 we summarise the conditions for a physically realistic model, amassed during the past decades. In Sect. 4 we argue that the model of type \(\rho \), \(p_r\) is the easiest one to implement these conditions. In Sect. 5 we derive different relations between the conditions, which reduce their number. In Sect. 6 an example is given—solutions with linear EOS and simple energy density. In this method the main object we study is the tangential pressure, which is done in Sect. 7. In Sect. 8 some other EOS are studied. Section 9 contains our discussion.

2 Field equations and definitions

The interior of static spherically symmetric stars is described by the canonical line element

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

where \(\lambda \) and \(\nu \) are dimensionless and depend only on the radial coordinate r. The Einstein equations read

$$\begin{aligned} k\rho= & {} \frac{1}{r^2}\left[ r\left( 1-e^{-\lambda }\right) \right] ^{\prime }, \end{aligned}$$
(2)
$$\begin{aligned} kp_r= & {} -\frac{1}{r^2}\left( 1-e^{-\lambda }\right) +\frac{\nu ^{\prime }}{r}e^{-\lambda }, \end{aligned}$$
(3)
$$\begin{aligned} kp_t= & {} \frac{e^{-\lambda }}{4}\left( 2\nu ^{\prime \prime }+\nu ^{\prime 2}+ \frac{2\nu ^{\prime }}{r}-\nu ^{\prime }\lambda ^{\prime }-\frac{2\lambda ^{\prime }}{r}\right) , \end{aligned}$$
(4)

where \(\rho \) is the matter density, \(p_r\) is the radial pressure, \(p_t\) is the tangential one, \(^{\prime }\) means a radial derivative and

$$\begin{aligned} k=\frac{8\pi G}{c^4}. \end{aligned}$$
(5)

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=\frac{kc^2}{2}\int _0^r\rho \left( \omega \right) \omega ^2\mathrm{d}\omega . \end{aligned}$$
(6)

Due to \(kc^2\), its dimension is length. Then Eq. (2) gives

$$\begin{aligned} e^{-\lambda }=1-\frac{2m}{r}. \end{aligned}$$
(7)

The compactness of the star u is defined by

$$\begin{aligned} u=\frac{2m}{r} \end{aligned}$$
(8)

and is dimensionless.

On the other side, the redshift Z depends on \(\nu \):

$$\begin{aligned} Z\left( r\right) =e^{-\nu /2}-1. \end{aligned}$$
(9)

The field equations do not contain \(\nu \), but its first and second derivative. One can express \(\nu ^{\prime }\) from Eqs. (2), (3), and (7) as

$$\begin{aligned} \nu ^{\prime }=\frac{krp_r+2m/r^2}{1-2m/r}. \end{aligned}$$
(10)

The second derivative \(\nu ^{\prime \prime }\) may be excluded by differentiation of Eq. (3) and combination with the other field equations. The result is

$$\begin{aligned} p_r^{\prime }=-\frac{1}{2}\left( \rho c^2+p_r\right) \nu ^{\prime }+\frac{ 2\varDelta }{r}, \end{aligned}$$
(11)

where \(\varDelta =p_t-p_r\) is the anisotropic factor. Combining (10) and (11) one gets the well-known TOV (Tolman, Oppenheimer, Volkoff) equation [10, 59] of hydrostatic equilibrium in a relativistic anisotropic star [5]

$$\begin{aligned} p_r^{\prime }=-\left( \rho c^2+p_r\right) \frac{krp_r+2m/r^2}{2\left( 1-2m/r\right) }+\frac{2\left( p_t-p_r\right) }{r}. \end{aligned}$$
(12)

The hydrostatic force on the left, \(F_h\), is balanced by the gravitational and the anisotropic forces, \( F_g \) and \(F_a\), on the right. This equation is not independent from the field equations, but it is their consequence. It can replace one of them. It is also equivalent to the Bianchi identities \(T_{\nu ;\mu }^\mu =0\), which in the static spherically symmetric case have only one non-trivial component [5, 75, 76, 104]. In CGS units \( G=6.674\times 10^{-8}\) cm\(^3/\)g s\(^2\), \(c=3\times 10^{10}\) cm/s, \( k=2.071\times 10^{-48}\) s\(^2\)/g cm, \(kc^2=1.864\times 10^{-27}\) cm/g. From now on we set \(G=c=1\), passing to the usual relativistic units. Then \(k=8\pi \).

As a whole, we have three field equations for five unknown functions: \( \lambda ,\nu ,\rho ,p_r\) and \(p_t\). We can choose freely two of them, but the model will be physically realistic if a number of regularity, matching and stability conditions are satisfied too.

3 Conditions for a physically realistic model

A comparatively reasonable set of conditions includes

C1 The metric potentials are positive and should be finite and free from singularities in the star’s interior and at the centre should satisfy \( e^{-\lambda \left( 0\right) }=1\) and \(e^{\nu \left( 0\right) }=\mathrm{const}\).

C2 Matching conditions. At the surface of the star \(r=r_s\) the interior solution should match continuously to the exterior Schwarzschild solution,

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

This determines the metric at the surface

$$\begin{aligned} e^{\nu \left( r_s\right) }=e^{-\lambda \left( r_s\right) }=1-\frac{2M}{r_s}. \end{aligned}$$
(14)

In addition, the radial pressure there vanishes, \(p_{rs}=0\). Neither the energy density nor the tangential pressure are obliged to do so.

C3 The interior redshift Z, which, according to Eq. (9), depends only on \( \nu \) should decrease with the increase of r. The surface redshift and compactness are related, due to Eq. (14):

$$\begin{aligned} Z_s=\left( 1-u_s\right) ^{-1/2}-1. \end{aligned}$$
(15)

They should be less than the universal bounds, found when different energy conditions hold (see C6). In the isotropic case they are 2 and 8/9, respectively [107]. In the anisotropic case, when DEC holds, they are 5.211 and 0.974. When SEC holds, one has the bounds 3.842 and 0.957 [60]. They are greater than those in the isotropic case, but not arbitrary as asserted in [5].

C4 The density and the pressures should be non-negative inside the star. For \(\rho \) this coincides with the null energy condition (NEC). At the centre they should be finite \(\rho \left( 0\right) =\rho _0\), \(p_r\left( 0\right) =p_{r0}\), \(p_t\left( 0\right) =p_{t0}\). Moreover, \(p_{r0}=p_{t0}\).

C5 They should reach a maximum at the centre, so \(\rho ^{\prime }\left( 0\right) =p_r^{\prime }\left( 0\right) =p_t^{\prime }\left( 0\right) =0\) and should decrease monotonously outwards, \(\rho ^{\prime }\le 0\), \(p_r^{\prime }\le 0\), \(p_t^{\prime }\le 0\). The tangential pressure should remain bigger than the radial one, except at the centre, \(p_t\ge p_r\). An isotropic model is obtained when this inequality turns into an equality; this is called the isotropic condition.

C6 Energy conditions. The solution should satisfy the dominant energy condition (DEC) \(\rho \ge p_r\), and \(\rho \ge p_t\). When the pressures are positive, DEC is equivalent to the weak energy condition (WEC). It is desirable that even the strong energy condition (SEC) \(\rho \ge p_r+2p_t\) is satisfied. Obviously, the latter encompasses DEC.

C7 Causality condition. It says that the radial and tangential speeds of sound should not surpass the speed of light. The speeds of sound are defined as \(v_r^2=\mathrm{d}p_r/\mathrm{d}\rho \) and \(v_t^2=\mathrm{d}p_t/\mathrm{d}\rho \). Therefore this condition reads

$$\begin{aligned} 0<\frac{\mathrm{d}p_r}{\mathrm{d}\rho }\le 1,\quad 0<\frac{\mathrm{d}p_t}{\mathrm{d}\rho }\le 1. \end{aligned}$$
(16)

C8 The adiabatic index \(\varGamma \) as a criterion of stability. This index is the ratio of two specific heats and should be bigger than 4 / 3 for stability [6, 108, 109],

$$\begin{aligned} \varGamma =\frac{\rho +p_r}{p_r}\frac{\mathrm{d}p_r}{\mathrm{d}\rho }\ge \frac{4}{3}. \end{aligned}$$
(17)

C9 Stability against cracking. Cracking was introduced by Herrera [110] as a possibility of breaking of perturbed self-gravitating spheres. Abreu et al. [111] found a simple requirement for avoiding this to happen, namely that the region of stability be

$$\begin{aligned} -1\le \frac{\mathrm{d}p_t}{\mathrm{d}\rho }-\frac{\mathrm{d}p_r}{\mathrm{d}\rho }\le 0. \end{aligned}$$
(18)

C10 The Harrison–Zeldovich–Novikov stability condition [112, 113]. It implies that \(\mathrm{d}M\left( \rho _0\right) /\mathrm{d}\rho _0>0\).

4 General physically realistic solution

As shown in the introduction, one can choose the two free functions out of five in a number of ways. However, only the first three conditions in the previous section are imposed on the metric coefficients. The other concern the components of the energy-momentum tensor \(\rho ,p_r,p_t\). If we choose two of them we can satisfy many of the above conditions, at least partially, beforehand and determine the third one through the TOV equation. It does not contain the metric and replaces Eq. (4) from the original system of Einstein equations. The TOV equation gives a direct expression for \(p_t\),

$$\begin{aligned} p_t=p_r+\frac{1}{2}rp_r^{\prime }+\left( \rho +p_r\right) \frac{\frac{m}{r}+\frac{k}{2}r^2p_r}{2\left( 1-\frac{2m}{r}\right) }. \end{aligned}$$
(19)

The mass m is obtained by integration of the density \(\rho \) (see Eq. (6)), so that the r.h.s. of the above equation involves only \(\rho \) and \( p_r \).

If we try to express \(p_r\) from TOV, we get a Riccati equation,

$$\begin{aligned} R_1p_r^{\prime }=R_2p_r^2+R_3p_r+R_4, \end{aligned}$$
(20)

where the coefficients \(R_i\) can easily be extracted from Eq. (19). It is not integrable in the general case.

Equation (19) is a very complicated integral equation for \(\rho \). It simplifies for m to an Abel equation of the second kind,

$$\begin{aligned} \left( A_1m+A_2\right) m^{\prime }=A_3m+A_4, \end{aligned}$$
(21)

where we have used the opposite of Eq. (6), namely

$$\begin{aligned} \frac{k}{2}\rho =\frac{m^{\prime }}{r^2}. \end{aligned}$$
(22)

The Abel equation does not possess a general solution too.

Thus, the natural step is to choose \(\rho \) and \(p_r\) as free functions and express \(p_t\) from Eq. (19). Then we find the mass from Eq. (6) and \( e^\lambda \) from Eq. (7). It replaces the original Eq. (2). The coefficient \( e^\nu \) is found up to a constant from Eq. (10), which replaces the original Eq. (3). Hence, instead of the system of Eqs. (2)–(4) we shall use the system of Eqs. (7), (10), and (19), where \(\rho \) and \(p_r\) are chosen to satisfy the parts of conditions C4–C10, referring to them. One can even end with a single generating function \(\rho \) for the solution, by imposing an equation of state (EOS) on the radial pressure, \(p_r=f\left( \rho \right) \).

Condition C10 concerns only \(\rho \), while C8 concerns only \(\rho \) and \( p_r \), and they have to be satisfied by properly choosing these two functions.

Another group consists from the conditions upon the metric C1–C3. Equation (6) shows that \(m\left( 0\right) =\frac{m}{r}\left( 0\right) =0\), because \(\rho \) is regular and finite at the centre. Equation (7) states that \(e^{\lambda \left( 0\right) }=1\). The mass, being an integral of a positive function, increases with the radius (which may be seen also from Eq. (22)) and at the surface Eq. (7) and C2 yield \(m\left( r_s\right) =M\), the total mass of the star. Therefore m / r should increase from 0 to \(M/r_s,\) but should not surpass 1 because a horizon appears then. Thus, \(e^\lambda \) is an increasing function. The r.h.s. of Eq. (10) is positive, hence \(\nu ^{\prime }>0\) and \( e^\nu \) increases too. The arbitrary constant in it allows one to arrange the fulfilment of Eq. (14). Since it shows that \(e^{\nu \left( r_s\right) }<1\), the same is true for \(e^{\nu \left( 0\right) }\) and the constant in C1 is smaller than unity. Finally, \(\nu ^{\prime }>0\) means that Z decreases going outwards (see Eq. (9)). The surface redshift and the compactness will satisfy the bounds in [60], as long as the DEC or the SEC holds. Thus, conditions C1–C3 are satisfied from general considerations and the pre-arranged requirement \(\left( m/r\right) ^{\prime }>0\).

The third group of requirements consists of the parts of conditions C4–C10, which refer to \(p_t\). One of them follows immediately from Eq. (19). At \(r=0\) we have \(p_{t0}=p_{r0}\) because \(p_r^{\prime }\left( 0\right) =0,\rho \left( 0\right) \) and \(p_r\left( 0\right) \) are finite, \(\frac{m}{r}\left( 0\right) =0\) as shown above. Thus, \(p_{t0}\) is also finite and the solution satisfies C4 completely. There remain parts of C5, C6, C7 and C9 to be satisfied by \(p_t\).

The usual method used in the literature is to take two of the five essential characteristics of the model and choose simple expressions for them as polynomials or rational functions. Sometimes trigonometric and even special functions are used. They are supplied with enough parameters to try to satisfy the realistic conditions, starting with C1 and ending with C10. Already at this stage some of the expressions are so complicated that the authors pass to graphical description proofs, by means of figures. Even with one free parameter the graphics become 3D. This method is rather close to numerical simulations and not to an analytical study. Is it possible to reduce the number of graphic proofs? Do any relations exist between the numerous conditions, concerning just a few basic characteristics of the model, so that some of the conditions follow from the others in the general case? These questions will be dealt with in the next section.

5 Relations between the different conditions

Let us take the anti-cracking condition C9 and write it as

$$\begin{aligned} -1+\frac{\mathrm{d}p_r}{\mathrm{d}\rho }\le \frac{\mathrm{d}p_t}{\mathrm{d}\rho }\le \frac{\mathrm{d}p_r}{\mathrm{d}\rho }. \end{aligned}$$
(23)

Since the radial speed of sound from the causality condition is arranged to lie in the interval (0, 1], the l.h.s. is not positive. Combining inequalities (16) and (23) we get

$$\begin{aligned} 0\le \frac{\mathrm{d}p_t}{\mathrm{d}\rho }\le \frac{\mathrm{d}p_r}{\mathrm{d}\rho }. \end{aligned}$$
(24)

This can be written as

$$\begin{aligned} 0\le \frac{p_t^{\prime }}{\rho ^{\prime }}\le \frac{p_r^{\prime }}{\rho ^{\prime }}. \end{aligned}$$
(25)

Multiplying by \(\rho ^{\prime }\), which should be negative, results in the pair of inequalities

$$\begin{aligned} 0\ge p_t^{\prime }\ge p_r^{\prime }. \end{aligned}$$
(26)

Starting with Eq. (26) we may go backwards to Eq. (24). It can be replaced by the second part of Eq. (16), which gives a weaker pair of inequalities. Equation (24) may be replaced also by the weaker pair given by Eq. (23), which is nothing but Eq. (18). Thus we have proved that Eq. (26) is equivalent to C7 and C9 and if it holds, they hold too.

We take Eq. (26) as the basic one that we have to satisfy. It shows that \( p_t \) and \(p_r\) decrease monotonously (for \(p_r\) this is arranged beforehand) and that \(p_t^{\prime }\left( 0\right) =0\) as long as \( p_r^{\prime }\left( 0\right) =0\). The latter equality is also pre-arranged. All these enter C5, together with the pre-arranged conditions for \(\rho \). C5 will be satisfied completely when we prove that \(p_t\ge p_r\). Equation (26) also shows that \(\varDelta \) increases with r.

In order to do this proof we first study the behaviour of inequalities under differentiation and integration. If \(g\left( r\right) \ge 0\), \(g^{\prime }\left( r\right) \ge 0\) does not necessarily follow, because the function \( g\left( r\right) \) may oscillate up and down, having regions with negative derivative, but still remaining positive all the time. However, if \(g\left( r\right) \ge 0\), the definite integral of it \(\int _{r_1}^{r_2}g\left( r\right) \mathrm{d}r\ge 0\) too, provided that \(r_2>r_1\), because this is the area of the surface under the graphic of \(g\left( r\right) \). The analogous conclusion also holds for a negative \(g\left( r\right) \). There are two special radial points in a star model: \(r=0\) and \(r=r_s\). So we shall take integrals between 0 and r, or between r and \(r_s\). These lead to corollaries of the initial inequality and not to equivalence. The easiest function to integrate is a derivative, \(g=h^{\prime }\). This is one of the reasons to start from the end of the list of conditions, where derivatives prevail the inequalities, and work backwards, contrary to what is usually done.

Thus, taking the integral \(\int _0^r\) of Eq. (26) we obtain

$$\begin{aligned} 0\ge p_t-p_{t0}\ge p_r-p_{r0}. \end{aligned}$$
(27)

We have shown earlier that TOV leads to \(p_{t0}=p_{r0}\), hence, Eq. (27) becomes \(p_{r0}\ge \) \(p_t\ge p_r\). In this way C5 holds in total, provided that Eq. (26) is true.

It remains to satisfy C6, that is, the two energy conditions. Let us deal first with DEC. The first part of C7 may be written as

$$\begin{aligned} \left( p_r-\rho \right) ^{\prime }\ge 0. \end{aligned}$$
(28)

Integrating this inequality from r to \(r_s\) and taking into account that \( p_{rs}=0\), we find

$$\begin{aligned} \rho -p_r\ge \rho _s\ge 0. \end{aligned}$$
(29)

Thus, DEC follows for \(p_r\) from the causality condition. In fact, we can pre-arrange both of them. Doing the same procedure for \(p_t\) yields a similar result,

$$\begin{aligned} \rho -p_t\ge \rho _s-p_{ts} . \end{aligned}$$
(30)

Hence, if DEC holds at the surface, it also holds in the interior. Now, at the surface the expression for \(p_t\) following from Eq. (19) becomes

$$\begin{aligned} p_{ts}=\frac{1}{2}r_sp_r^{\prime }\left( r_s\right) +\frac{\rho _s\frac{M}{r_s}}{2\left( 1-\frac{2M}{r_s}\right) }. \end{aligned}$$
(31)

Then \(\rho _s-p_{ts}\ge 0\) turns into

$$\begin{aligned} \frac{2-\frac{5M}{r_s}}{2\left( 1-\frac{2M}{rs}\right) }\rho _s\ge \frac{1}{2}r_sp_r^{\prime }\left( r_s\right) . \end{aligned}$$
(32)

The r.h.s. is negative, while the denominator in the l.h.s. is positive. Consequently, a sufficient condition for DEC will be a positive numerator,

$$\begin{aligned} u_s=\frac{2M}{r_s}\le 0,8. \end{aligned}$$
(33)

It is a rather realistic condition.

Let us discuss next SEC. A sufficient condition, which depends only on \(\rho \) and \(p_r\) and therefore can be pre-arranged, reads

$$\begin{aligned} 2p_{r0}+p_r\le \rho . \end{aligned}$$
(34)

Then SEC follows from the chain of inequalities

$$\begin{aligned} 2p_t+p_r\le 2p_{t0}+p_r=2p_{r0}+p_r\le \rho , \end{aligned}$$
(35)

which are due to the fact that \(p_t\) decreases and is equal to \(p_r\) at the origin. Equation (34) is also a rather mild restriction.

Summarising, the pair of inequalities (26) are the only conditions that \(p_t\) must satisfy. Before discussing them we present a relation about C8. A sufficient condition for it to take place is a lower limit on the radial speed of sound

$$\begin{aligned} \frac{\mathrm{d}p_r}{\mathrm{d}\rho }\ge \frac{1}{3}, \end{aligned}$$
(36)

which is simpler. Indeed, when SEC (C6) holds and we apply C5 we get \(\rho \ge 3p_r\). Put in C8 it gives the above inequality.

Now let us take Eq. (27) and place in it the expression for \(p_t\) from Eq. (19). After some manipulations we get

$$\begin{aligned}&-rp_r^{\prime }\le 2F\le -rp_r^{\prime }+2\left( p_{r0}-p_r\right) ,\nonumber \\&\quad 2F=r^2\left( \rho +p_r\right) \frac{\frac{m}{r^3}+\frac{k}{2}p_r}{1-\frac{ 2m}{r}}. \end{aligned}$$
(37)

Applying the L’Hospital rule to Eq. (6) yields

$$\begin{aligned} \frac{m}{r}\left( 0\right) =\frac{m}{r^2}\left( 0\right) =0,\quad \frac{m}{r^3}\left( 0\right) =\frac{k}{6}\rho _0. \end{aligned}$$
(38)

Therefore, F behaves as \(r^2\) when \(r\rightarrow 0\). The left and the right bounds should behave the same way, otherwise one of the inequalities will break near the origin. This means that \(p_r\sim p_{r0}-c_1r^2\), \( p_r^{\prime }\sim -2c_1r\) there. Hence if we choose \(p_r=p_{r0}-c_1r^n\) as a simple expression for the radial pressure, only \(n=2\) may fulfil Eq. (27). If \(p_r\) satisfies an EOS, we have \(p_r^{\prime }=f\left( \rho \right) _\rho \rho ^{\prime }\sim r\) and \(\rho \sim \rho _0-c_1r^2\). If \(\rho =\rho _0-ar^n \) [56], only \(n=2\) has a chance. Here \(c_1,a,n\) are some positive constants.

6 Solutions with linear EOS and simple energy density

Let us choose \(\rho \) as a simple binomial and \(p_r\) satisfying a linear EOS with a bag constant,

$$\begin{aligned} \rho =\rho _0-ar^2, \end{aligned}$$
(39)
$$\begin{aligned} p_r=\beta \left( \rho -\rho _s\right) . \end{aligned}$$
(40)

This kind of density appears already in the Tolman VII isotropic solution [10]. Anisotropic models with such a density can be found in Refs. [45, 56, 67,68,69,70, 82, 95, 99, 100, 102, 105, 106]. Models with such LEOS are discussed in [65, 93,94,95,96,97,98,99]. Obviously \(p_{r0}=\beta \left( \rho _0-\rho _s\right) >0,\) \(p_{rs}=0\). Thus C4 holds for them. \(\rho \) and \(p_r\) have a maximum at the centre and decrease outwards, satisfying their part of C5. We also introduce the notation

$$\begin{aligned} x=r^2,\quad y=\frac{x}{x_s},\quad \alpha =1-\frac{\rho _s}{\rho _0},\quad b=k\rho _0x_s. \end{aligned}$$
(41)

Now \(\mathrm{d}p_r/\mathrm{d}\rho =\beta \), so the first causality condition in C7 holds for \( 0<\beta \le 1\). Then DEC holds too. The sufficient condition for SEC (34) becomes

$$\begin{aligned} \beta \left( 2\rho _0-3\rho _s\right) \le \left( 1-\beta \right) \rho . \end{aligned}$$
(42)

This inequality is true, if it is true for \(\rho =\rho _s\), which yields

$$\begin{aligned} \alpha \le \frac{1}{1+2\beta }. \end{aligned}$$
(43)

Next we can obtain a more refined estimate for the adiabatic index \(\varGamma \) and C8. Inequality (17) leads to

$$\begin{aligned} \left( 3\beta -1\right) \rho \ge \left( 3\beta -4\right) \rho _s. \end{aligned}$$
(44)

It is true when \(\beta \ge 1/3\) since the r.h.s. is always negative, because \(\beta \le 1\), while the l.h.s. is non-negative. Hence, C8 holds, in accord with the sufficient condition Eq. (36). When \(\beta <1/3\) we get

$$\begin{aligned} \rho <\left( 1+\frac{3}{1-3\beta }\right) \rho _s, \end{aligned}$$
(45)

which holds, provided it holds for \(\rho _0\). This leads to \(\alpha <3/\left( 4-3\beta \right) \). Then C8 is also fulfilled.

Equation (39) yields for a

$$\begin{aligned} a=\frac{\rho _0-\rho _s}{x_s}=\frac{\alpha \rho _0}{x_s}. \end{aligned}$$
(46)

Then \(\rho ,p_r\) may be written as

$$\begin{aligned} \rho =\rho _0\left( 1-\alpha y\right) ,\quad p_r=\alpha \beta \rho _0\left( 1-y\right) . \end{aligned}$$
(47)

The mass m is given by Eq. (6),

$$\begin{aligned} m= & {} \frac{k\rho _0}{30}r^3\left( 5-3\alpha y\right) ,\quad m_s=M=\frac{k\rho _0 }{30}r_s^3\left( 5-3\alpha \right) ,\nonumber \\ u_s= & {} \frac{b}{15}\left( 5-3\alpha \right) . \end{aligned}$$
(48)

As a function of \(\rho _0\), the total mass M and its derivative become

$$\begin{aligned} M\left( \rho _0\right) =\frac{kr_s^3}{30}\left( 2\rho _0+3\rho _s\right) ,\quad \frac{\mathrm{d}M\left( \rho _0\right) }{\mathrm{d}\rho _0}=\frac{kr_s^3}{15}>0. \end{aligned}$$
(49)

Thus C10 is satisfied and the specific density and radial pressure satisfy all realistic conditions.

Let us turn to the metric functions next. Putting Eq. (48) into Eq. (7) yields an expression for \(\lambda \):

$$\begin{aligned} e^{-\lambda }=1-\frac{b}{15}y\left( 5-3\alpha y\right) . \end{aligned}$$
(50)

This is a polynomial of the second degree in x [98]. We have pointed out that m / r should increase with r from 0 to \(M/r_s\). Equation (48) gives

$$\begin{aligned} \left( \frac{m}{r}\right) ^{\prime }=\frac{k\rho _0r}{15}\left( 5-6\alpha y\right) . \end{aligned}$$
(51)

This will be positive when \(\rho _0<6\rho _s\), equivalent to \(\alpha <5/6\).

The function \(e^\nu \) is found by integrating Eq. (10) which is a rational function in y. The result is given by Eq. (3.4) from [98]. These functions satisfy the conditions on the metric C1–C3, as was shown before.

7 Tangential pressure and the main pair of inequalities

Equation (19) may be rewritten as

$$\begin{aligned} p_t=\left( xp_r\right) _x+F, \end{aligned}$$
(52)
$$\begin{aligned} F=\frac{x\left( \rho +p_r\right) \left( \frac{m}{r^3}+\frac{k}{2}p_r\right) }{ 2\left( 1-\frac{2m}{r}\right) }. \end{aligned}$$
(53)

The inequalities (26) become

$$\begin{aligned} p_{rx}-\left( xp_r\right) _{xx}\le F_x\le -\left( xp_r\right) _{xx}. \end{aligned}$$
(54)

Using the equations in the previous section we get

$$\begin{aligned} 2\alpha \beta \rho _0\le 2F_y\le 4\alpha \beta \rho _0. \end{aligned}$$
(55)

The function in the middle should lie between two simple constant bounds. It is given by

$$\begin{aligned} 2F=\frac{b\rho _0}{30}\frac{yF_1F_2}{F_3}, \end{aligned}$$
(56)

where

$$\begin{aligned} F_1= & {} 1+\alpha \beta -\alpha \left( 1+\beta \right) y, \end{aligned}$$
(57)
$$\begin{aligned} F_2= & {} 5+15\alpha \beta -3\alpha \left( 1+5\beta \right) y, \end{aligned}$$
(58)
$$\begin{aligned} F_3= & {} 1-\frac{b}{15}y\left( 5-3\alpha y\right) , \end{aligned}$$
(59)

all of them being positive. Next we find

$$\begin{aligned} 2F_y= & {} \frac{b\rho _0}{30F_3^2}\Bigg \{ \left[ F_1F_2-\alpha \left( 1+\beta \right) yF_2-3\alpha \left( 1+5\beta \right) yF_1\right] F_3 \nonumber \\&+\frac{b}{15}F_1F_2y\left( 5-6\alpha y\right) \Bigg \} . \end{aligned}$$
(60)

Equation (12) shows that F is closely connected to the gravitational force in the TOV equation, \(F_g=-2F/r\). We expect that \(F_y\) decreases. Then it satisfies Eq. (55) when it does so for \(r=0\) and \(r=r_s\).

At \(r=0,\) \(y=0\) and we have

$$\begin{aligned} \frac{12\gamma }{\left( 1+\gamma \right) \left( 1+3\gamma \right) }\le b\le \frac{24\gamma }{\left( 1+\gamma \right) \left( 1+3\gamma \right) }, \end{aligned}$$
(61)

where \(\gamma =\alpha \beta \).

At the surface \(r_s,\) \(y=1\) and

$$\begin{aligned} 4\gamma l^2\le & {} \left[ 9\alpha ^2-16\alpha +5-2\gamma \left( 10-9\alpha \right) \right] l\nonumber \\&+\left( 1-\alpha \right) \left( 5-3\alpha \right) \left( 5-6\alpha \right) \le 8\gamma l^2, \end{aligned}$$
(62)

where we have replaced b with l for simplicity,

$$\begin{aligned} b=\frac{15}{l+5-3\alpha }. \end{aligned}$$
(63)

The final result is four intricate inequalities for the three free constants \(\alpha ,\beta ,b\). Equation (41) shows that they hide inside the physical constants \(\rho _0,\rho _s\) and \(r_s\), from which through Eq. (48) one can find the other main star characteristics \(M,u_s,Z_s\). In addition, \(\alpha \) should satisfy Eqs. (43) and (51), while the surface compactness should satisfy Eq. (33).

A solution with the same functions \(\rho \) and \(p_r\) was given in [98]. It has \(\rho _0=3.98\times 10^{15}\) g/cm\(^3\), \(\rho _s=3.29\times 10^{15}\) g/cm\(^3\) and \(\beta =1/3\). Then we have \(\alpha =0.1734\), \(\gamma =0.0578\). Obviously \(\alpha \) satisfies Eqs. (43) and (51), while the radial speed of sound satisfies the sufficient condition Eq. (36). Equation (61) becomes

$$\begin{aligned} 0.559\le b\le 1.118. \end{aligned}$$
(64)

Equation (62) yields a region which intersects with it, namely

$$\begin{aligned} 0.916\le b\le 1.251, \end{aligned}$$
(65)

so that, finally,

$$\begin{aligned} 0.916\le b\le 1.118 \end{aligned}$$
(66)

is the interval for a realistic b. We can also show graphically that \( H\equiv F_y/\gamma \rho _0\) decreases for the interval (66), as required, and stays between 1 and 2, because of Eq. (55); see Fig. 1. The middle line is for \(b=1\), while the lower and the upper ones correspond to the limits in Eq. (66). This is the only time we use a graphic proof.

In [98] \(b=1.074\), which is in the above region. One obtains also \( u_s=0.299b=0.321\), a value well below 0.8 and the bounds in [60]. Therefore, such a solution satisfies C1–C10 and is physically realistic. The star is chosen very compact, with radius 3.8 km. The solar mass is \( M_\mathrm{sol}=1.988\times 10^{33}\) g, so that \(GM_\mathrm{sol}/c^2=1.474\) km. Then the mass is \(M=0.411M_\mathrm{sol}\) and \(Z_s=0.2135\). We have found instead a range of solutions, with b satisfying Eq. (66), which include the solution of [98]. The main parameters also span ranges of values. Thus \(u_s\in \left[ 0.274,0.334\right] \), \(M/M_\mathrm{sol}\in \left[ 0.353,0.431\right] \), \( Z_s\in \left[ 0.174,0.225\right] \).

Fig. 1
figure 1

The decrease of H for the region of Eq. (66)

Astronomers have observed even more compact, presumably quark stars, such as PSR B0943+10 with radius 2.6 km, described also by an analytical model [101], Table 1 and [102], Table 1. Another observed star mentioned in [102], named RX J1856.5-3754, has radius of 3.5 km, so the above value of 3.8 km is realistic.

Next, let us find another cluster of solutions by choosing \(\rho _s/\rho _0=0.82\), (\(\alpha =0.18\)), \(\beta =1/3\). Then \(\gamma =0.06.\) Equations (61) and (62) this time lead to

$$\begin{aligned} 0.958\le b\le 1.152, \end{aligned}$$
(67)

which is a slightly displaced range. Once again H decreases in it, staying in the interval [1, 2]; see Fig. 2. We have \(u_s\in \left[ 0.285,0.342\right] \), \(M/M_\mathrm{sol}\in \left[ 0.367,0.441\right] \), \(Z_s\in \left[ 0.183,0.233\right] \).

Fig. 2
figure 2

The decrease of H for the region of Eq. (67)

If we take a constant density solution, \(\rho =\rho _0=\rho _s\), we shall have \( \alpha =0\) and \(u_s=0.333b\), which is close to the values discussed above. This is not surprising, since the density of the crust is taken high, more than 80% of the central density. However, this solution is unphysical, since the speed of sound in both directions is infinite. The solutions above satisfy C1–C10 and are physically realistic. There is an interesting relation, following from that. Equation (41), written in CGS units, yields

$$\begin{aligned} b=kc^2\rho _0r_s^2=1864.10^{-17}\rho _0r_s^2, \end{aligned}$$
(68)

when \(\rho _0\) is measured in g/cm\(^3\), while \(r_s\) is measured in km. It shows that there are models with different radius, but the same b. Let us choose \(\rho _0=\rho _1\times 10^{15}\) g/cm\(^3\) where \(\rho _1\) is a number between 1 and 10. The previous equation becomes

$$\begin{aligned} \rho _1r_s^2=53.648b. \end{aligned}$$
(69)

Let us take the highest b found in the two examples, \(b=1.152\). Then the above equality holds for a very compact quark star if \(r_s=4\) km and \(\rho _1=3.863\). However, it also holds for a neutron star with \(r_s=7.861\) km and \(\rho _1=1\). In both cases the \(\rho _0\) is of order \(10^{15}\) g/cm\(^3\). Equation (48) shows that \(u_s\) stays constant with b, hence, the total mass M should increase when \(r_s\) increases. One can call such solutions b-isotopic.

8 Some other EOS

We have already pointed out that models with constant \(\rho \) are not physical, because the speed of sound becomes infinite. Conditions C7–C9 become singular and make no sense. The first interior solution was such a model [2] and others followed [3, 5, 57, 58, 61,62,63, 76]. They can serve as an approximation to some features of the stars.

The same may be said for models with \(p_r=0\) and any \(\rho \) [3, 57, 58, 64]. Because of C4 we should have \( p_{t0}=0\), and because of C5 \(p_t^{\prime }\le 0\). Since, according to C4, the pressures are non-negative, \(p_t=0\) throughout the bulk too. What remains is a dust model with only \(\rho \ne 0\). Such models are unstable and collapse.

Let us discuss models with \(\rho \) given by Eq. (39) and linear EOS, but without the MIT bag constant, [82,83,84], i.e.

$$\begin{aligned} p_r=\beta \rho . \end{aligned}$$
(70)

They follow from Eq. (39) when \(\rho _s=0\) (\(\alpha =1\)). The energy density vanishes at the surface, so such stars are gaseous and have no crust. The tangential pressure is given again by Eq. (52). Now

$$\begin{aligned} \rho +p_r=\left( 1+\beta \right) \rho _0\left( 1-y\right) . \end{aligned}$$
(71)

Then \(F\sim y\left( 1-y\right) \) and vanishes at \(r=0\) (\(y=0\)) and \(r=r_s\) (\( y=1\)). Furthermore,

$$\begin{aligned} \left( xp_r\right) _x=\beta \rho _0\left( 1-2y\right) . \end{aligned}$$
(72)

Thus

$$\begin{aligned} p_{t0}=\beta \rho _0,\quad p_{ts}=-\beta \rho _0, \end{aligned}$$
(73)

that is, the tangential pressure changes sign and becomes negative. This is not allowed by C4 and the model is unphysical with such energy density.

Our final example are models with the same \(\rho \), but with polytropic EOS [95],

$$\begin{aligned} p_r=K\rho ^{1+\frac{1}{n}}, \end{aligned}$$
(74)

where K is the polytropic constant and n is the polytropic index. Once again \(\rho _s=0\) and \(\alpha =1\). Then Eq. (39) leads to

$$\begin{aligned}&\rho = \rho _0\left( 1-y\right) ,\quad p_r=p_{r0}\left( 1-y\right) ^{1+\frac{1}{n}}, \end{aligned}$$
(75)
$$\begin{aligned}&\rho +p_r = \left( 1-y\right) \left[ \rho _0+p_{r0}\left( 1-y\right) ^{\frac{1}{n}}\right] \end{aligned}$$
(76)

and again \(F\sim y\left( 1-y\right) \). On the other side

$$\begin{aligned} xp_{rx}=-\left( 1+\frac{1}{n}\right) p_{r0}y\left( 1-y\right) ^{\frac{1}{n}}. \end{aligned}$$
(77)

Then

$$\begin{aligned} \varDelta =-\left( 1+\frac{1}{n}\right) p_{r0}y\left( 1-y\right) ^{\frac{1}{n}}+F \end{aligned}$$
(78)

and vanishes at the centre and at the surface of the star. Thus \(\varDelta _x\) changes sign somewhere. However, C5 necessitates \(\varDelta _x\) to be positive so that \(\varDelta \) increases. Hence, this model is unphysical, too. One should change the simple expression for \(\rho \). These examples show that it is not so easy to find physically realistic star models.

9 Discussion

With five unknown functions and three equations, one has 10 combinations of two free functions, claiming to give the general solution for anisotropic static stars. The panorama given in the Introduction shows that most of them have been applied to find at least one concrete solution. Instead of \(p_t\) the anisotropic factor \(\varDelta \) has been used. Sometimes m is taken instead of \(\rho \) or \(p_r\). The general solution was seriously discussed in [38]. The main shortcoming is that the conditions for a realistic model are checked after the choice is made. The expressions for the different characteristics become very involved even for polynomial seeding functions and one has to turn to graphic descriptions, which serve as proofs. Solutions are usually supplied with lots of constants, to negotiate the set C1–C10. Just one constant is enough to turn a 2-dimensional plot into a 3-dimensional one, whose projection as a 2-dimensional flow of lines is often used. With two and more constants only partial plots are possible.

We have argued that the combination of free functions \(\rho \), \(p_r\) seems to be the right choice to reduce the number of graphic proofs. There is a simple chain of relations between \(\rho \), m, and \(\lambda \), due to Eqs. (6) and (7), so that one may start with some of the last two and \(p_r\). The advantage of this solution generation method is that we can arrange beforehand that the part of the condition set, referring to \(\rho \), and \( p_r \), is satisfied. This concerns the majority of conditions, namely C4–C10. Besides, C8 and C10 contain only \(\rho \) and \(p_r\).

The set of conditions C1–C10 was formed over the years. In older papers just the new solution is given and sometimes its matching to the exterior. Later the conditions for monotonous decrease and the energy conditions were added. Then followed the causality and stability conditions, the last being C10, which, however, dates back to 1965. These conditions come from phenomenology, where hydrostatics, nuclear theory and thermodynamics meet with general relativity. In theoretical astrophysics they stand as axioms that must be satisfied. One is tempted to ask whether all these conditions are independent. We have shown that this is not the case and reduced them to the couple of inequalities in Eq. (26). Only Eq. (26) needs a graphic proof in the concrete examples. To emphasise this point we have not given any other graphics, even for illustration purposes. This reduction is possible due to the following factors.

The characteristics of static models, unlike the dynamical ones, depend on one variable, the radius. This is true even for the stability criteria, based on time-dependent perturbations. Thus, there are only ordinary derivatives and all of them can be replaced by r-derivatives, e.g. \( \mathrm{d}p_r/\mathrm{d}\rho =p_r^{\prime }/\rho ^{\prime }\).

Inequalities may be integrated, obtaining other true inequalities, which are corollaries, not equivalent to their parents.

Most of the features of the model have simple monotonous behaviour as functions of the radius. Thus, \(\rho \), \(p_r\), \(p_t\), Z decrease, while \( \lambda \), \(\nu \), m, \(\varDelta \), u increase with r. Therefore, one can multiply the inequalities with their derivatives, changing the sign when necessary, without bothering about the region of application—it remains the same. When there is a bump (mainly in \(p_t\)), this signals that something is wrong with the causality and/or the anti-cracking conditions.

Thus, many of the conditions follow from the others for any solution. When an EOS is specified, some of the conditions are fulfilled, provided only \( \rho _s\) and \(\rho _0\) are known and not the whole graphic of \(\rho \).

To illustrate this general formalism we have given a solution with simple energy density and simple EOS, namely linear EOS with bag constant. We have found that the general solution depends on three free constants. They implicate the physical constants \(\rho _0\), \(\rho _s\), \(p_{r0}\) and \( r_s\), which lead in turn to other main characteristics like M, \(u_s\), and \( Z_s\), some of which are measured in astronomy. We have found regions where the solution is realistic and not just a point in the constants’ space. In the previous section we have shown why some popular past solutions break certain realistic conditions. This is true even for the \(\gamma \)-law and the polytropic EOS with the same simple density. Hence, other expressions for \(\rho \) should be studied. We hope that the application of the method, described in this paper, will lead to many other solutions in the future, obtained in an easier study of genuinely analytic nature.