1 Introduction

The Einstein’s field equations on the inside of any compact object establish a relation between the matter content of the source and the interior metric, which is referred to as the interior solution; whereas the vacuum field equations provide us with the suitable exterior metrics, compatible with the symmetry of the problem and matching appropriately with the interior metric, which allows us to describe the gravitational field of the source. The aim of this work consists on establishing, beyond the requirements of the matching conditions, a precise relation between the exterior metric and the interior solution, or in other words the gravitational field and the energy–momentum tensor of the source. I want to focus on the exterior solution to construct from it the global metric as well as the suitable matter contents of the source.

Starting from some particular interior solution for a relativistic source describing a compact stellar object, its exterior gravitational field is unique, and it is given by a solution of the Einstein’s vacuum field equations. If we restrict ourselves to the case of axially symmetric metrics then that solution belongs to the Weyl family [1]. The detailed analysis of this exterior metric provides a large amount of information about the source; this is the aim of many research papers devoted to describe the physics of point mass particles in the presence of the gravitational field. For example the study of the gyroscopic precession [2,3,4] allows to distinguish gravitational fields, as well as the study of circular orbits [5], gravitational radiation [6] or collapse processes [7]. Another fruitfull technique is based on the use of the Relativistic Multipole Moments (RMM) [8,9,10,11,12] to describe the gravitational field within their gravitational effects on the test particles.

On the contrary, and unlike the vacuum case, the Einstein’s fied equations on the inside of the source show a much richer scenario, in the following sense: if one starts with a known exterior metric and try to obtain a source, then a lot of possible solutions, not only for the interior metric but for different matter distributions, can be managed. The most common procedure to face this fact leading to obtain global models of self graviting compact objects, defines a working direction from the inside to the outside. It is to say, the process of solving starts in the interior field equations compatibles with different matter distributions and/or any symmetry considerations and culminates with the suitable exterior Weyl metric matching appropriately at the boundary of the object.

This dynamic of work was recently reversed in [13, 14] where authors calculate interior metrics successfully matching with either any of the Weyl family vacuum solutions or stationary axially solutions (in particular the Kerr solution). The relevance of this result becomes highlighted in view especially of the fact that the interior line element is constructed in terms of the exterior metric functions evaluated at the boundary, in such a way that both the metric and the energy–momentum tensor are related with the gravitational field. In addition, the RMM arise as physical parameters related with the source. This is the aim of the work in [15] where the RMM are defined as quantities calculated from volume integrals trying to generalize the Newtonian Multipole moments defined in Classical Gravity. Another interesting result is [16] where volume integral expressions are obtained to construct the RMM.

In [13] it was shown that, for some Weyl exterior solutions (specifically the Zipoy-Vorhees [17, 18] and the Monopole-Quadrupole solutions [19, 20]) the interior metric obtained with the minimum requirements of the matching restrictions derived from the procedure (i.e., by taking the functions \({\mathbb {F}}={\mathbb {G}}=0\), see [13] for details) lead to suitable configurations of the energy–momentum tensor \(T_{\mu \nu }\) with a good physical behaviour.

In the work that I am introducing now we are able to integrate the Einstein’s axially symmetric field equations providing the interior metric functions in terms of the matter content. The matching conditions along with the field equation themselves impose a set of restrictions on the energy–momentum tensor \(T_{\mu \nu }\). Therefore, each one of the exterior gravitational field delimits/ reduces/ constrains /restricts the suitable behaviours of the matter distribution (pressures, anisotropies and equation of state EoS). Global solutions to the gravitation of a compact object connect both the interior and the vacuum metric with the source, and the more relevant feature of this fact is, in my opinion, that it allows us to relate the exterior gravitational field with the energy–momentum tensor \(T_{\mu \nu }\) of the compact object.

It is not true that any \(T_{\mu \nu }\) is able to integrate the field equations providing a successful metric inside the source, but indeed a suitable matching with some exterior Weyl solution is even more difficult to obtain. The result that we are introducing now is the possibility of knowledge from the gravitational field about the physics of the source by means of the behaviour that the physical parameters of that object must satisfy to be considered the source of that field. This result provides more information about the source beyond the symmetries of the problem and it constrains the physics of the object that is generating such gravitational field. In particular the RMM structure of the source is connected with those quantities defined within the exterior metric [12]. A collateral conclusion of this procedure leads to get the set of the Weyl coefficients by means of volume integrals over the source, which allows us to construct the RMM in terms of the matter distribution.

To achieve the main goal of this work, we shall extensively use the general method to construct global static axially symmetric solutions to Einstein equations deployed in [13]. A very brief review of this method is presented in the next section, all the details may be found in that reference.Footnote 1 The aim of this paper is to integrate the field equations in order to obtain the interior metric functions in terms of the energy–momentum tensor of the source. Solutions for spherical as well as non-spherical sources are found, and they are related with the anisotropies of the sources. Compatible equations of state are determined.

2 The global static and axisymmetric metric in the Erez–Rosen coordinates

We shall write the global static and axisymmetric line element in the Erez–Rosen coordinates:

$$\begin{aligned} ds^2=-e^{2\sigma } dt^2+e^{2\nu } dr^2+e^{2 \eta } r^2 d\theta ^2+e^{2 \mu } r^2\sin ^2\theta d\varphi ^2,\nonumber \\ \end{aligned}$$
(1)

where the metric functions, which depend on r and \(\theta \), are defined as follows

$$\begin{aligned} e^{2\sigma }= & {} \left\{ \begin{array}{llll} &{} e^{2{{\hat{a}}}} Z^2 , \ r\le r_{\Sigma }, &{} \frac{e^{2{{\hat{g}}}-2{{\hat{a}}}}}{A} \\ &{} e^{2 \psi } , \ r\ge r_{\Sigma }, &{} \quad e^{-2\psi +2 {\hat{\gamma }}} \end{array} \right\} =e^{2\nu }\\ e^{2\eta }= & {} \left\{ \begin{array}{llll} &{} \frac{e^{2{{\hat{g}}}-2{{\hat{a}}}}}{A} , \ r\le r_{\Sigma },&{} \qquad e^{-2{{\hat{a}}}} \\ &{} e^{-2{\hat{\psi }}+2 {\hat{\gamma }}} \ r\ge r_{\Sigma }, &{} \qquad e^{-2{\hat{\psi }}} \end{array} \right\} =e^{2\mu } \end{aligned}$$

\(r=r_{\Sigma }\) being the boundary surface of the source for a constant value \(r_{\Sigma }\), M denotes the mass in the Schwarzchild space-time, \(\displaystyle {A\equiv 1-\frac{2Mr^2}{r_{\Sigma }^3}}\), \(Z=\frac{3}{2} \sqrt{A( r_{\Sigma })}-\frac{1}{2} \sqrt{A}\) and \(\psi \), \(\gamma \) are any metric functions of the Weyl family of vacuum solutions, \({\hat{\gamma }}\equiv \gamma -\gamma _s\), \({\hat{\psi }}\equiv \psi -\psi _s\), \(\gamma _s\), \(\psi _s\) being the metric functions corresponding to the Schwarzschild solution, and \({{\hat{a}}}\), \({{\hat{g}}}\) are suitable functions constructed in [13] in order to guarantee a good physical behaviour of the energy–momentum tensor and the matching (Darmois) conditions [21].

The interior metric function \({{\hat{a}}}=a-a_s\) is constructed in such a way that \(a(r_{\Sigma })=\psi (r_{\Sigma })\), \(a_s(r_{\Sigma })=\psi _s(r_{\Sigma })\), also \({{\hat{g}}}=g-g_s\) is such that \(g(r_{\Sigma })=\gamma (r_{\Sigma })\), \(g_s(r_{\Sigma })=\gamma _s(r_{\Sigma })\), together with the condition that the corresponding derivatives with respect to the radial variable of both \({{\hat{a}}}\) and \({{\hat{g}}}\) equal the derivatives of the exterior metric functions \(\psi \), \(\gamma \) at the boundary.

The general solution for the exterior metric function is given by the Weyl family in the Erez–Rosen representation [22,23,24]

$$\begin{aligned} \psi =\sum _{n=0}^{\infty }(-1)^{n+1} q_n Q_n\left( \frac{r}{M}-1\right) P_n(\cos \theta ), \end{aligned}$$
(2)

