1 Introduction

Currently, one of the open problems of science is the rigorous definition of complexity for a system. One of the open problems in science at the moment is how exactly to define complexity for a system. Over the years, many definitions of complexity have appeared, however, to date there is not a consensus on how to measure the degree of complexity of a system [1,2,3,4,5,6,7,8,9,10,11,12]. Now, most of the definitions that have been proposed assume that complexity is intrinsically related to the concepts of entropy and information. Usually, at least in physics, the definition of complexity begins by identifying the simplest system that could be analyzed, that is, one with vanishing complexity. Two straightforward examples are the isolated ideal gas (high entropy and information content) and the perfect crystal (low entropy and information content). These two examples suggest that the concept of complexity should include other factors than entropy and information. An example was proposed in [7], where the authors introduced the concept of “disequilibrium”, which is a quantity that measures the distance from the equiprobable distribution of the accessible states of the system. Thus, complexity can be defined as the product of the concepts of information and disequilibrium. In this way, it is ensured that both systems, the perfect and the isolated ideal gas, have vanishing complexity.

In General Relativity, there have been many attempts to define a complexity factor of a self-gravitating system (including the one mentioned before). However, it has not been entirely satisfactory. Indeed, following the idea of “disequilibrium” and information, in [9, 13,14,15,16,17,18] it has been proposed a definition of complexity that is completely determined by the energy density of the fluid distribution. This idea rests on the fact that the energy density is related to the probability of finding some particles in a given location inside the fluid distribution. However, this definition ignores other physical factors, such as the pressures of the fluid, that play a key role in the internal structure of self-gravitating systems. In recent years, L. Herrera proposed a new definition of complexity for spherically symmetric static fluid distribution that considers the pressure’s contribution to the energy–momentum tensor [19] (see also [20,21,22,23] for more recent developments). Specifically, the complexity factor proposed is completely determined by the gradient of the energy density and the anisotropic function of the distribution. The local anisotropy in the pressures is an expected feature in self-gravitating objects. Indeed, there is a wide range of physical phenomena that are expected in compact objects, that can lead to deviations from isotropy. Some examples are exhaustively discussed in [24] and include exotic phase transitions that may occur in high-density systems, anisotropic velocity distributions in low density systems, and the high viscosity produced by neutrino trapping when the central density is around \(10^{11}{-}10^{12}~\text {g}/\text {cm}^3.\) Other possible sources for the local anisotropy in pressure are the intense magnetic fields observed in neutron stars and white dwarfs. In fact, it is known that a magnetic field acting on a Fermi gas produces pressure anisotropy [25,26,27,28]. Moreover, the superposition of two isotropic fluids can be essentially described as an anisotropic fluid [29, 30]. Also, it has been recently shown that, under the conditions expected in stellar evolution, any system will tend to develop pressure anisotropy, even if it was initially assumed to be isotropic in pressure [31].

This definition of complexity is, by construction, intrinsically related to the internal structure of the system and is constructed by assuming the homogeneous, perfect fluid distribution is one of the simplest systems that could be studied. This is, it has vanishing complexity. Now, an interesting feature of this definition is that the vanishing complexity condition does not determine a unique solution to Einstein’s equations but an equivalence class of solutions. Thus, it is interesting to compare the properties of different solutions of Einstein’s equations that satisfy the vanishing complexity condition.

Now, a very useful and powerful procedure to search for solutions to Einstein’s equations is the known gravitational decoupling method [32]. This was originally introduced in the context of Randall–Sundrum Brane World [33,34,35,36,37,38,39,40,41] and later on used in the General Relativity framework where the gravitational decoupling was proved. Specifically, this method allows to study, in a very simple and systematic way, a self gravitating system whose Einstein–Hilbert action is given by

$$\begin{aligned} S = \int \left[ \frac{R}{2k^2}+{\mathcal {L}}\right] \sqrt{-g}d^4x + \alpha (\text{ correction}), \end{aligned}$$
(1)

which leads to an energy–momentum tensor of the form

$$\begin{aligned} T_{\mu \nu } = T^0_{\mu \nu } + \alpha \theta _{\mu \nu }. \end{aligned}$$
(2)

The source, \(\theta _{\mu \nu },\) can be interpreted and the coupling with other fluid distributions [42,43,44,45,46,47,48], the coupling with other fields [49] or as contributions coming from theories beyond GR [50,51,52,53,54].

Originally, the method only considered spatial metric deformations in spherically symmetric systems. It was called minimal geometric deformation (MGD). It generalization also considers deformation of the temporal component together with the spatial component of the metric, and it was named extended geometric deformation (EGD) [55]. Moreover, it was already formulated for axially symmetric matter distributions in [56]. (for more applications of the gravitational decoupling method, see [57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95]). In [96], we proposed a new interpretation of EGD where the temporal and radial deformations are not simultaneous but consecutive. It leads to a set of solutions contained in EGD by solving simpler systems of equations. This method was named 2-step GD.

In this work, we will analyze the complexity factor of different solutions to Einstein’s equations using the extended version of the gravitational decoupling method. This is the gravitational decoupling considering both temporal and spatial metric deformations (see [60] for the analysis using MGD and [97,98,99,100,101,102] for more recent developments). Specifically, we will search and compare solutions to Einstein’s equations that satisfy the vanishing complexity condition (or the ones that have the same complexity factor as the seed solution) using the EGD method. We will properly discuss details that have not been mentioned before in previous and even recent works.

This paper is organized as follows: In Sect. 2, we review Einstein’s field equations for a spherically symmetric anisotropic fluid distribution and its complexity factor. In Sect. 3, we summarize the extended geometric deformation. In Sect. 4, we discuss some models with a vanishing complexity factor that can be obtained by means of extended geometric deformation. In Sect. 5, we analyze some particular models using different seed solutions, such as Tolman IV and Finch–Skeas. In Sect. 6, we show possible generalizations to our models and the relation with the algorithm presented in [104]. Finally, in Sect. 7, we discuss all the results.

2 Basic equations

2.1 The Einstein equations

Let us consider a static, spherically symmetric distribution of an anisotropic fluid bounded by a surface, \(\Sigma .\) In Schwarzschild-like coordinates, the metric is given by

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

where \(\nu \) and \(\lambda \) are functions of r and must satisfy the Einstein equations

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

where \(R_{\mu \nu },R,T_{\mu \nu }\) are the Ricci tensor, the curvature scalar, and the energy–momentum tensor, respectively. For the metric (3) the Einstein equations lead to the following system:

$$\begin{aligned} k^2 T^0_0= & {} \frac{1}{r^{2}}-\frac{\tilde{\mu }}{r^{2}}- \frac{\tilde{\mu }'}{r}, \end{aligned}$$
(5)
$$\begin{aligned} k^2 T^1_1= & {} \frac{1}{r^{2}}-\tilde{\mu }\left( \frac{1}{r^{2}}+\frac{\nu '}{r}\right) , \end{aligned}$$
(6)
$$\begin{aligned} k^2 T^2_2= & {} - \frac{\tilde{\mu }}{4} \left( 2\nu '' +\nu '^{2}+2\frac{\nu '}{r} \right) - \frac{\tilde{\mu }'}{4}\left( \nu '+\frac{2}{r}\right) \end{aligned}$$
(7)

where primes denote derivatives with respect to r.

From the conservation law

$$\begin{aligned} \nabla _{\mu }T^{\mu \nu }=0, \end{aligned}$$
(8)

it is possible to obtain the equilibrium equation for anisotropic matter,

$$\begin{aligned} -(T^1_1)'+\frac{\nu '}{2}(T^0_0 -T^1_1)-\frac{2}{r}\Delta =0, \end{aligned}$$
(9)

where \(\Delta = T^1_1-T^2_2.\)

Outside the fluid distribution, we shall assume that the space-time is given by the Schwarzschild exterior solution, namely

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

Therefore, the continuity of the first and second fundamental forms across the boundary surface \(r_{\Sigma }= constant\) implies that,

$$\begin{aligned} e^{\nu _{\Sigma }}= & {} 1-\frac{2M}{r_{\Sigma }},\end{aligned}$$
(11)
$$\begin{aligned} \mu _{\Sigma }= & {} 1-\frac{2M}{r_{\Sigma }},\end{aligned}$$
(12)
$$\begin{aligned} P_{r_{\Sigma }}= & {} 0, \end{aligned}$$
(13)

where the subscript \(\Sigma \) indicates that the quantity is evaluated at the boundary surface \(\Sigma .\) Notice, from the field equations, that an equivalent form of the matching conditions can be written as

$$\begin{aligned} e^{\nu _{\Sigma }}= & {} 1-\frac{2M}{r_{\Sigma }}, \end{aligned}$$
(14)
$$\begin{aligned} \mu _{\Sigma }= & {} 1-\frac{2M}{r_{\Sigma }}, \end{aligned}$$
(15)
$$\begin{aligned} \nu '_{\Sigma }= & {} \frac{2 M}{r_{\Sigma } (r_{\Sigma }-2 M)}. \end{aligned}$$
(16)

2.2 Complexity factor

For a spherically symmetric static fluid distribution, the complexity of the system is completely determined by the absolute value of the scalar function \(Y_{TF}\) given by

$$\begin{aligned} Y_{TF} = -8\pi \Delta - \frac{4\pi }{r^3}\int _0^r \tilde{r}^3 (T^0_0)' d\tilde{r}. \end{aligned}$$
(17)

From this expression, it is clear that the complexity of the system is entirely characterized in terms of the energy density gradient and the anisotropic function. Thus, one of the simplest distributions is the homogeneous isotropic fluid, since each term is identically zero. However, this is not the only case with zero complexity. There is also the case in which the anisotropic function is

$$\begin{aligned} \Delta= & {} -\frac{1}{2r^3}\int _0^r \tilde{r}^3 (T^0_0)' d\tilde{r} = \frac{r}{2k^2}\left( \frac{\tilde{\mu }-1}{r^2}\right) ' \nonumber \\= & {} \frac{1}{k^2}\left( \frac{3m}{r^3}-\frac{k^2}{2}T^0_0\right) , \end{aligned}$$
(18)

where

$$\begin{aligned} m = \frac{k^2}{2} \int ^r_0 T^0_0 \bar{r}^2 d\bar{r}. \end{aligned}$$
(19)

Now, it can be shown [19] that the complexity factor is directly related to the Tolman mass

$$\begin{aligned} m_{T} = \frac{k^2}{2} \int _0^{r} \bar{r}^2e^{(\nu + \lambda )/2}(T^0_0-T^1_1-2T^2_2)d\bar{r}, \end{aligned}$$
(20)

which, in terms of \(Y_{TF},\) can be written as

$$\begin{aligned} m_{T} = (m_T)_{\Sigma }\left( \frac{r}{r_{\Sigma }}\right) ^3 + r^3 \int ^{r_{\Sigma }}_r \frac{e^{(\nu + \lambda )/2}}{\tilde{r}}Y_{TF} d\tilde{r}. \end{aligned}$$
(21)

The first term in this equation is the Tolman mass of an homogeneous and isotropic fluid sphere of radius \(r_{\Sigma }.\) Therefore, the second term can be interpreted as the deviation of the Tolman mass from the homogeneous and isotropic fluid when the anisotropy function and the energy density gradient differ from zero. However, as we mentioned before, the homogeneous and isotropic fluid is not the only case that leads to a vanishing complexity factor.

3 Gravitational decoupling

In this section, we shall summarize the gravitational decoupling method presented in [55]. The starting point of this method is to assume that the energy–momentum tensor can be written as

$$\begin{aligned} T_{\mu \nu }=T^\textrm{0}_{\mu \nu }+\alpha \,\theta _{\mu \nu }, \end{aligned}$$
(22)

where \(\alpha \) is a coupling constant. In this work we will assume that \(T^\textrm{0}_{\mu \nu }\) is the matter-energy content associated to an anisotropic fluid, this is

$$\begin{aligned} T^0_{\mu \nu }=(\rho +P_{\perp })u_{\mu }u_{\nu }-P_{\perp }g_{\mu \nu }+(P_{r}-P_{\perp })s_{\mu }s_{\nu }, \end{aligned}$$
(23)

where

$$\begin{aligned} u^{\mu }=(e^{-\nu /2},0,0,0), \end{aligned}$$
(24)

is the four velocity of the fluid and \(s^{\mu }\) is defined as

$$\begin{aligned} s^{\mu }=(0,\tilde{\mu },0,0), \end{aligned}$$
(25)

such that \(s^{\mu }u_{\mu }=0,\) \(s^{\mu }s_{\mu }=-1.\)

The next step is to assume that the contribution of \(\theta _{\mu \nu }\) to the complete system is encoded in the deformations h and f of the temporal and radial metric components, respectively

$$\begin{aligned} \nu= & {} \xi +\alpha \,h, \end{aligned}$$
(26)
$$\begin{aligned} \tilde{\mu }= & {} \mu +\alpha \,f. \end{aligned}$$
(27)

In this case, it is easy to check that, using (22), (26) and (27), Einstein’s equations (5)–(7) splits in two systems. The first one coincides with Einstein’s equation system for an anisotropic fluid

$$\begin{aligned} 8\pi (T^0)^0_0= & {} \frac{1}{r^2} -\frac{\mu }{r^2} -\frac{\mu '}{r}, \end{aligned}$$
(28)
$$\begin{aligned} 8\pi (T^0)^1_1= & {} \frac{1}{r^2}-\mu \left( \frac{1}{r^2}+\frac{\xi '}{r}\right) , \end{aligned}$$
(29)
$$\begin{aligned} 8\pi (T^0)^2_2= & {} -\frac{\mu }{4}\left( 2\xi ''+\xi '^2+\frac{2\xi '}{r}\right) - \frac{\mu '}{4}\left( \xi '+\frac{2}{r}\right) ,\nonumber \\ \end{aligned}$$
(30)

with the corresponding conservation equation

$$\begin{aligned} - [(T^0)^1_1]'+\frac{\nu '}{2}[(T^0)^0_0 -(T^0)^1_1]-\frac{2}{r}\Delta _0=0, \end{aligned}$$
(31)

which is the TOV equation for an anisotropic fluid with \(\Delta _0= (T^0)^1_1-(T^0)^2_2.\)

The second system of equations reads

$$\begin{aligned} 8\pi \,\theta _0^{\,0}= & {} -\frac{f}{r^2} -\frac{f'}{r}, \end{aligned}$$
(32)
$$\begin{aligned} 8\pi \,\theta _1^{\,1} + Z_1= & {} -f\left( \frac{1}{r^2}+\frac{\widetilde{\nu }'}{r}\right) , \end{aligned}$$
(33)
$$\begin{aligned} 8\pi \,\theta _2^{\,2} + Z_2= & {} -\frac{f}{4}\left( 2\widetilde{\nu }''+\widetilde{\nu }'^2+2\frac{\widetilde{\nu }'}{r}\right) -\frac{f'}{4}\left( \widetilde{\nu }'+\frac{2}{r}\right) ,\nonumber \\ \end{aligned}$$
(34)

with

$$\begin{aligned} Z_1= & {} \frac{\mu h'}{r}, \end{aligned}$$
(35)
$$\begin{aligned} 4Z_2= & {} \mu \left( 2h'' + \alpha h'^2 + \frac{2h'}{r}+2\xi 'h'\right) +\mu 'h'. \end{aligned}$$
(36)

In order to find a solution of Einstein’s equations for an energy–momentum tensor of the form (22), we have to solve the systems (28)–(30) and (32)–(34). Now, if we assume that the set \(\{T^0_{\mu \nu },\mu ,\xi \}\) is a known solution of Einstein’s equations, then it is only necessary to solve the second system. Now, in both cases, there are more unknown functions than equations, so additional information is required in order to solve the system.

Now, it is important to mention that the sources \(T^{(PF)}_{\mu \nu }\) and \(\theta _{\mu \nu }\) can be decoupled only if there exists an interchange of energy between them. This can be easily seen from the conservation equations

$$\begin{aligned} \nabla _\mu (T^{PF})^{\mu }_\nu = -\frac{h'}{2}(P_r+\rho )\delta ^1_\nu , \end{aligned}$$
(37)

and

$$\begin{aligned} \nabla _\mu \theta ^\mu _\nu = \frac{h'}{2}(P_r+\rho )\delta ^1_\nu , \end{aligned}$$
(38)

where the divergence in these expressions is calculated with the metric related to (26) and (27).

At this point, it is clear that EGD is a powerful tool for studying more complicated solutions to Einstein’s field equations than the ones obtained with the MGD method. Nevertheless, finding solutions to Eqs. (32)–(34) could be very complicated depending on the system under study.

Finally, it is easy to show that, under the gravitational decoupling method, the complexity factor associated with the energy–momentum tensor \(T_{\mu \nu }= T^0_{\mu \nu }+ \alpha \theta _{\mu \nu }\) can be written as

$$\begin{aligned} Y_{TF} = Y^0_{TF} + \alpha Y^{\theta }_{TF}, \end{aligned}$$
(39)

where \(Y^0_{TF}\) is the complexity factor of the seed solution and

$$\begin{aligned} Y^{\theta }_{TF} = -8\pi (\theta ^1_1-\theta ^2_2) - \frac{4\pi }{r^3}\int _0^r \tilde{r}^3 (\theta ^0_0)' d\tilde{r}, \end{aligned}$$
(40)

is the complexity factor of the source \(\theta _{\mu \nu }.\)

4 Models with vanishing complexity factor

From Eqs. (39)–(40), it is clear that the gravitational decoupling method allows to find solutions to Einstein’s equations with different complexity factors by imposing conditions over \(Y_{TF}^{\theta }.\) This is why we can rewrite (40) as

$$\begin{aligned} f' + f\left( \nu ' +\frac{2\nu ''}{\nu '}-\frac{2}{r}\right) =-\frac{4}{\nu '}(Y^{\theta }_{TF}+Z_2-Z_1). \end{aligned}$$
(41)

Thus, given h and \(Y^{\theta }_{TF},\) in such a way that it leads to the desired final complexity factor, we can find f. In particular, the cases \(Y^{\theta }_{TF}=0\) and \(Y^{\theta }_{TF}=-Y^0_{TF}/\alpha \) correspond to final solutions with an invariant and a vanishing complexity factor, respectively. Now, we can explore two different cases.

4.1 First case

In this case, we shall assume that h satisfy the following constraint

$$\begin{aligned} Z_2-Z_1=0. \end{aligned}$$
(42)

Therefore, h must be a solution of the following differential equation

$$\begin{aligned} h''+h'\left( \xi '+\frac{\mu '}{2\mu }-\frac{1}{r}\right) +(h')^2 \frac{\alpha }{2}=0, \end{aligned}$$
(43)

that is

$$\begin{aligned} h= & {} \frac{2}{\alpha } \ln \left( E\int \frac{re^{-\xi }}{\sqrt{\mu }}dr + 1\right) + D, \end{aligned}$$
(44)

with D and E constant. Notice that, without losing generality, we can set \(D=0.\)

From (41) it can be seen that the differential equation for f is

$$\begin{aligned} f' + f\left( \nu ' +\frac{2\nu ''}{\nu '}-\frac{2}{r}\right) =-\frac{4}{\nu '}(Y^{\theta }_{TF}), \end{aligned}$$
(45)

which has the same mathematical expression obtained with the MGD method but interchanging \(\xi \) with \(\nu =\xi + \alpha h.\) Thus, the solution for f is given by

$$\begin{aligned} f = 4r^2\frac{e^{-\nu }}{(\nu ')^2}\left( -\int \frac{\nu 'e^{\nu }Y^{\theta }_{TF}}{r^2}dr+C\right) , \end{aligned}$$
(46)

where C is a constant.

Invariant complexity factor: Notice that, for the case \(Y^{\theta }_{TF}=0,\) we get

$$\begin{aligned} f = 4r^2\frac{e^{-\nu }C}{(\nu ')^2}. \end{aligned}$$
(47)

Consequently, the regularity at the center of the distribution implies that

$$\begin{aligned} \tilde{\mu }(0)=1, \quad \nu '(0)=\tilde{\mu }'(0)=0, \end{aligned}$$
(48)

therefore

$$\begin{aligned} f(0) = \frac{4e^{\nu (0)}C}{(\nu ''(0))^2}, \end{aligned}$$
(49)

and

$$\begin{aligned} 1 = \mu (0) + \frac{4e^{\nu (0)}\alpha C}{(\nu ''(0))^2}. \end{aligned}$$
(50)

Thus, if the original solution satisfies \(\mu (0)=1,\) we get \(C=0.\) This is, the only possibility: a temporal metric deformation of the metric given by (44). Moreover, since \(f=0\) and from (42) it follows that the final solution will keep the same local anisotropic function than the seed solution, this is, \(\Delta = \Delta _0.\)

Vanishing complexity factor: On the other hand, we have that \(Y^{\theta }_{TF}=-Y^0_{TF}/\alpha ,\) and we can use (43) to find

$$\begin{aligned} \left( \frac{\mu (\nu ')^2 e^{\nu }}{4r^2} + K \right) ' = - \frac{\nu ' e^\nu Y^0_{TF}}{r^2}, \end{aligned}$$
(51)

with K a constant that will depend on the seed solution. Therefore

$$\begin{aligned} f = -\frac{\mu }{\alpha } + \frac{4r^2e^{-\nu }}{(\nu ')^2}\left( C-\frac{K}{\alpha } \right) . \end{aligned}$$
(52)

Thus, regularity at the origin of the distribution implies that

$$\begin{aligned} \alpha C = \frac{(\nu ''(0))^2e^{\nu (0)}}{4} + K. \end{aligned}$$
(53)

Then we can write

$$\begin{aligned} \alpha f = -\mu + \frac{r^2e^{\nu (0)-\nu }(\nu ''(0))^2}{(\nu ')^2}. \end{aligned}$$
(54)

Now, to end with the first case, the following comments are in order:

  • The only case in which the spatial metric deformation could play a role in getting a model with invariant complexity would be when the seed solution is singular at \(r=0.\)

  • It is clear that if the seed solution is regular at \(r=0,\) the condition \(Y^{\theta }_{TF}=0\) implies \(f=0.\) Thus, there will be only a temporal metric deformation. This is a quite strong condition because it implies that the MGD method \((h=0)\) does not lead to a new solution in this case.

  • In the case where \(Y^{\theta }_{TF}=0,\) the final solution will have the same anisotropic function as the seed solution. Thus, if the seed solution is isotropic in pressure, the final solution will satisfy this condition too.

  • It is important to notice that, when \(h=0,\) (54) represents the general form of a solution with vanishing complexity obtained through the minimal geometric deformation method from a given seed solution.

4.2 Second case

In this case, we shall impose the following constraint

$$\begin{aligned} 0= & {} Z_2-Z_1 +\alpha f'\frac{h'}{4}-\alpha f\left( \frac{h'}{2r}-\frac{h''}{2}\right. \nonumber \\{} & {} - \left. \frac{2\xi 'h'+\alpha h'^2}{4}\right) . \end{aligned}$$
(55)

Thus, it can be seen that it has the same form as (43) but interchanging \(\mu \) with \(\mu +\alpha f.\) Therefore, the solution for h is given by

$$\begin{aligned} h=\frac{2}{\alpha } \ln \left( E\int \frac{re^{-\xi }}{\sqrt{\mu +\alpha f}}dr + 1\right) +D, \end{aligned}$$
(56)

where we can fix without losing generality \(D=0.\)

On the other hand, from (41) we have that the differential equation for f is given by

$$\begin{aligned} f' + f\left( \xi ' +\frac{2\xi ''}{\xi '}-\frac{2}{r}\right) =-\frac{4}{\xi '}(Y^{\theta }_{TF}), \end{aligned}$$
(57)

whose solution is

$$\begin{aligned} f = 4r^2\frac{e^{-\xi }}{(\xi ')^2}\left( -\int \frac{\xi 'e^{\xi }(Y^{\theta }_{TF})}{r^2}dr+C\right) , \end{aligned}$$
(58)

which coincides with the deformation function f obtained with the MGD approach [97].

Invariant complexity factor: Notice that if the seed solution is finite at the center of the distribution

$$\begin{aligned} \mu = 1, \quad \xi '=\mu '=0, \end{aligned}$$
(59)

then the last term in (58), for \(r=0,\) can be written as

$$\begin{aligned} \frac{4e^{\xi (0)}C}{(\xi ''(0))^2}. \end{aligned}$$
(60)

Thus, for the case \(Y^{\theta }_{TF}=0,\) the condition \(\tilde{\mu }=1\) implies \(C=0.\) This is, the only possibility for this case: a temporal metric deformation given by

$$\begin{aligned} h=\frac{2}{\alpha } \ln \left( E\int \frac{re^{-\xi }}{\sqrt{\mu }}dr + 1\right) , \end{aligned}$$
(61)

which is consistent with the previous case.

Consequently, both cases lead to the same set of solutions with an invariant complexity factor.

Vanishing complexity factor: Now, if \(Y^{\theta }_{TF}=-Y^0_{TF}/\alpha ,\) we can use the definition of \(Y^0_{TF}\) to write

$$\begin{aligned} \left( \frac{\mu (\xi ')^2 e^{\xi }}{4r^2}+ K\right) ' = - \frac{\xi ' e^\xi Y^0_{TF}}{r^2}, \end{aligned}$$
(62)

with K a constant that depends on the seed solution. Therefore

$$\begin{aligned} f = -\frac{\mu }{\alpha } + \frac{4r^2e^{-\xi }}{(\xi ')^2} \left( C-\frac{K}{\alpha } \right) . \end{aligned}$$
(63)

Thus, as before, regularity at the origin leads to

$$\begin{aligned} \alpha C = \frac{(\xi ''(0))^2e^{\xi (0)}}{4} + K, \end{aligned}$$
(64)

which implies

$$\begin{aligned} \alpha f = -\mu + \frac{r^2e^{\xi (0)-\xi }(\xi ''(0))^2}{(\xi ')^2}. \end{aligned}$$
(65)

In this case, the following comments are in order:

  • As in the previous case, it is clear that if the seed solution is regular at \(r=0,\) the condition \(Y^{\theta }_{TF}=0\) implies \(f=0.\) Thus, solutions with an invariant complexity factor will only be obtained by temporal metric deformation.

  • Notice that, as is expected, the solutions with a vanishing complexity factor obtained by the first and second cases coincide when \(h=0.\)

  • As it is clear from the Einstein field equations for \(\{\tilde{\mu },\nu ,\tilde{T}_{\mu \nu }\},\) the final solution only depends on the temporal metric component of the seed solution. It is independent of \(\mu .\) Thus, solutions with the same temporal metric component (as those obtained by the MGD method) will lead to the same result.

5 Solutions

In order to give an example, we will choose some seed solutions and obtain the corresponding solutions with a vanishing complexity factor.

5.1 Tolman IV

If we consider Tolman IV as a seed solution, we have that

$$\begin{aligned} e^\xi= & {} B^2\left( 1+\frac{r^2}{A^2}\right) , \end{aligned}$$
(66)
$$\begin{aligned} \mu= & {} \frac{\left( 1-\frac{r^2}{C'^2} \right) \left( 1+\frac{r^2}{A^2}\right) }{\left( 1+\frac{2r^2}{A^2}\right) }, \end{aligned}$$
(67)
$$\begin{aligned} \rho= & {} \frac{3A^4+A^2(3C'^2+7r^2)+2r^2(c'^2+3r^3)}{8\pi C'^2 (A^2+2r^2)^2}, \end{aligned}$$
(68)
$$\begin{aligned} P_r= & {} \frac{C'^2-A^2-3r^2}{8\pi C'^2(A^2+2r^2)}, \end{aligned}$$
(69)
$$\begin{aligned} P_t= & {} P_r. \end{aligned}$$
(70)

The deformation functions in the first case are given in terms of elliptic integrals of the first kind, and therefore we could not find any analytical solution for the first case. As discussed in the previous section, there is no difference between the first and second cases for the invariant complexity factor if the original solution is regular at \(r=0.\) We shall only focus on the second case with vanishing complexity.

Second case: vanishing complexity The deformation function f in this case corresponds with the same deformation function obtained by MGD. It can be seen from Eqs. (56) and (65) that

$$\begin{aligned} \alpha f= & {} -\mu + \frac{r^2}{A^2}+1, \end{aligned}$$
(71)
$$\begin{aligned} \alpha h= & {} 2 ln\left( 1-\frac{\tilde{E}}{\sqrt{\frac{r^2}{A^2}+1}} \right) , \end{aligned}$$
(72)

where

$$\begin{aligned} \tilde{E} = \frac{EA^2}{B^2}. \end{aligned}$$
(73)

From the matching conditions (11)–(13) we obtain

$$\begin{aligned} \tilde{E}= & {} 3\sqrt{1-\frac{2M}{R}}, \end{aligned}$$
(74)
$$\begin{aligned} A^2= & {} \frac{-R^3}{2M}, \end{aligned}$$
(75)
$$\begin{aligned} B^2= & {} 1/4, \end{aligned}$$
(76)

respectively. The resulting solution will have a constant density given by

$$\begin{aligned} \widetilde{\rho }=\frac{3M}{4\pi R^3}, \end{aligned}$$
(77)

and a vanishing anisotropy function \(\triangle = \widetilde{P}_t-\widetilde{P}_r = 0\) with

$$\begin{aligned} \widetilde{P}_r= & {} \rho \frac{\left( \sqrt{1-\frac{2 M r^2}{R^3}}-\sqrt{1-\frac{2 M}{R}}\right) }{\left( \sqrt{1-\frac{2 M r^2}{R^3}}-3 \sqrt{1-\frac{2 M}{R}}\right) }, \nonumber \\= & {} \widetilde{P}_t. \end{aligned}$$
(78)

Indeed, this solution corresponds to the internal Schwarzschild solution, whose temporal and radial components of the metric are given by

$$\begin{aligned} e^{\nu }= & {} \frac{1}{4}\left( 3\sqrt{1-\frac{2M}{R}}-\sqrt{1-\frac{2Mr^2}{R^3}}\right) ^2 \end{aligned}$$
(79)
$$\begin{aligned} \widetilde{\mu }= & {} 1-\frac{2Mr^2}{R^3}. \end{aligned}$$
(80)

It can be verified that, if we consider the MGD instead of the extended version, the deformation function f is given by (71) and it leads us to (A)dS as an internal solution with

$$\begin{aligned} \widetilde{\rho }=\frac{-3}{8A^2\pi } \end{aligned}$$
(81)

and \(\widetilde{P}_r=\widetilde{P}_t=-\widetilde{\rho }.\) Now, as it was proved in the previous section, since the Tolman IV is regular at \(r=0,\) then any solution obtained throughout the MGD method \((h=0),\) using Tolman IV as seed, will lead to the same result for the vanishing complexity condition.

5.2 Finch–Skeas (FS) solution

Let us consider the known FS solution of Einstein’s equation as the seed solution

$$\begin{aligned} e^\xi= & {} D_1^2[(1-lu)\cos (u)+(l+u)\sin (u)]^2), \quad \end{aligned}$$
(82)
$$\begin{aligned} \mu= & {} u^{-2}, \end{aligned}$$
(83)
$$\begin{aligned} \rho= & {} \frac{L}{8\pi }\frac{2+u^2}{u^4}, \end{aligned}$$
(84)
$$\begin{aligned} P= & {} -\frac{L}{u^2 8\pi }\left( \frac{l u +1+(l - u)\tan (u)}{l u -1-(l + u)\tan (u)}\right) , \end{aligned}$$
(85)

where \(u=\sqrt{1+Lr^2}\) and \(l,D_1,L\) are constants.

5.2.1 First case

Notice that, in this case, h only depends on the seed solution. This is, given a seed solution, h has the same form regardless of the final complexity. Thus, from (82), we have

$$\begin{aligned} h = \frac{2}{\alpha } \ln \left( 1+\frac{E (u \sin (u)+\cos (u))}{l D_1^2 L ((lu-1) \cos (u)-(l+u)\sin (u))}\right) ,\nonumber \\ \end{aligned}$$
(86)

for both the invariant and the vanishing complexity, cases. Now, for simplicity, we shall rewrite this expression as

$$\begin{aligned} h = \frac{2}{\alpha } \ln \left( 1+\frac{(u \sin (u)+\cos (u))}{\beta ((lu-1) \cos (u)-(l+u)\sin (u))}\right) ,\nonumber \\ \end{aligned}$$
(87)

with

$$\begin{aligned} \beta \equiv \frac{D_1^2 l L}{E}. \end{aligned}$$
(88)

Invariant complexity factor As we discussed in the previous section, in the case of an invariant complexity factor, regularity at the origin implies that only the temporal deformation is plausible and is given by (86).

In this case, it will be useful to define the following constants

$$\begin{aligned} L = \frac{\hat{L}}{r_{\Sigma }^2}, \quad y = \frac{M}{r_{\Sigma }}. \end{aligned}$$
(89)

Then, the matching conditions lead to

$$\begin{aligned} \hat{L}= & {} \frac{2y}{1-2y}, \end{aligned}$$
(90)
$$\begin{aligned} \beta= & {} \frac{\cos (u_{\Sigma })-u_{\Sigma } \sin (u_{\Sigma })}{(l-u_{\Sigma })\sin (u_{\Sigma })+(1+l u_{\Sigma })\cos (u_{\Sigma })}, \end{aligned}$$
(91)
$$\begin{aligned} 4D_1^2l^2= & {} \left( 1-2y\right) ^2 (\cos (u_{\Sigma })-u_{\Sigma } \sin (u_{\Sigma }))^2. \end{aligned}$$
(92)

The resulting solution is given by

$$\begin{aligned} \frac{\tilde{\rho }}{\tilde{\rho }_c}= & {} \frac{1}{3}\frac{(2 + u^2)}{u^4} \end{aligned}$$
(93)
$$\begin{aligned} \tilde{P}_t= & {} \tilde{P}_r = \tilde{P}, \end{aligned}$$
(94)
$$\begin{aligned} \frac{\tilde{P}}{\tilde{P}_c}= & {} \frac{ (u u_{\Sigma }+1) \sin (u-u_{\Sigma })+(u-u_{\Sigma }) \cos (u-u_{\Sigma })}{u^2 (u u_{\Sigma }-1) \sin (u-u_{\Sigma })+(u+u_{\Sigma }) \cos (u-u_{\Sigma })} \nonumber \\ {}{} & {} \times \frac{(u_{\Sigma }-1) \sin (1-u_{\Sigma })+(u_{\Sigma }+1) \cos (1-u_{\Sigma })}{(u_{\Sigma }+1) \sin (1-u_{\Sigma })-(u_{\Sigma }-1) \cos (1-u_{\Sigma })}.\nonumber \\ \end{aligned}$$
(95)

Notice, that we can write

$$\begin{aligned} u = \sqrt{\frac{2 x^2 y}{1-2 y}+1}, \quad x = \frac{r}{r_{\Sigma }}. \end{aligned}$$
(96)

It can be seen that the physical acceptability conditions from the appendix are satisfied over a wide range of y values. We present some examples in Figs. 1 and 2.

Fig. 1
figure 1

\(\tilde{P}/\tilde{P}_c\) vs x for of \(y=0.05\) solid (blue) curve, \(y=0.10\) dashed (red) curve, \(y=0.15\) dotted (purple) curve, \(y=0.20\) dot-dashed (brown) curve, \(y=0.25\) doubled dot-dashed (magenta) and \(y=0.30\) long dashed (black) curve in the first case, taking as seed the FS solution, and with the same original complexity factor

Fig. 2
figure 2

\(\tilde{\rho }/\tilde{\rho }_c\) vs x for of \(y=0.05\) solid (blue) curve, \(y=0.10\) dashed (red) curve, \(y=0.15\) dotted (purple) curve, \(y=0.20\) dot-dashed (brown) curve, \(y=0.25\) doubled dot-dashed (magenta) and \(y=0.30\) long dashed (black) curve in the first case, taking as seed the FS solution and with the same original complexity factor

Vanishing complexity factor From previous sections, we know that the temporal deformation function is also given in this case by (86). However, it may be useful to rewrite it as

$$\begin{aligned} h = \frac{2}{\alpha } \ln \left( 1+\frac{(u \sin (u)+\cos (u))}{\beta ((lu-1) \cos (u)-(l+u)\sin (u))}\right) ,\nonumber \\ \end{aligned}$$
(97)

with

$$\begin{aligned} \beta \equiv \frac{D_1^2 l L}{E}. \end{aligned}$$
(98)

By introducing (86) into (54) we can now compute the radial deformation required to get a solution with a vanishing complexity factor. This is

$$\begin{aligned} \alpha f = -\mu +\left( \frac{l \beta \sin (1)+(\beta -1) \cos (1)}{l \beta \sin (u)+(\beta -1) \cos (u)}\right) ^2. \end{aligned}$$
(99)

Now, the matching conditions (14)–(16) leads to

$$\begin{aligned} \frac{1}{\beta }= & {} \frac{1}{\left( u_{\Sigma }^2 (2 y-1)-y+1\right) \cos (u_{\Sigma })+u_{\Sigma } y \sin (u_{\Sigma })} \nonumber \\{} & {} \times \left( \sin (u_{\Sigma }) \left( l u_{\Sigma }^2 (2 y-1)-l y+l+u_{\Sigma } y\right) \right. \nonumber \\{} & {} - \left. \cos (u_{\Sigma }) (u_{\Sigma } (l y-2 u_{\Sigma } y+u_{\Sigma })+y-1) \right) , \end{aligned}$$
(100)
$$\begin{aligned} D_1^2l^2= & {} -\frac{\left( u_{\Sigma }^2 (2 y-1)-y+1\right) \cos (u_{\Sigma })+u_{\Sigma } y \sin (u_{\Sigma })}{\left( u_{\Sigma }^3-v\right) \sqrt{1-2 y}} \end{aligned}$$
(101)
$$\begin{aligned}{} & {} \frac{\left( \left( u_{\Sigma }^2 (2 y-1)-y+1\right) \sin (1-u_{\Sigma })+u_{\Sigma } y \cos (1-u_{\Sigma })\right) ^2}{u_{\Sigma }^2 y^2} \nonumber \\ {}{} & {} \quad \quad = 1-2y. \end{aligned}$$
(102)

The last expression can be interpreted as a restriction for either \(u_{\Sigma } (L)\) or y. However, it cannot be solved with any analytical method. We numerically solved it for a wide range of values, but we could not find any physically acceptable solution. Specifically, all the solutions present at least one singularity. This holds true for any solution obtained using FS as the seed during the MGD method \((h=0).\)

Fig. 3
figure 3

\(\tilde{P_r}/\tilde{P_r}_c\) (left) and \(\tilde{\rho }/\tilde{\rho }_c\) (right) vs x for \(u_{\Sigma } = 1.1,\) \(y=0.38\) solid (blue) curve, \(y=0.39\) dashed (red) curve, \(y=0.40\) dotted (purple) curve and \(y=0.41\) dot-dashed (brown) curve. Second case with vanishing complexity using F-S as seed

5.2.2 Second case

We see from (58) that in this case f only depends on the seed solution. In fact, it corresponds to the deformation function obtained by the MGD method.

Invariant complexity factor From Sect. 4, we have that if the seed solution is regular at the center of the distribution, the only possibility to obtain a regular solution is by a purely temporal deformation with h given by (86). That is, the second case leads us to the same solution with the same invariant complexity factor obtained in the first case.

Vanishing complexity factor Following Sect. 4, we notice from (65) that the spatial deformation function is given by

$$\begin{aligned} \alpha f = -\mu + \frac{(l \sin (1)+\cos (1))^2}{(l \sin (u)+\cos (u))^2} \end{aligned}$$
(103)

while the temporal deformation function, can be written according to (61) as

$$\begin{aligned} h= & {} \frac{2}{\alpha } \log \nonumber \\{} & {} \bigg (1 +\frac{\hat{\beta }}{\epsilon |l \sin (1)+\cos (1)| ((l u-1) \cos (u)-(l+u) \sin (u))}\bigg )\nonumber \\ \end{aligned}$$
(104)

with

$$\begin{aligned} \hat{\beta }= & {} \frac{E}{LD_1^2}, \end{aligned}$$
(105)
$$\begin{aligned} \epsilon= & {} \frac{l \sin (u_{\Sigma })+\cos (u_{\Sigma })}{|l \sin (u_{\Sigma })+\cos (u_{\Sigma })|}. \end{aligned}$$
(106)

From the matching conditions (11)–(13) we have

$$\begin{aligned} l= & {} l_{\pm } = \frac{1}{(4 y-2) \sin ^2(u_{\Sigma })+2 \sin ^2(1)} \nonumber \\{} & {} \times ((1-2 y) \sin (2 u_{\Sigma })\pm 2 \sqrt{1-2 y} |\sin (1-u_{\Sigma })| \nonumber \\{} & {} - \sin (2)), \end{aligned}$$
(107)
$$\begin{aligned} D_1^2= & {} \frac{y^2}{\left( u_{\Sigma }^2-1\right) ^2 (1-2 y) (l \sin (u_{\Sigma })+\cos (u_{\Sigma }))^2} \end{aligned}$$
(108)
$$\begin{aligned} \hat{\beta }= & {} \frac{\epsilon |l \sin (1)+\cos (1)|}{y} ([2 l u_{\Sigma }^2 y -l u_{\Sigma }^2 -l y \nonumber \\{} & {} + l+u_{\Sigma } y ]\sin (u_{\Sigma }) + [2 u_{\Sigma }^2 y-l u_{\Sigma } y -y+1] \cos (u_{\Sigma }) \nonumber \\{} & {} - u_{\Sigma }^2 \cos (u_{\Sigma })\sin (u_{\Sigma })). \end{aligned}$$
(109)

Now, from the two possibilities for l,  we could not find a physically acceptable and free of singularities solution for \(l_+.\) Thus, from now on we will consider only the case \(l=l_-.\)

The physical behaviour of the final solution can be seen from Figs. 3, 4, 5, 6, 7 and 8.

Fig. 4
figure 4

\(\tilde{\Delta }/\tilde{P_r}_c\) vs x for \(u_{\Sigma } = 1.1,\) \(y=0.38\) solid (blue) curve, \(y=0.39\) dashed (red) curve, \(y=0.40\) dotted (purple) curve and \(y=0.41\) dot-dashed (brown) curve. Second case with vanishing complexity using F-S as seed

Fig. 5
figure 5

\(\tilde{v}^s_r\) (solid) and \(\tilde{v}^s_\perp \) (dashed) vs x for \(u_{\Sigma } = 1.1,\) \(y=0.38\) blue curve, \(y=0.39\) red curve, \(y=0.40\) purple curve and \(y=0.41\) brown curve. Second case with vanishing complexity using F-S as seed

Fig. 6
figure 6

\(\tilde{P_r}/\tilde{P_r}_c\) (left) and \(\tilde{\rho }/\tilde{\rho }_c\) (right) vs x for \(y = 0.40,\) \(u_{\Sigma }=1.10\) solid (blue) curve, \(u_{\Sigma }=1.20\) dashed (red) curve, \(u_{\Sigma }=1.30\) dotted (purple) curve and \(u_{\Sigma }=1.40\) dot-dashed (brown) curve. Second case with vanishing complexity using F-S as seed

6 Discussion

In order to give some examples, we choose as seed solutions the Tolman IV and the Finch–Skeas solutions of Einstein’s equations. We introduce these solutions in the results of Sect. 4 to get other solutions with either a vanishing \((Y_{TF}=0)\) or invariant complexity factor \((Y^{\theta }_{TF}=0).\) Using the first case, we could not find an analytical solution for either the invariant or vanishing complexity condition. On the other hand, since Tolman IV is regular at the center, the invariant complexity factor condition leads to the same result in both cases. Thus, the only option left was the second case with the vanishing complexity condition. Here, we found some interesting results. For Tolman IV we get that the vanishing complexity condition and (42) lead to the internal Schwarzschild solution. Moreover, in the MGD approach, the final solution will correspond to the \(AdS_4\) for metric.

In the case of the FS solution, we found two solutions with good physical properties. For the invariant complexity factor conditions, we found that the first and second cases lead to the same final solution. This is an isotropic matter distribution in which, after the matching with the Schwarzschild exterior solution, the thermodynamic variables only depend on x and y given by (96) and (89), respectively. We found a wide range of y values in which the solution satisfied all the physically acceptable conditions. Moreover, in Figs. 1 and 2, we found that both pressure and energy density reach lower values for larger values of y. This is expected since larger values of y describe less compact matter distributions.

Fig. 7
figure 7

\(\tilde{\Delta }/\tilde{P_r}_c\) vs x for \(y = 0.40,\) \(u_{\Sigma }=1.10\) solid (blue) curve, \(u_{\Sigma }=1.20\) dashed (red) curve, \(u_{\Sigma }=1.30\) dotted (purple) curve and \(u_{\Sigma }=1.40\) dot-dashed (brown) curve. Second case with vanishing complexity using F-S as seed

Fig. 8
figure 8

\(\tilde{v}^s_r\) (solid) and \(\tilde{v}^s_\perp \) (dashed) vs x for \(y = 0.40,\) \(u_{\Sigma }=1.10\) blue curve, \(u_{\Sigma }=1.20\) red curve, \(u_{\Sigma }=1.30\) purple curve and \(u_{\Sigma }=1.40\) brown curve. Second case with vanishing complexity using F-S as seed

For the vanishing complexity condition, the first case leads to a local anisotropic solution of Einstein’s equations. However, this solution presents singularities in the internal regions, and we could not find any values for the integration constants that could fix this problem. Thus, this is not a physically acceptable internal solution. Now, we would like to mention that, despite this problem, the solution could be used to describe sections of the internal region of a given mass distribution or could be interpreted as an external solution of Einstein’s equations.

In the second case, with the vanishing complexity condition, we found a solution with local anisotropy in pressures. As in the first case, this solution may have singularities in the internal regions of the distributions (for \(l_+\)), but we found cases where it is free of this problem (for \(l_-\)). Independently of this, we found that, after the matching with the Schwarzschild exterior solution, the solution only depends on \(u_{\Sigma }\) and y. Moreover, using \(l_-,\) we obtained a range of parameters in which the solution is well behaved. For example, in Figs. 3 and 6 we present the radial pressure and energy density of the distribution, showing that they are finite at the center and monotonically decreasing. In addition, we checked that the strong energy conditions were satisfied. From these figures, it is also clear that \(u_{\Sigma }\) and y have the same effect on the thermodynamic variables, i.e., large values of any of them imply smaller values of radial pressure and energy density. As in the first case, this is consistent with the interpretation of these constants. Now, where we found a different pattern is in Figs. 4 and 7, where we present the local anisotropy of the system. Here, larger values of y lead to smaller values of \(\Delta ,\) while for \(u_{\Sigma }\) we found the opposite behavior. Now, for both constants, observe that \(\Delta \) is an increasing function until some value of x in which the function starts to decrease its value. This implies that the contribution of the local anisotropy to the local radial force reaches a maximum and then starts to decline. Therefore, it may be argued that the system is less stable near the surface compared to the more internal regions. In Figs. 5 and 8, we also analyzed the sound velocities and obtained the same behavior as the \(\Delta \) function, i.e., larger values of y lead to smaller values of the velocities, and the opposite for \(u_{\Sigma }.\) Now, as is clear from Fig. 5, large values y may lead to sound velocities greater than one even when the other physical conditions are satisfied.

As a last feature, we would like to mention that in our testing, these solutions present a pattern. This is, given a value for \(u_{\Sigma },\) there is an interval for \(y\in [y_1,y_2]\) in which the solution is well behaved. If \(y<y_1\) then we get solutions with negative local anisotropy and, in some cases, negative tangential pressures. On the other hand, if \(y>y_2\) the tangential pressure is not a monotonically decreasing function, and, in general, the strong energy condition is not satisfied. Moreover, bigger values of \(u_{\Sigma }\) tend to have larger values of \(y_1\) and \(y_2.\) Now, we could not find any value for \(u_{\Sigma }\) admitting \(y<0.30.\)

7 Possible generalizations and relation with other algorithms

In this section, we will briefly discuss a possible generalization of the condition used in the previous section to determine h. In addition, we will also discuss the connection between the conditions used here and the generating functions of the algorithm presented in [103].

7.1 Generalization

In order to integrate the systems of equations for f and h we impose two conditions. The first condition was over the complexity factor \(Y_{TF}^{\theta }\) while the second was an imposition over the function \(Z_2-Z_1.\) In particular, we used

$$\begin{aligned} Z_2-Z_1 = 0, \end{aligned}$$
(110)

for the first case and

$$\begin{aligned} Z_2-Z_1 = -\alpha f'\frac{h'}{4}+\alpha f\left( \frac{h'}{2r}-\frac{h''}{2}- \frac{2\xi 'h'+\alpha h'^2}{4}\right) \nonumber \\ \end{aligned}$$
(111)

for the second case. Notice these two conditions can be written in a more general way as

$$\begin{aligned} Z_2-Z_1 = -\alpha F(r)'\frac{h'}{4}+\alpha F(r)\left( \frac{h'}{2r}-\frac{h''}{2}- \frac{2\xi 'h'+\alpha h'^2}{4}\right) ,\nonumber \\ \end{aligned}$$
(112)

whose lead us to the following differential equation

$$\begin{aligned} (\mu +\alpha F)' h' + (\mu +\alpha F)\bigg (2h''+\alpha h'^2-\frac{2}{r}h'+2h'\xi '\bigg ) =0,\nonumber \\ \end{aligned}$$
(113)

for some function F(r). Thus the solution for h can be written as

$$\begin{aligned} h=\frac{2}{\alpha } \ln \left( E\int \frac{re^{-\xi }}{\sqrt{\mu +\alpha F}}dr + 1\right) +D. \end{aligned}$$
(114)

Then the two cases discussed in this paper are given by \(F(r)=0\) (first case) and \(F(r)=f\) (second case). Thus, it is possible to explore other cases by taking different choices of F(r).

7.2 Relation with other algorithms

Here we will present the connection between the conditions (41)–(42) and (41)–(55) that we used throughout this work and the generating functions, Z(r) and \(\Pi (r),\) presented in [103]. Now, in general, we can write

$$\begin{aligned} Z(r)= & {} \frac{1}{2}\bigg (\xi '+\alpha h'\bigg ) +\frac{1}{r}, \end{aligned}$$
(115)
$$\begin{aligned} \Pi (r)= & {} -k(\Delta _0+\Delta _\theta ), \end{aligned}$$
(116)

where \(\Delta _\theta = \theta ^1_1-\theta ^2_2.\) From the definition of the complexity factor we can write

$$\begin{aligned} k\Delta _\theta = \frac{1}{2}\frac{f'}{r} -\frac{f}{r^2}-Y^{\theta }_{TF}. \end{aligned}$$
(117)

Thus in our case we obtain that the generating functions, Z(r) and \(\Pi (r),\) are given by

$$\begin{aligned} Z(r) = \frac{1}{2}\bigg (\xi '+ \frac{2re^{-\xi }E}{\sqrt{\mu +\alpha F}\left( 1+E\int \frac{re^{-\xi }}{\sqrt{\mu +\alpha F}}dr\right) }\bigg ) +\frac{1}{r}\nonumber \\ \end{aligned}$$
(118)

and

$$\begin{aligned} k\Delta _\theta = \frac{1}{2}\frac{f'}{r} -\frac{f}{r^2}-Y^{\theta }_{TF}, \end{aligned}$$
(119)

where f is a solution of (41) for a given \(Y_{TF}^{\theta }.\) In more detail, for internal solutions regular at \(r=0,\) we can write:

  • First case \((F(r)=0)\):

    $$\begin{aligned} Z(r) =\frac{1}{2}\bigg (\xi '+ \frac{2re^{-\xi }E}{\sqrt{\mu }\left( 1+E\int \frac{re^{-\xi }}{\sqrt{\mu }}dr\right) }\bigg ) +\frac{1}{r} \end{aligned}$$
    (120)
    • Invariant complexity factor \((Y^{\theta }_{TF}=0)\):

      $$\begin{aligned} \Pi (r) = -k\Delta _0 \end{aligned}$$
      (121)
    • Vanishing complexity factor

      $$\begin{aligned} \Pi (r) = \frac{re^{\nu (0)-\nu }(\nu ''(0))^2(\nu '^2+2\nu '')}{2(\nu ')^3}-\frac{1}{r^2}. \end{aligned}$$
      (122)
  • Second case \(F(r)=f\):

    $$\begin{aligned} Z(r) = \frac{\xi '}{2}\bigg (1+ \frac{2E|\xi '|e^{-(\xi +\xi (0))/2}}{|\xi ''(0)|\xi '-2E|\xi '|e^{-(\xi +\xi (0))/2}}\bigg ) +\frac{1}{r}\nonumber \\ \end{aligned}$$
    (123)
    • Invariant complexity factor \((Y^{\theta }_{TF}=0)\):

      $$\begin{aligned} \Pi (r)= & {} -k\Delta _0 \end{aligned}$$
      (124)
    • Vanishing complexity factor

      $$\begin{aligned} \Pi (r)= & {} \frac{re^{\xi (0)-\xi }(\xi ''(0))^2(\xi '^2+2\xi '')}{2(\xi ')^3}-\frac{1}{r^2}. \end{aligned}$$
      (125)

Therefore, the family of solutions with vanishing and invariant complexity factor obtained in this work could be, as it is expected, described in terms of the generating functions presented in [103].

8 Conclusions

According to the definition given by [19] the complexity factor of spherically symmetric self-gravitating objects is completely determined by the local anisotropy and the energy density of the distribution. It is important to emphasize that the anisotropy in this work is defined as \((\Pi =-\Delta )\) and corresponds to the first term of expression (17). This is relevant because if this sign is not properly handled, it will lead to wrong differential equations when imposing restrictions on \(Y_{TF}.\)

In this work, we implemented the extended geometric deformation method to generate anisotropic solutions of Einstein equations characterized by their complexity factor. This method considers both the temporal and radial deformations of the metric components. As discussed in previous works (see [60, 94]), the EGD leads to a complexity factor composed of two terms. These can be seen from (39), where \(Y_{TF}^0\) corresponds to the complexity factor of the seed solution and \(Y_{TF}^{\theta }\) one can be understood as the complexity factor gravitational source. We can impose constraints on the complexity factor in order to close the system of equations in the GD approach. In particular, we were interested in the cases where the final solution has either the same complexity as the seed or vanishing complexity. These two scenarios were obtained by imposing the appropriate condition over \(Y_{TF}^{\theta }.\)

Now, since we used the EGD method, a condition over the complexity factor of \(\theta _{\mu \nu }\) is not enough to solve the system of equations. Thus, to solve this problem, we imposed conditions over the function \(Z_2-Z_1,\) which is directly related to the function h. We found two different simple possibilities for \(Z_2-Z_1,\) (see (42) and (55)) which lead to solutions of Einstein’s equations with good properties. They were denoted as first and second case, respectively. Now, despite being different, both cases are connected by an interchange between \(\xi \) and \(\nu .\) This feature is closely related to the 2-step GD approach discussed in [96]. In this work, we found the general form of the functions f and h in terms of the seed solution such that it leads to solution with invariant or vanishing complexity factor. For internal solutions, we showed how the regularity at the center of the distribution led to several constraints on the integration constants. Indeed, in both cases, we found that for internal solutions, the invariant complexity condition does not admit any spatial deformation of the metric, i.e., \(f=0,\) if the seed solution is regular at the center. This does not hold for external seed solutions. Thus, when we use internal regular solutions as seed solutions to obtain solutions with invariant complexity factor, the only possible deformation is for the temporal metric component. It also implies that, for regular internal seed solutions, the MGD method with the invariant complexity condition, will lead to a singular solution, at \(r=0,\) unless \(f=0\) \((\theta _{\mu \nu }=0).\) This differs from the results of other recent works, however, we found that the difference is due to a minus sign in the definition of the complexity factor. As we mentioned before, it can be checked that the signs we are using are consistent with the original definition of the complexity factor [19]. It is important to mention that if we do not impose regularity at \(r=0\) for the final solution, which could be the case for an internal solution describing a region that does not include the center or an external solution, the latter result does not hold. It would be interesting explore how the analysis developed in this work could be applied considering as seed external solutions of Einstein’s equations. In this case we could find restrictions for the metric deformations coming for the behavior at \(r\rightarrow \infty .\)

It can be seen that solutions related by MGD will lead to the same solutions with vanishing complexity factor. We found that, for the MGD approach, there is a general expression for f that depends only on the temporal metric component of the seed solution. This holds true for final solutions with invariant or vanishing complexity factor. Thus, it is the same for all the solutions of Einstein’s equations with the same temporal metric component.