where \(P_n(\cos \theta )\) are Legendre Polynomials, \(Q_n(y)\) are Legendre functions of second kind and \(q_n\) a set of arbitrary constants. The relationship between the canonical Weyl coordinates \(\lbrace R, \omega \rbrace \), and the Erez–Rosen \(\lbrace r, y=\cos \theta \rbrace \) system is as follows

$$\begin{aligned} R= & {} \sqrt{(r-M)^2-M^2(1-y^2)},\nonumber \\ \omega= & {} y\frac{( r -M)}{R}. \end{aligned}$$
(3)

In addition, to guarantee a good behaviour of the physical variables at the center of the matter distribution we shall demand:

$$\begin{aligned} {{\hat{a}}}_0={{\hat{a}}}^{\prime }_0={{\hat{g}}}_0={{\hat{g}}}^{\prime }_0={{\hat{g}}}^{\prime \prime }_0=0, \end{aligned}$$
(4)

where prime denotes derivative with respect to r, and the subscript 0 indicates that the quantity is evaluated at the origin of coordinates. Then all the above conditions lead to the following expressions for the interior metric functions (the subscript \(\Sigma \) denotes that the function is evaluated at \(r=r_{\Sigma }\))

$$\begin{aligned} {{\hat{a}}}(r,\theta )= & {} {{\hat{\psi }}}_{\Sigma } s^2(3-2s) +r_{\Sigma }\hat{\psi }^{\prime }_{\Sigma }s^2(s-1)+{\mathbb {F}}(r,\theta ),\nonumber \\ {{\hat{g}}}(r,\theta )= & {} {{\hat{\gamma }}}_{\Sigma } s^3(4-3s) +r_{\Sigma }\hat{\gamma }^{\prime }_{\Sigma }s^3(s-1)+{\mathbb {G}}(r,\theta ). \end{aligned}$$
(5)

with \(s\equiv r/r_{\Sigma } \in \left[ 0,1\right] \) and \({\mathbb {F}},{\mathbb {G}}\) are arbitrary functions with the following behaviour at both extremes of the interval, i.e., at the center and the boundary:

$$\begin{aligned}&{\mathbb {F}}(s=0,1,\theta )={\mathbb {F}}^{\prime }(s=0,1,\theta )=0,\nonumber \\&{\mathbb {G}}(s=0,1,\theta )={\mathbb {G}}^{\prime }(s=0,1,\theta )=0, \quad {\mathbb {G}}^{\prime \prime }(0,\theta )=0. \end{aligned}$$
(6)

These metric functions, satisfy the junction conditions and generate physical variables which are regular within the fluid distribution. Furthermore the vanishing of \({{\hat{g}}}\) on the axis of symmetry, as required by the regularity conditions, necessary to ensure elementary flatness in the vicinity of the axis of symmetry, and in particular at the center, is assured by the fact that \(\hat{\gamma }_{\Sigma }\) and \({{\hat{\gamma }}}^{\prime }_{\Sigma }\) vanish on the axis of symmetry.

Even more, at this level of generality we can assure that the junction conditions imply the vanishing of the radial pressure \((P_{rr}\equiv g_{rr}T^1_1)_{\Sigma }=0\) at the boundary, and it can be shown that \(T_1^2\) vanishes on the boundary surface as well [13].

For the special case \({{\hat{a}}}={{\hat{g}}}=0\) we recover the spherical perfect fluid with isotropic pressures scenario:

$$\begin{aligned} ds^2_I= & {} -Z^2 dt^2+ \frac{1}{A( r)} d{ r}^2+{ r}^2 (d \theta ^2+\sin ^2\theta d\varphi ^2),\nonumber \\ ds^2_E= & {} -\left( 1-\frac{2M}{r}\right) dt^2+ \frac{1}{1-\frac{2M}{r}} d{ r}^2\nonumber \\&+{r}^2( d \theta ^2+\sin ^2\theta d\varphi ^2). \end{aligned}$$
(7)

Thus, the global line element (1) describes in the vacuum any solution of the Weyl family (\(\psi , \gamma \)) and a good behaved interior solution with an isotropic perfect fluid limit when the matching is performed with the Schwarzschild space–time. In [13] the case \({\mathbb {F}}={\mathbb {G}}=0\) was studied for some examples, in particular the resulting sources for the exterior field of the \(\hbox {MQ}^{1}\) [20] and Zipoy-Vorhees [17, 18, 25] solutions.

Now, the point is that, for any exterior gravitational field an infinite number of sources exist. Accordingly the obvious questions arises: how can we restrict the possible sources of a given exterior solution belonging to the Weyl family?, Can we use our knowledge of the exterior gravitational field to constrain the energy–momentum tensor \(T_{\mu \nu }\)?

In what follows we shall see how to answer to the above questions by integrating the field equations in order to obtain the interior metric functions in terms of the tensor \(T_{\mu \nu }\). It may be used to limit the possible sources for any Weyl solution. The resulting constraints may be interpreted in terms of specific restrictions on the equation of state of the source and its anisotropies. At the same time, once we set a physical configuration of the source compatible with the field equations, the geometry of the source is described in terms of that physics of the source and the exterior gravitational field.

3 The field equations

From the line element (1), the non-vanishing components of the energy momentum tensor are related with the interior metric functions as follows (see [13] for detailsFootnote 2):

$$\begin{aligned} -T^0_0= & {} \kappa \left( 8 \pi \mu +{{\hat{p}}}_{zz}-E\right) ,\nonumber \\ T^1_1= & {} \kappa \left( 8 \pi P-{{\hat{p}}}_{xx}\right) ,\nonumber \\ T^2_2= & {} \kappa \left( 8 \pi P+{{\hat{p}}}_{xx}\right) ,\nonumber \\ T^3_3= & {} \kappa \left( 8 \pi P-{{\hat{p}}}_{zz}\right) , \nonumber \\ T_1^2= & {} g^{\theta \theta }T_{12}=- \frac{\kappa }{r^2} \ {{\hat{p}}}_{xy} , \end{aligned}$$
(8)

where the following notation has been used \(\displaystyle {\kappa \equiv \frac{e^{2{{\hat{a}}}-2{{\hat{g}}}}}{8 \pi }}\), superscripts \((\dot{\ })\) and \((\ddot{\ })\) denote first and second derivatives respectively with respect to angular variable \(\theta \), and \(\Delta \) denotes the Laplacian operator with axial symmetry:

$$\begin{aligned} \displaystyle {\Delta {{\hat{a}}}= {{\hat{a}}}^{\prime \prime }+2\frac{{{\hat{a}}}^{\prime }}{r}+\frac{\ddot{{{\hat{a}}}}}{r^2}+\frac{\dot{{{\hat{a}}}}}{r^2}\frac{\cos \theta }{\sin \theta }} \end{aligned}$$
$$\begin{aligned} E= & {} -2 \Delta {{\hat{a}}}+(1-A)\left[ 2 \frac{{{\hat{a}}}^{\prime }}{r}\frac{9 \sqrt{A_{\Sigma }}-4 \sqrt{A}}{3 \sqrt{A_{\Sigma }}- \sqrt{A}}+2 {{\hat{a}}}^{\prime \prime }\right] ,\nonumber \\ {{\hat{p}}}_{xx}= & {} -\frac{\dot{{{\hat{a}}}}^2}{r^2}-\frac{{{\hat{g}}}^{\prime }}{r}+{{\hat{a}}}^{\prime 2}+\frac{\dot{{{\hat{g}}}}}{r^2}\frac{\cos \theta }{\sin \theta }\nonumber \\&+(1-A)\left[ 2 \frac{{{\hat{a}}}^{\prime }}{r}\frac{\sqrt{A}}{3 \sqrt{A_{\Sigma }}- \sqrt{A}}- {{\hat{a}}}^{\prime 2} +\frac{{{\hat{g}}}^{\prime }}{r}\frac{3 \sqrt{A_{\Sigma }}-2 \sqrt{A}}{3 \sqrt{A_{\Sigma }}-\sqrt{A}}\right] , \nonumber \\ {{\hat{p}}}_{zz}= & {} -\frac{\dot{{{\hat{a}}}}^2}{r^2}-\frac{{{\hat{g}}}^{\prime }}{r}-{{\hat{a}}}^{\prime 2}-\frac{\ddot{{{\hat{g}}}}}{r^2}-{{\hat{g}}}^{\prime \prime }\nonumber \\&+(1-A)\left[ -2 \frac{{{\hat{a}}}^{\prime }}{r}\frac{\sqrt{A}}{3 \sqrt{A_{\Sigma }}- \sqrt{A}}+ {{\hat{a}}}^{\prime 2} +2\frac{{{\hat{g}}}^{\prime }}{r}+{{\hat{g}}}^{\prime \prime }\right] , \nonumber \\ {{\hat{p}}}_{xy}= & {} 2 \dot{{{\hat{a}}}} {{\hat{a}}}^{\prime }-{{\hat{g}}}^{\prime }\frac{\cos \theta }{\sin \theta }-\frac{\dot{{{\hat{g}}}}}{r}+\frac{(1-A)}{r \sqrt{A} (3 \sqrt{A_{\Sigma }}- \sqrt{A})}(2 \dot{{{\hat{a}}}} -\dot{{{\hat{g}}}} ) \end{aligned}$$
(9)

In the general axially symmetric case there are three independent pressures, as can be deduced from the eigenvalues \(\lambda \) of the tensor \(T_{\mu \nu }\):

$$\begin{aligned} \lambda _0= & {} T^0_0=-\kappa \left( 8 \pi \mu +{{\hat{p}}}_{zz}-E\right) ,\nonumber \\ \lambda _3= & {} T^3_3=\kappa \left( 8 \pi P-{{\hat{p}}}_{zz}\right) , \nonumber \\ \lambda _{\pm }= & {} \frac{1}{2} \left[ T^1_1+T^2_2 \pm \sqrt{(T_1^1-T_2^2)^2+4T_1^2 T_2^1} \right] \nonumber \\= & {} \kappa \left( 8 \pi P\pm \sqrt{{{\hat{p}}}_{xx}^2+{{\hat{p}}}_{xy}^2\frac{A}{r^2}}\right) , \end{aligned}$$
(10)

where \(\lambda _0\) is related to the density and \(\lambda _3\), \(\lambda _{\pm }\) represent the three pressures. From above (10) and by taking into account that \(\lambda _{\pm }=\lambda _3+k\Pi _{\pm }\), with \(\Pi _{\pm }\equiv {{\hat{p}}}_{zz}\pm \sqrt{{{\hat{p}}}_{xx}^2+{{\hat{p}}}_{xy}^2\frac{A}{r^2}}\) then we can introduce the three independent anisotropies: \(\left( \kappa \Pi _{\pm },2 \sqrt{{{\hat{p}}}_{xx}^2+{{\hat{p}}}_{xy}^2\frac{A}{r^2}}\right) \). Nevertheless, it is preferable to redefine the anisotropies we will work with onwards by rewriting the field equations in terms of them as follows:

$$\begin{aligned} \Pi _{31} 8\pi \frac{P}{T_m}= & {} {{\hat{p}}}_{xx}-{{\hat{p}}}_{zz} \nonumber \\ \Pi _{23} 8\pi \frac{P}{T_m}= & {} {{\hat{p}}}_{xx}+{{\hat{p}}}_{zz} \nonumber \\ \Pi _{xy} 8\pi \frac{P}{T_m}= & {} -\frac{1}{r^2}{{\hat{p}}}_{xy}\nonumber \\ -T_0^0 8\pi \frac{P}{T_m}= & {} 8\pi \mu +{{\hat{p}}}_{zz}-E \end{aligned}$$
(11)

where the notation \(T_m\equiv \frac{T_1^1+T_2^2}{2}\) is used and \(\Pi _{ij}\equiv T_i^i-T_j^j\), \(\Pi _{xy}\equiv T_1^2\). The above four equations (11) together with the following relation obtained from the sum \(T_1^1+T_2^2\):

$$\begin{aligned} \frac{T_1^1+T_2^2}{2}\equiv T_m=8\pi \kappa P \end{aligned}$$
(12)

become into the new five field equations, equivalent to the set (8), which will be used from now onwards. The last one of the Eq. (11) provides the equation of state (EoS) and the other ones the three independent anisotropies \(\Pi _{31}, \Pi _{23},\Pi _{xy}\). Let us note that the anisotropy \(\Pi _{21}=T_2^2-T_1^1\) is not independent one since it is a linear combination of the two first equations (11). With respect to the sum of the other components of the tensor \(T_{\mu }^{\nu }\) we have \(T_1^1+T_3^3=2 T_m-\Pi _{23}\) and \(T_2^2+T_3^3=2 T_m+\Pi _{31}\).

When the particular spherical case is regarded then \({{\hat{a}}}={{\hat{a}}}(r), {{\hat{g}}}={{\hat{g}}}(r)\), and the following equation is obtained from (8)

$$\begin{aligned} 8 \pi r^2 T_1^2e^{2{{\hat{g}}}-2{{\hat{a}}}}={{\hat{g}}}^{\prime } \frac{\cos \theta }{\sin \theta } \rightarrow T_1^2=t(r)\frac{\cos \theta }{\sin \theta } \end{aligned}$$
(13)

where \({\displaystyle t(r)\equiv \frac{{{\hat{g}}}^{\prime }}{8\pi r^2}e^{2{{\hat{g}}}-2{{\hat{a}}}}}\). Therefore, we must take \(t(r)=0\) if we want to avoid infinite pressures at the symmetry axis (\(\theta =0\)), or in other words we must consider a vanishing component \(T_1^2\) of the energy–momentum tensor. Hence, the spherical case implies \({{\hat{g}}}^{\prime }=0\), which together with the matching conditions (6) is equivalent to \({{\hat{g}}}=0\). In addition, for this case we have that \({{\hat{p}}}_{xx}=-{{\hat{p}}}_{zz}\) and then \(T_2^2=T_3^3\), which means that only two independent pressures exist in this case namely \(T_1^1\) and \(T_2^2\). Those pressures are used to be denoted in literature as \(p_r\) (radial pressure) and \(p_{\bot }\) ( tangential pressure) whenever the spherical gauge is used for the coordinates (those coordinates preserve the angular part of the metric in the form \( r^2 d\theta ^2+r^2\sin ^2\theta d\phi ^2\)). In such system of coordinates we have that \(T_1^2=0\), \(T_1^1=8\pi p_r\) y \(T_2^2=T_3^3=8\pi p_{\bot }\).

In conclusion, no matter the system of coordinates we were using, the spherical case leads to a unique independent anisotropy \(p_r-p_{\bot }\), which corresponds to \(\Pi _{31}\) in our notation (since \(\Pi _{31}=\Pi _{21}\) and \(\Pi _{23}=0\)) with the following field equation:

$$\begin{aligned} \Pi _{31}8\pi \frac{P}{T_m}=2 {{\hat{p}}}_{xx}. \end{aligned}$$
(14)

4 The solutions for the metric functions

We proceed now to integrate the Eqs. (11, 12). Let us note that the Eq. (12) allows us to establish a relation between both interior metric functions as follows:

$$\begin{aligned} {{\hat{g}}}={{\hat{a}}}-\frac{1}{2} \ln \left( \frac{T_m}{P}\right) \end{aligned}$$
(15)

4.1 Isotropic and anisotropic spherical sources

All the spherical sources only match with the Schwarzschild exterior metric. Since \({{\hat{a}}}={{\hat{a}}}(r)\), and we have constructed the metric functions as follows (5)

$$\begin{aligned} {{\hat{a}}}=a_{E}\left( {{\hat{\psi }}}_{\Sigma }(\theta ),\hat{\psi }_{\Sigma }^{\prime }(\theta );r\right) +{\mathbb {F}}, \ {{\hat{g}}}=g_{E}\left( {{\hat{\gamma }}}_{\Sigma }(\theta ),\hat{\gamma }_{\Sigma }^{\prime }(\theta );r\right) +{\mathbb {G}}\nonumber \\ \end{aligned}$$
(16)

then, \(a_E=g_E=0\) and \({{\hat{a}}}={\mathbb {F}}(r)\). Since both \(T_1^2\) and \({{\hat{g}}}\) vanish as we have explained before, the remaining field equations (1112) are obtained from (15) and (14) as follows:

$$\begin{aligned}&{\mathbb {F}}={{\hat{a}}}=\frac{1}{2} \ln \left( \frac{T_m}{P}\right) \end{aligned}$$
(17)
$$\begin{aligned}&\Pi _{31}8\pi \frac{P}{T_m}=2 {{\hat{p}}}_{xx}=2{{\hat{a}}}^{\prime }\left( A {{\hat{a}}}^{\prime }+\frac{2(1-A)}{r} \frac{\sqrt{A}}{3\sqrt{A_{\Sigma }}-\sqrt{A}}\right) .\nonumber \\ \end{aligned}$$
(18)

and along with the last equation of (11) (EoS) that we shall analyze in the next section.

On the one hand, the isotropic perfect fluid case requires \({{\hat{p}}}_{xx}=-{{\hat{p}}}_{zz}=0\) leading to \(T_1^1=T_2^2=T_3^3\). The only possible solution satisfying at the same time the junction conditions, is \({{\hat{a}}}={\mathbb {F}}=0\), and therefore we get from (18) the vanishing of the anisotropy \(\Pi _{31}=0\). Hence, the isotropic perfect fluid limit stands for \(T_m=P\).

On the other hand, the anisotropic case establishes the following relation between pressures P, \(T_m\) and the anisotropy \(\Pi _{31}\) (18):

$$\begin{aligned} \Pi _{31}=A\frac{T_m}{P}\left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) \left[ \frac{1}{4} \left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) -\frac{P^{\prime }}{\mu +P} \right] \nonumber \\ \end{aligned}$$
(19)

4.2 Non-spherical sources

From the previous first three field equations (11) we obtain, by taking into account the Eq. (15), the following set of non-linear partial differential equations involving the metric function \({{\hat{a}}}\):

$$\begin{aligned}&{{\hat{a}}}^{\prime 2}+{{\hat{a}}}^{\prime } \left( \frac{1-A}{2Ar}\frac{4\sqrt{A}-3\sqrt{A_{\Sigma }}}{2Z}\right) +\frac{1}{2} {{\hat{a}}}^{\prime \prime }\nonumber \\&\quad +\frac{1}{2Ar^2}\left( \frac{\cos \theta }{\sin \theta }\dot{{{\hat{a}}}}+\ddot{{{\hat{a}}}}\right) +d(r,\theta )=0 \nonumber \\&\dot{{{\hat{a}}}}^2+{{\hat{a}}}^{\prime } \left( rA+\frac{r(1-A)}{2}\frac{2\sqrt{A}-3\sqrt{A_{\Sigma }}}{2Z}\right) +\frac{Ar^2}{2} {{\hat{a}}}^{\prime \prime }\nonumber \\&\qquad +\frac{1}{2}\left( -\frac{\cos \theta }{\sin \theta }\dot{{{\hat{a}}}}+\ddot{{{\hat{a}}}}\right) +{{\hat{d}}}(r,\theta )=0 \nonumber \\&{{\hat{a}}}^{\prime }\dot{{{\hat{a}}}}+\dot{{{\hat{a}}}}\left( \frac{1-3\sqrt{A A_{\Sigma }}}{4rZ\sqrt{A}}\right) -\frac{\cos \theta }{2\sin \theta }{{\hat{a}}}^{\prime }=\alpha (r,\theta ) \end{aligned}$$
(20)

where the following notation has been used

$$\begin{aligned} d(r,\theta )= & {} -\frac{4\pi }{A} \Pi _{31} \frac{P}{T_m}+\frac{3\sqrt{A_{\Sigma }}(1-A)}{8ArZ}\left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) \nonumber \\&+\frac{\xi }{2Ar^2} \frac{\partial _{\theta }T_m}{T_m} \nonumber \\&-\frac{1}{4} \left[ \frac{T_m^{\prime \prime }}{T_m}-\frac{P^{\prime \prime }}{P}-\frac{T_m^{\prime 2}}{T_m^2}+\frac{P^{\prime 2}}{P^2}\right] \nonumber \\&-\frac{1}{4 Ar^2} \left[ \frac{\ddot{T_m}}{T_m}-\frac{\dot{T_m}^2}{T_m^2}\right] \nonumber \\ {\hat{d}}(r,\theta )= & {} 4\pi r^2 \Pi _{23} \frac{P}{T_m}+r\frac{-4AZ+(1-A)(3\sqrt{A_{\Sigma }}-2\sqrt{A})}{4Z}\nonumber \\&\quad \times \left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) + \nonumber \\&-\frac{\xi }{2} \frac{\partial _{\theta }T_m}{T_m}-\frac{Ar^2}{4} \left[ \frac{T_m^{\prime \prime }}{T_m}-\frac{P^{\prime \prime }}{P}-\frac{T_m^{\prime 2}}{T_m^2}+\frac{P^{\prime 2}}{P^2}\right] \nonumber \\&-\frac{1}{4} \left[ \frac{\ddot{T_m}}{T_m}-\frac{\dot{T_m}^2}{T_m^2}\right] \nonumber \\ \alpha (r,\theta )= & {} -8\pi r^2\Pi _{xy} \frac{P}{T_m}+\frac{1}{2} \xi \left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) \nonumber \\&-\frac{1-2A-3\sqrt{A_{\Sigma }A}}{8r\sqrt{A}Z}\frac{\partial _{\theta }T_m}{T_m} \end{aligned}$$
(21)

Now we take the first of the Eq. (20) multiplied by a factor \(Ar^2\) and subtract the second of those equations, and then an equivalent system of equations can be obtained as follows:

$$\begin{aligned}&{h^{\prime }}^2+h^{\prime } \left( \frac{(1-A)\sqrt{A}-2Z(1-3A)}{4ZrA}\right) +\frac{1}{2} h^{\prime \prime }\nonumber \\&\quad +\frac{1}{2Ar^2}\left( \frac{\cos \theta }{\sin \theta }{\dot{h}}+\ddot{h}\right) +\beta =-d(r,\theta ) \end{aligned}$$
(22)
$$\begin{aligned}&A r^2 {h^{\prime }}^2-{\dot{h}}^2=\Lambda \nonumber \\&\quad {\dot{h}} h^{\prime }=\Omega \end{aligned}$$
(23)

with the notation

$$\begin{aligned} \Lambda= & {} \delta -\xi ^2+Ar^2x^2 \nonumber \\ \Omega= & {} \alpha +x \xi \nonumber \\ \delta= & {} 4\pi r^2(\Pi _{31}+\Pi _{23}) \frac{P}{T_m}-\frac{r \sqrt{A}(1-2A+3\sqrt{A_{\Sigma }A})}{4Z}\nonumber \\&\times \,\left( \frac{T_m^{\prime }}{T_m}- \frac{P^{\prime }}{P}\right) -\xi \frac{\partial _{\theta }T_m}{T_m} \nonumber \\ \beta= & {} -\frac{(1-A)^2+(2-A)(2Z)^2}{4r^2A(2Z)^2} \end{aligned}$$
(24)

and the partial derivatives of the metric function \({{\hat{a}}}\) have been redefined by means of introducing a new function h as follows:

$$\begin{aligned} h^{\prime }= & {} {{\hat{a}}}^{\prime }+x(r), \qquad x(r)\equiv \frac{1-3\sqrt{A A_{\Sigma }}}{4rZ\sqrt{A}} \nonumber \\ {\dot{h}}= & {} \dot{{{\hat{a}}}}+\xi (\theta ) , \qquad \xi (\theta )\equiv -\frac{1}{2} \frac{\cos \theta }{\sin \theta } \end{aligned}$$
(25)

This fact is possible because \(x=x(r)\) and \(\xi =\xi (\theta )\), and hence the integrability condition for both \({{\hat{a}}}\) and h remains unchanged.

(A) One way to obtain a solution of the system of equation (23) consists on extracting the partial derivative \(\dot{h}\) from the second equation and putting it into the first one, leading to the following bicuadratic equation for the partial derivative \(h^{\prime }\) as follows:

$$\begin{aligned} Ar^2{h^{\prime }}^4-\Lambda {h^{\prime }}^2-\Omega ^2=0 \end{aligned}$$
(26)

whose four admissible solutions are

$$\begin{aligned} h^{\prime }= \frac{\pm 1}{r \sqrt{2A}}\sqrt{\Lambda \pm \sqrt{\Lambda ^2+4Ar^2\Omega ^2}} \end{aligned}$$
(27)

From all this set of solutions only one of them is suitable for our purposes since the sign inside the root in (27) must be taken positive to preserve a real solution because \(\Lambda ^2+4Ar^2\Omega ^2>\Lambda ^2\) (\(A>0\)). And with respect to the global sign in (27) it must be taken negative to satisfy the boundary conditions as we shall see in the Appendix. Also the integrability condition for the function h shall be discussed therein, once the system of equation (23) becomes the following system:

$$\begin{aligned} h^{\prime }= & {} H \nonumber \\ {\dot{h}}= & {} \frac{\Omega }{H} \end{aligned}$$
(28)

where H is the real and compatible solution of the bicuadratic equation (27) considered as follows

$$\begin{aligned} H\equiv \frac{-1}{r \sqrt{2A}}\sqrt{\Lambda + \sqrt{\Lambda ^2+4Ar^2\Omega ^2}} \end{aligned}$$
(29)

(B) Another way of writing the solution of the system of equation (23) comes from the complex equation obtained by adding the first equation of that system to the second one multiplied by the complex factor \(i\ 2r\sqrt{A}\):

$$\begin{aligned} r\sqrt{A} h^{\prime }+i{\dot{h}} =\sqrt{\Lambda +2 i r\sqrt{A} \Omega }, \end{aligned}$$
(30)

in such a way that the real and imaginary parts of the two complex roots of the right-hand side of Eq. (30) can be identified with the partial derivatives \(r\sqrt{A} h^{\prime }\) and \({\dot{h}}\) respectively, i.e.,

$$\begin{aligned} h^{\prime }= & {} \pm \frac{S^{1/4}}{r\sqrt{A}}\cos (\phi ) \nonumber \\ {\dot{h}}= & {} \pm S^{1/4}\sin (\phi ) \end{aligned}$$
(31)

where \({\displaystyle S\equiv \Lambda ^2+4Ar^2\Omega ^2}\), and \({\displaystyle \phi \equiv \frac{1}{2} \arctan (u) }\) with \({\displaystyle u\equiv \frac{2r\sqrt{A}\Omega }{\Lambda }}\). These expressions in (31) exactly recover the Eq. (28) if the following trigonometric relations are considered

$$\begin{aligned}&\cos (u/2)=\frac{1}{\sqrt{2}}\sqrt{1+\frac{1}{\sqrt{1+\tan ^2(u)}}}, \end{aligned}$$
(32)
$$\begin{aligned}&\sin (u/2)=\frac{1}{\sqrt{2}}\sqrt{1-\frac{1}{\sqrt{1+\tan ^2(u)}}} \end{aligned}$$
(33)

With respect to the Eq. (22) it becomes a partial differential equation for the functions \(\Lambda \) and \(\Omega \) once we put into it the solution (29). Nevertheless, the resolution of that equation together with the integrability condition of (28) is an extremely difficult task to do. For convenience, we can consider both the Eq. (22) and the integrability condition equation (96) as partial differential equations for two independent functions, namely \(\Sigma _{\pm } \equiv \sqrt{\pm \Lambda +\sqrt{S}}\) instead of \(\Lambda \) and \(\Omega \), as follows:

$$\begin{aligned}&{\dot{\Sigma }}_{+}=r\sqrt{A}\Sigma _{-}^{\prime } \end{aligned}$$
(34)
$$\begin{aligned}&-2\sqrt{2}A r^2 {\hat{\beta }}-\left[ \sqrt{2}\Sigma _{+}^2+\Sigma _{+}\left( \frac{-1+2A-3\sqrt{A A_{\Sigma }}}{2Z} \right) -r\sqrt{A}\Sigma _{+}^{\prime }\right] \nonumber \\&\quad =2 \xi \ \Sigma _{-}-{\dot{\Sigma }}_{-} \end{aligned}$$
(35)

where \({\hat{\beta }}\equiv \beta +d(r,\theta )\). Once a solution for \(\Sigma _{\pm }\) has been obtained, then \(\Lambda \) and \(\Omega \) are calculated in terms of it. Let us use \(\sqrt{v_{\pm }}\) to denote particular solutions for \(\Sigma _{\pm }\) respectively, and therefore \(v_{+}+v_{-}=2\sqrt{S}\) and \(v_{+}-v_{-}=2\Lambda \). Consequently,

$$\begin{aligned} \Lambda= & {} \frac{1}{2} (v_{+}-v_{-}) \nonumber \\ \Omega= & {} \frac{\sqrt{v_{+}v_{-}}}{2r\sqrt{A}} \end{aligned}$$
(36)

We proceed to solve the pair of above Eqs. (34) and (35) by means of the achievement of \(\Sigma _{-}\) in terms of the other function \(\Sigma _{+}\). The consistency of that system of equations (34) and (35) holds iff the following condition is satisfied by \(\Sigma _{+}\):

$$\begin{aligned} -\ddot{\Sigma }_{+}+2 \xi {\dot{\Sigma }}_{+}=r\sqrt{A} \partial _r \Gamma \end{aligned}$$
(37)

with the notation

$$\begin{aligned} \varGamma\equiv & {} -2\sqrt{2}A r^2 {\hat{\beta }}-\Bigg [\sqrt{2}\Sigma _{+}^2+\Sigma _{+}\left( \frac{-1+2A-3\sqrt{A A_{\Sigma }}}{2Z} \right) \nonumber \\&-r\sqrt{A}\Sigma _{+}^{\prime }\Bigg ] \end{aligned}$$

Therefore we need to solve the Eq. (37) for \(\Sigma _{+}\) with the appropriated boundary conditions (82), (85), and afterwards the function \(\Sigma _{-}\) is obtained as the general solution of the system of equations (34) and (35) as follows

$$\begin{aligned} \Sigma _{-}=\int \frac{{\dot{\Sigma }}_{+}}{r \sqrt{A}} \ dr \end{aligned}$$
(38)

In the section VI we shall show a suitable solution for the function \(\Sigma _{+}\) and we obtain from the above general equations a sample model for the interior metric functions, anisotropies and pressure compatible with the exterior gravitational field.

Finally, once both the integrability condition \( \partial _{\theta }(h^{\prime })=\partial _r({\dot{h}})\) and the Eq. (22) have been impossed on the function H, then the metric function \({\mathbb {F}}\) is integrated as follows

$$\begin{aligned} {\mathbb {F}}= & {} \int {\mathbb {F}}^{\prime } \ dr =-a_E+\int (-x+h^{\prime }) \ dr\nonumber \\= & {} -a_E+\frac{1}{2}\ln \left( \frac{r}{2Z}\right) +\int H \ dr \end{aligned}$$
(39)

since \({\mathbb {F}}^{\prime }= -a_{E}^{\prime }-x+h^{\prime }\). The explicite equation (96) derived from the integrability condition is obtained in the Appendix.

5 Constraints and equations of state

5.1 The spherical case

In this particular case, we are only constrained by the boundary conditions regarding the metric function \({\mathbb {F}}\) (6), which implies that (see Eq. (17)) the pressure \(T_m\) behaves just like P at the extremes of the interval \([0,r_{\Sigma }]\), i.e.,

$$\begin{aligned} T_m(s=0)=P(s=0)= & {} \mu \left( \frac{1-\sqrt{A_{\Sigma }}}{3\sqrt{A_{\Sigma }}-1}\right) \nonumber \\ T_m(s=1)=P(s=1)= & {} 0 \end{aligned}$$
(40)

The same conclusion is derived for the respective derivatives because the derivative of Eq. (17) and the previous conclusion (40) lead to

$$\begin{aligned} T_m^{\prime }(s=0)= & {} P^{\prime }(s=0)=0 \nonumber \\ T_m^{\prime }(s=1)= & {} P^{\prime }(s=1)=-\frac{M \mu }{r_{\Sigma }(r_{\Sigma }-2 M)} \end{aligned}$$
(41)

The equation of state (EoS) for this case can be obtained by putting the solution (17) and \({{\hat{g}}}=0\) into the fourth equation (11), in such a way that

$$\begin{aligned} -T_0^0 8\pi =\frac{T_m}{P}\left[ 8\pi \mu -{{\hat{a}}}^{\prime }\left( \frac{2}{r}(1-3A)+A{{\hat{a}}}^{\prime }\right) +2A{{\hat{a}}}^{\prime \prime }\right] \end{aligned}$$
(42)

and hence the EoS proves to be

(43)

Let us note that the EoS of the isotropic case, \(\rho =\mu \), is recovered if we take \(T_m=P\) not only at the extremes but everywhere in \([0,r_{\Sigma }]\).

5.2 The non-spherical case

In the general axially symmetric case we have to take into account the boundary conditions for both \({\mathbb {F}}\) and \({\mathbb {G}}\), and the requirements of the integrability condition in (28) or (31). Let us address the details of the analysis to the Appendix, since we obtain a great amount of information about that, and we summarize here the results obtained therein:

The pressure \(T_m\) compatible with the solution obtained for the metric functions has to verify the following behaviour at the boundary \(r_{\Sigma }\) (see Eqs. (77)–(79) in Appendix):

$$\begin{aligned} T_m(s=1)= & {} P(s=1)=0 \end{aligned}$$
(44)
$$\begin{aligned} T_m^{\prime }(s=1)= & {} -\frac{M\mu }{r_{\Sigma }(r_{\Sigma }-2M)} e^{2\hat{\Psi }_{\Sigma }-2{{\hat{\gamma }}}_{\Sigma }} \end{aligned}$$
(45)
$$\begin{aligned} T_m^{\prime \prime }(s=1)= & {} -\frac{M\mu e^{2\hat{\Psi }_{\Sigma }-2{{\hat{\gamma }}}_{\Sigma }}}{r_{\Sigma }(r_{\Sigma }-2M)} \left[ \frac{1}{r_{\Sigma }}+4\left( {{\hat{\Psi }}}^{\prime }_{\Sigma }-\hat{\gamma }^{\prime }_{\Sigma } \right) \right] . \end{aligned}$$
(46)
$$\begin{aligned} \dot{T}_m(s=1)= & {} 0 ,\qquad \frac{\dot{T}_m}{T_m}(s=1)=2\dot{\hat{\psi }}_{\Sigma }-2\dot{{{\hat{\gamma }}}}_{\Sigma } \end{aligned}$$
(47)
$$\begin{aligned} \dot{T}_m^{\prime }(s=1)= & {} -(2\dot{{{\hat{\psi }}}}_{\Sigma }-2\dot{\hat{\gamma }}_{\Sigma })\frac{M\mu }{r_{\Sigma }(r_{\Sigma }-2M)} e^{2\hat{\Psi }_{\Sigma }-2{{\hat{\gamma }}}_{\Sigma }}\nonumber \\ \end{aligned}$$
(48)

As can be seen these relevant expressions allow us to relate the derivatives of the pressure \(T_m\) (at the surface of the compact object) with the exterior gravitational field. Besides, those expressions show the different behavior arising for the energy–momentum tensor when non-spherical symmetry is considered from outside, i.e., only if we consider Schwarzschild metric as the exterior gravitational field then we can see from (45) and (46) that pressure \(T_m\) behaves in the same way as P in the boundary and we recover the expressions of the spherical case (41).

With respect to the behaviour of \({\mathbb {F}}\) and \({\mathbb {G}}\) at the origin, it was required in [13] to obtain components of the energy–momentum tensor without divergencies at the center of the compact object. But in this work we are calculating the metric functions in terms of those components of the tensor and hence the conditions on the origin can be disregarded. Nevertheless, at the Appendix we have applied these conditions to the functions \({\mathbb {F}}\) and \({\mathbb {G}}\) leading to the following results (from Eq. (77)):

$$\begin{aligned}&T_m(s=0)=P(s=0)=\mu \frac{1-\sqrt{A_{\Sigma }}}{3\sqrt{A_{\Sigma }}-1} , \end{aligned}$$
(49)
$$\begin{aligned}&T^{\prime }_m(s=0)=P^{\prime }(s=0)=0 \end{aligned}$$
(50)
$$\begin{aligned}&\partial _{\theta }T_m(s=0)=O(r^2)=0, \end{aligned}$$
(51)
$$\begin{aligned}&\left[ \partial _r^2\left( \frac{\partial _{\theta }T_m}{T_m} \right) \right] _0= \frac{4\pi }{\xi }(\Pi _{31}+\Pi _{23})|_0 \ \frac{3\sqrt{A_{\Sigma }}-1}{3\sqrt{A_{\Sigma }}} \end{aligned}$$
(52)

Some comments must be outlined about these results. Firstly, by contrast with the behaviour at the boundary, the pressure \(T_m\) at the origin does not depend on the exterior gravitational field. Whatever the exterior metric has been matched with the source, \(T_m\) behaves appropriately at the origin in either non-spherical case or in the spherical scenario, and the unique difference between both scenarios arises at the derivative \(\partial _{\theta }T_m\) (52). Equations (51) and (52) hold that the angular derivative of the pressure \(T_m\) evaluated at the origin is an infinitesimal of second order and the coefficient of that order is related with the value at the origin of the anistropies \(\Pi _{31}+\Pi _{23}\), i.e.,

$$\begin{aligned} {\dot{T}_m}^{\prime \prime }(s=0)=\frac{4\pi \mu }{ \xi } \ \frac{1-\sqrt{A_{\Sigma }}}{3\sqrt{A_{\Sigma }}} (\Pi _{31}+\Pi _{23})|_0 \end{aligned}$$
(53)

Secondly, let us note that the above Eqs. (49), (50) and (51) do not imply any restriction on the anisotropies since the functions \(\Lambda \) and \(\Omega \) evaluated on both extremes of the interval \([0,r_{\Sigma }]\) do not involve them as can be seen from the equations (24), (21). Hence, on despite of the above conclusion (53), the anisotropies are free to verify the equation derived from the integrability condition of (28) which is evaluated at the Appendix leading to the equivalent equations (93), (95), (96). These equations can not be solved in the general case, but a solution of them is always possible since the functions \(\Lambda \) and \(\Omega \) depend arbitrarily on three independent functions \(\Pi _{31}\), \(\Pi _{23}\), \(\Pi _{xy}\). Hence, the integrability condition and the Eq. (22) establish a relation between the anisotropies and the pressure \(T_m\). In the following section we shall illustrate these results with a simple model by means of a particular solution of the whole system of equations (22), (23).

In addition, we obtain an equation that allows us to calculate the Weyl coefficients (in the Erez–Rosen representation) \(q_n\) of the exterior gravitational field (2) as an integral over the source. Since the RMM (Relativistic Multipole Moments) are contracted as certain combinations of those Weyl coefficients, this result seems to be suitable in order to establish a relation between the RMM and the source. Another authors have been working in this issue (see [16] and references therein, [15]). We can integrate the Eq. (86) in the angular variable as we show now and use the known expression (2) for the metric function \(\psi \) in Erez–Rosen coordinates (assuming equatorial symmetry) to obtain

$$\begin{aligned} \int _{-1}^{1} {{\hat{\psi }}}_{\Sigma }P_{2k}(y) dy= & {} \int _0^{r_{\Sigma }}dr\int _{-1}^{1}dy (-x+h^{\prime })P_{2k}(y)\nonumber \\= & {} -\sum _{n=1}^{\infty } q_{2n} Q_{2n}|_{\Sigma } \frac{2 \delta _{2k,2n}}{4n+1} \end{aligned}$$
(54)

where the orthogonality condition of the Legendre polynomials \(P_{2n}(y)\) has been used and \(Q_{2n}|_{\Sigma }\equiv Q_{2n}(r_{\Sigma }/M-1)\) denote the Legendre functions of second kind evaluated at the boundary. Taking into account that x does not depend on the angular variable and hence its angular integration vanishes we have for \(k>0\) that

$$\begin{aligned} -q_{2k} Q_{2k}\left( \frac{r_{\Sigma }}{M}-1\right) \frac{2}{4k+1}=\int _0^{r_{\Sigma }}dr\int _{-1}^{1}dy \ P_{2k}(y) H \nonumber \\ \end{aligned}$$
(55)

Henceforth we can evaluate the Weyl coefficients as integrals over the source. Since we know the explicit expressions of the RRM in terms of those coefficients [26] we are able to obtain integral expressions extended over the source leading to connect those quantities with the interior extructure of the source. For example the quadrupole moment Q of any axially symmetric solution with equatorial symmetry is known [19, 26] to be \({\displaystyle Q=\frac{1}{3}a_0^3-a_2}\), \(a_i\) being the Weyl coefficients in Weyl coordinates or equivalently \({\displaystyle Q=\frac{2}{15} q_2}\), \(q_i\) being the coefficient of the Erez–Rosen family [22,23,24, 26] of axially symmetric solutions, since the relation between both sets of parameters is known [26]: \({\displaystyle a_0=-M, a_2= -M^3\left( \frac{1}{3} q_0+\frac{2}{15} q_2\right) }\) (where \(q_0\) is taken to be equal to one for solutions of the Erez–Rosen family with spherical limit of Schwarzschild). Therefore, from (55) the relativistic quadrupole moment can be obtained by the following integral equation

$$\begin{aligned} Q=-\frac{1}{3 Q_2 |_{\Sigma }} \int _0^{r_{\Sigma }}dr\int _{-1}^{1}dy \ P_{2}(y) H \end{aligned}$$
(56)

with \({\displaystyle Q_2 |_{\Sigma }=\frac{3(r_{\Sigma }-M)^2-M^2}{4M^2} \ln (A_{\Sigma })-\frac{3}{2}\frac{r_{\Sigma }-M}{M} }\).

Let us note the relevance of this integral equation since it shows the contribution of the internal structure of the source, in particular the anisotropies and the pressure \(T_m\) (involved in H) to conform the quadrupole moment of the solution.

Finally, we address the issue of the EoS for these global models. From the last equation of (11) and by using the relation between the metric functions (15) we conclude that

(57)

where the following notation is used

$$\begin{aligned} \alpha\equiv & {} \frac{1}{2r^2}\left[ \frac{{\ddot{T}}_m}{T_m}-\frac{\dot{T}_m^2}{T_m^2}\right] -\frac{1-2A}{2r}\left[ \frac{T_m^{\prime }}{T_m}-\frac{P^{\prime }}{P}\right] \nonumber \\&+\frac{A}{2} \left[ \frac{T_m^{\prime \prime }}{T_m}-\frac{P^{\prime \prime }}{P}-\frac{T_m^{\prime 2}}{T_m^2}+\frac{P^{\prime 2}}{P^2}\right] \end{aligned}$$
(58)

and the derivatives of the metric function \({{\hat{a}}}\) are given by the expressions in (25), i.e., \( {\displaystyle {{\hat{a}}}^{\prime }=-x(r)+h^{\prime }=-x-\frac{\Sigma _+}{r\sqrt{2A}}}\), \({\displaystyle \dot{{{\hat{a}}}}=-\xi (\theta )-\frac{\Sigma _{-}}{\sqrt{2}}} \). After an easy but cumbersome calculation, the EoS relating the density \(\rho \) of the source with the pressure \(T_m\) and anisotropies can be expressed as follows:

$$\begin{aligned} \rho =\frac{T_m}{8\pi P} \left[ 8 \pi \mu + \alpha -2 A d(r,\theta )-2\frac{\Sigma _{+}^2}{r^2}+4 A x^2 \right] \end{aligned}$$
(59)

6 Sample models

As an example to illustrate the procedure, we provide in this section specific expressions for the metric functions as well as anisotropies of the source describing suitable models.

Firstly we need to solve the equation for the function \(\Sigma _+\) along with its corresponding boundary conditions. The boundary conditions established for \({\mathbb {F}}\) and \({\mathbb {G}}\) (see Eqs. (82), (85)) lead to the following behaviour for the function \(\Sigma _{+}\):

$$\begin{aligned} \lim _{r \rightarrow 0} \Sigma _{+}=\frac{1}{\sqrt{2}}, \quad \lim _{r \rightarrow 0} \Sigma _{+}^{\prime }=0, \quad \lim _{r \rightarrow r_{\Sigma }} \Sigma _{+}=\sqrt{L} \end{aligned}$$
(60)

A suitable analytical solution for the function \(\Sigma _{+}\) can be obtained by means of the following expression

$$\begin{aligned} \Sigma _{+}=\frac{r\sqrt{A}}{2\sqrt{2}}J(r)-\frac{W}{2\sqrt{2}} \end{aligned}$$
(61)

where \(W(r,y\equiv \cos \theta )\) is a solution of the following equation derived from (37)

$$\begin{aligned} \partial _y\left[ (1-y^2)W_y\right] =r\sqrt{A}\partial _r\left[ \beta ^{+} -\frac{W^2}{2}-r^2A \partial _r\left( \frac{W}{r\sqrt{A}} \right) \right] \nonumber \\ \end{aligned}$$
(62)

with the corresponding boundary conditions derived from (60):

$$\begin{aligned} \lim _{r \rightarrow 0} W=\lim _{r \rightarrow 0} W_r=0, \quad \lim _{r \rightarrow r_{\Sigma }}W=\frac{1-A_{\Sigma }}{2\sqrt{A_{\Sigma }}}+4\sqrt{A_{\Sigma }}r_{\Sigma }{\hat{\psi }}^{\prime }_{\Sigma },\nonumber \\ \end{aligned}$$
(63)

and

$$\begin{aligned} \beta ^{+}\equiv -8Ar^2{{\hat{\beta }}}+(A-1)\left[ \frac{3}{2} (A+1)-\frac{(A-1)}{(2Z)^2}-\frac{3\sqrt{A}}{2Z} \right] \nonumber \\ \end{aligned}$$
(64)

An appropriate solution for W can always be obtained since the function \(\beta ^{+}\) contains the anisotropy \(\Pi _{31}\) (see Eq. (21)) which is a function free of constraints. Therefore, we propose a suitable function W verifying the boundary conditions (63) as well as the required for satisfying (86) when the integration (39) were performed, and then the necessary anistropy \(\Pi _{31}\) is obtained from (62). Let us proceed now to calculate the required function W from the explicite integration of equation (39) with the function (61), which leads to

$$\begin{aligned} {\mathbb {F}}=-a_E+\int (-x+h^{\prime }) \ dr=-a_E+V(r)+\frac{1}{4}\int \frac{W}{r\sqrt{A}} \ dr \nonumber \\ \end{aligned}$$
(65)

with

$$\begin{aligned} V(r)=-\frac{3}{4} \ln (2Z)+\frac{r}{4} -\sqrt{\frac{\tau }{2}}\frac{r_{\Sigma }}{8}\ln \left( \frac{r_{\Sigma }+\sqrt{2/\tau } \ r}{r_{\Sigma }-\sqrt{2/\tau } \ r}\right) , \nonumber \\ \end{aligned}$$
(66)

\(\tau \equiv r_{\Sigma }/M\) being the compression parameter of the source, which is restricted to be \(\tau >8/3\) by the strong energy condition \(P<\mu \) (see [13] for details), and hence, in addition to the boundary conditions (63), W must be a function satisfying

$$\begin{aligned} \lim _{r \rightarrow 0} \int \frac{W}{r\sqrt{A}} =-4 V_0, \quad \lim _{r \rightarrow r_{\Sigma }} \int \frac{W}{r\sqrt{A}}=4(\hat{\psi }_{\Sigma }-V_{\Sigma }) \nonumber \\ \end{aligned}$$
(67)

where \(V_0\equiv V(r=0)\) and \(V_{\Sigma }\equiv V(r=r_{\Sigma })\).

The conditions (63), (67) require that the function W be as follows:

$$\begin{aligned} W= & {} r\sqrt{A} \left[ 4 \nu _1^{\prime } {{\hat{\psi }}}_{\Sigma }+4 \nu _2^{\prime } \hat{\psi }^{\prime }_{\Sigma }+\frac{24}{r_{\Sigma }}s(1-s)(V_0-V_{\Sigma })\nonumber \right. \\&\left. +\frac{1-A_{\Sigma }}{2 A_{\Sigma } r_{\Sigma }}s(3s-2)\right] \end{aligned}$$
(68)

where the functions \(\nu _1^{\prime }\) and \(\nu _2^{\prime }\) are the derivatives of instrumental functions in the radial variable defined by the following behaviour:

$$\begin{aligned} \nu _1(r)=\left\{ \begin{array}{lll} &{} 0 , \quad s=0 \\ &{} 1 , \quad s=1 \end{array} \right. \quad , \quad \nu _1^{\prime }(r)=\left\{ \begin{array}{lll} &{}0, \quad s=0 \\ &{}0, \quad s=1 \end{array} \right. \end{aligned}$$
$$\begin{aligned} \nu _2(r)= & {} \left\{ \begin{array}{lll} &{}0, \quad s=0 \\ &{}0, \quad s=1 \end{array} \right. \quad , \quad \nu _2^{\prime }(r)=\left\{ \begin{array}{lll} &{}0, \quad s=0 \\ &{}1, \quad s=1 \end{array} \right. \end{aligned}$$
(69)

The calculation of these functions is addressed to the Appendix.

With the function W in (68), the anistropy \(\Pi _{31}\) is constrained by the Eq. (62), since \(\beta ^{+}\) for this model must be equal to

$$\begin{aligned} \beta ^{+}(W)= & {} 4 \nu _1 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}_{\Sigma }]+ 4 \nu _2 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}^{\prime }_{\Sigma }]\nonumber \\&+\frac{W^2}{2}+r^2A \partial _r\left( \frac{W}{r\sqrt{A}}\right) \end{aligned}$$
(70)

and hence

$$\begin{aligned} \Pi _{31}= & {} \frac{T_m}{4 \pi P}\left[ A(\beta +d^+)-\frac{1}{8r^2}(A-1)\nonumber \right. \\&\left. \quad \times \, \left[ \frac{3}{2} \frac{(A+1)}{A}-\frac{(A-1)}{2(2Z)^2} -\frac{3\sqrt{A}}{2Z} \right] +\frac{\beta ^+(W)}{8r^2}\right] \nonumber \\ \end{aligned}$$
(71)

with the notation \({\displaystyle d(r,\theta )=-\frac{4\pi P}{A T_m}\Pi _{31}+ d^+}\) (see Eq. (21)).

In order to show a complete description of the model we shall calculate now the functions \(\Lambda \) and \(\Omega \) from (36) which allows us to determine the other anisotropies \(\Pi _{23}\), \(\Pi _{xy}\) (see the notation in Eq. (24)):

$$\begin{aligned} \Lambda= & {} \frac{r^2A}{16} \left[ J- 4 \nu _1^{\prime } \hat{\psi }_{\Sigma }-4 \nu _2^{\prime } \hat{\psi }^{\prime }_{\Sigma }-\frac{24}{r_{\Sigma }}s(1-s)(V_0-V_{\Sigma })\nonumber \right. \\&\left. -\frac{1-A_{\Sigma }}{2A_{\Sigma }r_{\Sigma }}s(3s-2)\right] ^2 \nonumber \\&-\frac{(1-y^2)}{16} \left[ (4 \nu _1^{\prime }\partial _y\hat{\psi }_{\Sigma }+4 \nu _2^{\prime } \partial _y\hat{\psi }^{\prime }_{\Sigma })^2 \right] \nonumber \\ \Omega= & {} \frac{\sqrt{1-y^2}}{16} \left[ 4 \nu _1^{\prime }\partial _y{{\hat{\psi }}}_{\Sigma }+4 \nu _2^{\prime } \partial _y{{\hat{\psi }}}^{\prime }_{\Sigma } \right] \nonumber \\&\times \left[ J- 4 \nu _1^{\prime } {{\hat{\psi }}}_{\Sigma }-4 \nu _2^{\prime } \hat{\psi }^{\prime }_{\Sigma }\nonumber \right. \\&\left. -\frac{24}{r_{\Sigma }}s(1-s)(V_0-V_{\Sigma })-\frac{1-A_{\Sigma }}{2A_{\Sigma }r_{\Sigma }}s(3s-2)\right] \end{aligned}$$
(72)

And finally, the metric functions and the EoS have the following expressions:

$$\begin{aligned} {{\hat{a}}}= & {} V(r)+ \nu _1 {{\hat{\psi }}}_{\Sigma }+ \nu _2 \hat{\psi }^{\prime }_{\Sigma }-V_0 \nonumber \\&+s^2\left[ (3-2s)(V_0-V_{\Sigma })+\frac{1-A_{\Sigma }}{2A_{\Sigma }}(s-1)\right] \end{aligned}$$
(73)

Let us note that this expression is the generalization of the special case \({\mathbb {F}}=0\) considered in [13], where only the termFootnote 3 \(a_E= \nu _1 {{\hat{\psi }}}_{\Sigma }+ \nu _2 {{\hat{\psi }}}^{\prime }_{\Sigma }\) was used to define \({{\hat{a}}}\). In addition we observe that the dependence of \({{\hat{a}}}\) on the angular variable is the same and it is fixed by the exterior gravitational field. The other metric function \({{\hat{g}}}\) is obtained from (15) with a suitable pressure \(T_m\) that fulfills the conditions (44)–(52). Without limiting the generality, this pressure can be written as follows

$$\begin{aligned} T_m= & {} -\frac{M\mu }{r_{\Sigma }(r_{\Sigma }-2M)} e^{2\hat{\Psi }_{\Sigma }-2{{\hat{\gamma }}}_{\Sigma }}\nonumber \\&\times \left[ (r-r_{\Sigma })+\left( \frac{1}{r_{\Sigma }}+4(\hat{\Psi }^{\prime }_{\Sigma }-{{\hat{\gamma }}}^{\prime }_{\Sigma }) \right) \frac{(r-r_{\Sigma })^2}{2} \right] \nonumber \\&+(r-r_{\Sigma })^3 {{\hat{T}}}(r,\theta ) \end{aligned}$$
(74)

where \({{\hat{T}}}(r,\theta )\) is an arbitrary function such that \(T_m\) satisfies the conditionsFootnote 4 at \(r=0\) (49)–(52).

We obtain the EoS of this model by putting into the Eq. (59) the particular expressions for the functions \(\Sigma _+\) (61) and \(d(r,\theta )\) which depends on \(\beta ^+(W)\) (70):

$$\begin{aligned} \rho= & {} \frac{T_m}{8\pi P} \left[ 8 \pi \mu + \alpha +4 A x^2 +2A\beta -\frac{1}{4} A J^2\nonumber \right. \\&+\frac{\sqrt{A}}{2r}J W-\frac{1}{8} \frac{W^2}{r^2}\nonumber \\&+\left. \frac{1}{r^2}\left[ \nu _1 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}_{\Sigma }]+ \nu _2 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}^{\prime }_{\Sigma }]\right] \right. \nonumber \\&+\frac{A}{4}\partial _r\left( \frac{W}{r\sqrt{A}} \right) -\frac{(A-1)}{4r^2}\nonumber \\&\left. \times \left[ \frac{3}{2} \frac{(A+1)}{A}-\frac{(A-1)}{2(2Z)^2}-\frac{3\sqrt{A}}{2Z} \right] \right] \end{aligned}$$
(75)

which after simplification becomes

$$\begin{aligned} \rho= & {} \frac{T_m}{8\pi P} \left[ 8 \pi \mu + \alpha +\frac{A}{4}\partial _r\left( \frac{W}{r\sqrt{A}} \right) +\frac{\sqrt{A}}{2r}J W-\frac{1}{8} \frac{W^2}{r^2}\right. \nonumber \\&+\left. \frac{1}{r^2}\left[ \nu _1 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}_{\Sigma }]+ \nu _2 \partial _y[(1-y^2)\partial _y {{\hat{\psi }}}^{\prime }_{\Sigma }]\right] \right. \nonumber \\&+\frac{1}{8r^2}\left[ \frac{(-9A^2+4A+1)}{A}+\frac{3(A-1)^2}{(2Z)^2}\nonumber \right. \\&\left. \left. -\frac{2(1-A)(17A-2)}{(2Z)\sqrt{A}} \right] \right] \end{aligned}$$
(76)

7 Conclusions

The exterior gravitational field of a compact object constrains the physics on the inside of the source. Once a Weyl vacuum solution describing the gravitation of an axially static stellar object is appropriately matched with an interior metric then both the line element as well as the energy–momentum tensor of the source can be constructed in terms of the exterior metric functions. A global description of the gravitation allows us to relate the energy–momentum tensor with the exterior gravitational field.

In this paper we have contributed with good behavioured models of sources, both in the spherical and non-spherical cases, providing suitable EoS and the global metric by means of the knowledge as a starting point of any vacuum solution of the Weyl family. In these models it is shown how the different exterior metrics contribute in a different way into the anisotropies or the density of the source, at the same time that the pressure \(T_m\) depends on those exterior metric functions. How the pressures and the EoS undertake the presence of non-spherical symmetry at the exterior, being led by the departure of the exterior metric functions \({{\hat{\psi }}}_{\Sigma }\), \({{\hat{\gamma }}}_{\Sigma }\) from the corresponding Schwarzschild ones \(\psi _{\Sigma }^s\), \(\gamma _{\Sigma }^s\), is shown. Therefore, we get information about the physics on the inside of the source from the behaviour of the exterior gravitational field.

These results do not establish, of course, general relationships since we have been dealing with the so called Weyl gauge, and we manage only two metric functions in the interior metric; that condition on the Einstein tensor is always satisfied on the vacuum, however for the interior space-time it implies a restriction on possible solutions. Nevertheless, the results presented here show that, within that restriction on possible solutions, the matter distribution of the source assumes some constraints derived from the exterior gravitational field of the global metric. These constraints can be expressed in terms of the gravitational field which is matching the interior solution. Since the method proposed [13] allows us to contrast a well matched interior metric for any exterior solution of the Weyl family, we can obtain for any vacuum solution how the energy–momentum tensor of axially symmetric static sources are affected by different physical characteristics of the gravitational field.

And last but not least, we have introduced an expression derived from the matching conditions that allows us to calculate the RMM in terms of the source. An example of that is obtained for the quadrupole moment of the metric which is related, by means of a source integral (56), with the physics of the source (anisotropies and pressures).