1 Introduction

In recent works [1, 2], the Gravitational Decoupling (GD) [3] thorough the Minimal Geometric Deformation extended (MGD-e) [4] (see [5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61] for applications of GD in standard general relativity. For applications in higher dimensions see [62, 63], for example) has been proven as an effective route to explore the energy exchange between relativistic fluids supporting a self-gravitating sphere regardless their nature. Indeed, it is well-known that extracting the information on which source dominates over the others is not trivial but, through GD, the accomplishment of such a task is straightforward.

From a more technical point of view, the construction of solutions through GD by MGD-e requires the implementation of two supplementary conditions (such as metric conditions or equations of state) which allow to find the so-called temporal and radial deformation functions. As we shall see later, although the radial deformation can be obtained independently after imposing some suitable equation of state, obtaining the temporal deformation is not straightforward in general. In this work we demonstrate that the complexity factor introduced in [64] (for recent developments see [65,66,67,68,69,70,71,72,73,74], for example) can be used to obtain a constraint on the metric functions which allow to obtain the temporal deformation analytically. The interest on the complexity factor has increase in recent years given that it provides useful information about how “complex” is a system in comparison with that supported by a homogeneous and isotropic fluid satisfying the so-called vanishing complexity condition. Besides, it provides a non-linear equation of state which allows to complement the required conditions to solve the system of Einstein field equations.

The paper is organized as follows. In Sect. 2, we review the fundamentals of the GD approach to a spherically symmetric system containing two generic sources. In Sect. 3, we introduce the complexity factor and use the vanishing complexity condition to find an analytical expression for the temporal deformation. Besides, we propose a simple protocol to construct well-behaved interior solutions. In Sects. 4 and 5 we test our method by using the well-known Tolman VII and Tolman IV solutions as isotropic seed, respectively. We summarized our results and provide some final comments in the last section.

2 Gravitational Decoupling

The GD is a well-established formalism that allows either the deconstruction of a complex source or the construction of suitable anisotropic solutions from isotropic seeds. The manner in which it works can be found in plenty of paper in detail so here, we shall summarize the method by following Refs. [3, 4] .

Let us consider static and spherically symmetric space-times with a line element parameterized as

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

Using (1) in Einstein’s equationsFootnote 1

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2}g_{\mu \nu }R=k^{2} {\tilde{T}}_{\mu \nu }, \end{aligned}$$
(2)

with

$$\begin{aligned} {\tilde{T}}^{\mu }_{\nu }=diag({\tilde{\rho }},-{\tilde{p}}_{r},-{\tilde{p}}_{t},-{\tilde{p}}_{t}), \end{aligned}$$
(3)

we arrive at

$$\begin{aligned} k^2 {\tilde{\rho }}= & {} \frac{1}{r^2} + e^{-\lambda }\!\left( \frac{\lambda '}{r} - \frac{1}{r^2}\right) \!, \end{aligned}$$
(4)
$$\begin{aligned} k^2 \tilde{p_{r}}= & {} -\frac{1}{r^2} + e^{-\lambda }\!\left( \frac{\nu '}{r} + \frac{1}{r^2}\right) \!, \end{aligned}$$
(5)
$$\begin{aligned} k^2 \tilde{p_{t}}= & {} \frac{e^{-\lambda }}{4}\!\left( 2\nu '' + {\nu '}^2 - \lambda '\nu ' + 2\frac{\nu '-\lambda '}{r} \right) \!. \end{aligned}$$
(6)

Now, let us assume a splitting of the matter sector

$$\begin{aligned} {\tilde{T}}_{\mu \nu } = T_{\mu \nu } + \theta _{\mu \nu }\;, \end{aligned}$$
(7)

with

$$\begin{aligned} T^{\mu }_{\nu }= & {} \text {diag}(\rho ,-p_{r},-p_{t},-p_{t}) \end{aligned}$$
(8)
$$\begin{aligned} \theta ^{\mu }_{\nu }= & {} \text {diag}(\theta _{0}^{0},\theta _{1}^{1}, \theta _{2}^{2},\theta _{2}^{2}), \end{aligned}$$
(9)

and a metric deformation

$$\begin{aligned} \nu \;\;\longrightarrow & {} \;\; \xi + g, \end{aligned}$$
(10)
$$\begin{aligned} e^{-\lambda }\;\;\longrightarrow & {} \;\; e^{-\mu } + f\;, \end{aligned}$$
(11)

where \(\{f,g\}\) are the so-called decoupling functions. Replacing (7), (10) and (11) in (4)–(6), we arrive at

$$\begin{aligned} k^2 \rho= & {} \frac{1}{r^2}-e^{-\mu }\left( \frac{1}{r^2}-\frac{\mu '}{r}\right) , \end{aligned}$$
(12)
$$\begin{aligned} k^2 p_r= & {} -\frac{1}{r^2}+e^{-\mu }\left( \frac{1}{r^2}+\frac{\xi '}{r}\right) , \end{aligned}$$
(13)
$$\begin{aligned} k^2 p_{t}= & {} \frac{e^{-\mu }}{4}\left( 2\xi ''+\xi '^2-\mu '\xi '+2\frac{\xi '-\mu '}{r}\right) , \end{aligned}$$
(14)

and

$$\begin{aligned} k^2\theta _{0}^{0}= & {} -\frac{ f}{r^2}-\frac{f'}{r} \end{aligned}$$
(15)
$$\begin{aligned} k^2\theta _{1}^{1}+ Z_{1}= & {} - f\left( \frac{1}{r^2}+\frac{\nu '}{r}\right) \end{aligned}$$
(16)
$$\begin{aligned} k^2\theta _{2}^{2}+ Z_{2}= & {} -\frac{ f}{4}\left( 2\nu ''+\nu '^2+\frac{2\nu '}{r}\right) \nonumber \\&-\frac{ f'}{4}\left( \nu '+\frac{2}{r}\right) , \end{aligned}$$
(17)

where

$$\begin{aligned} Z_{1}= & {} \frac{e^{-\mu }g'}{r} \end{aligned}$$
(18)
$$\begin{aligned} 4Z_2= & {} e^{-\mu }\left( 2g''+ g'^2+\frac{2g'}{r}+2\xi 'g'-\mu 'g'\right) . \end{aligned}$$
(19)

At this point some comments are in order. First, Eqs. (12)–(14) are automatically satisfied whenever \(\{\xi ,\mu \}\) are supplied as a seed of the system. In this regard, Eqs. (15)–(17) must be solved for \(\{f,g,\theta ^{0}_{0},\theta ^{1}_{1},\theta ^{2}_{2}\}\) after providing two auxiliary conditions to close the system of differential equations. Two conditions that have been broadly used in the construction of interior solutions by GD are the mimic constraint for the pressure, namely \(p_{r}=-\beta \theta ^{1}_{1}\), and the mimic constraint for the density, \(\rho =\beta \theta ^{0}_{0}\), with \(\beta \) a constant. In general, each condition must be supplemented with an extra constraint in order to close the system. Note that, the mimic constraint of the density only involve the radial deformation f so that, finding analytical solutions in this case will depend on the choice of the seed. In contrast, the mimic constrain for the pressure involve both deformation functions \(\{f,g\}\) and, in most of the cases, it is not straightforward to obtain solutions of the coupled system of differential equations. As we shall see in the next section, our protocol demands for equations of state which only involve f.

Second, it is worth noticing that the covariant conservation of the total energy momentum tensor leads to

$$\begin{aligned} \nabla _\sigma \theta ^{\sigma }_{\ \nu } = \frac{g'}{2}\left( \rho +p_{r}\right) \delta ^{\sigma }_{\ \nu } \ . \end{aligned}$$
(20)

which encodes the information of energy-momentum exchange \(\varDelta \,\mathrm{E}\) between the sources, namely

$$\begin{aligned} \varDelta \,\mathrm{E}= \frac{g'}{2}\left( \rho +p_r\right) \ , \end{aligned}$$
(21)

which we can write in terms of pure geometric functions as

$$\begin{aligned} \varDelta \,\mathrm{E}= \frac{g'}{2\,k^2}\frac{e^{-\mu }}{r}\left( \xi '+\mu '\right) \ . \end{aligned}$$
(22)

From the expression (21) we can see that \(g'>0\) yields \(\varDelta \,\mathrm{E}>0\). This indicates \(\nabla _\sigma \theta ^{\sigma }_{\ \nu }>0\), according to the conservation equation (20), which means that the source \(\theta _{\mu \nu }\) is giving energy to the environment. The opposite occurs when \(g'<0\).

Finally, in order to take into account that the metric should be continuous at surface \(\varSigma \) of the star we have to match smoothly the interior metric with the outside, namely

$$\begin{aligned} e^{\nu }\Big |_{\varSigma ^{-}}= & {} \left( 1 - \frac{2M}{r}\right) \Bigg |_{\varSigma ^{+}}\,, \end{aligned}$$
(23)
$$\begin{aligned} e^{\lambda }\Big |_{\varSigma ^{-}}= & {} \left( 1 - \frac{2M}{r}\right) ^{-1}\Bigg |_{\varSigma ^{+}}\,, \end{aligned}$$
(24)
$$\begin{aligned} {\tilde{p}}_r(r) \Big |_{\varSigma ^{-}}= & {} {\tilde{p}}_r(r) \Big |_{\varSigma ^{+}}\,, \end{aligned}$$
(25)

which corresponds to the continuity of the first and second fundamental form across that surface.

In the next section we introduce the complexity factor and establishes a protocol to construct anisotropic solutions with vanishing complexity thorough GD.

3 Complexity factor and the vanishing complexity condition

The complexity factor introduced in [64] has been defined in the context of general relativity. This quantity is a well established concept which, for static and self gravitating spheres reads

$$\begin{aligned} Y_{TF} = 8\pi \varPi - \frac{4\pi }{r^3}\int ^{r}_{0} {\tilde{r}}^3 {\tilde{\rho }}' d{\tilde{r}}, \end{aligned}$$
(26)

with \(\varPi ={\tilde{p}}_{r}-{\tilde{p}}_{t}\), and captures the essence of the least complex system corresponding to that supported by a homogeneous and isotropic fluid. In this case, \(Y_{TF}=0\) and corresponds to a system with vanishing complexity. However, it is worth noticing that the complexity factor \(Y_{TF}\), also vanish for all configurations where

$$\begin{aligned} \varPi = \frac{1}{2 r^3}\int ^{r}_{0} {\tilde{r}}^3 {\tilde{\rho }}' d{\tilde{r}}. \end{aligned}$$
(27)

which may be regarded as a non-local equation of state, so we can use it to impose a plausible condition on the physical variables when solving the Einstein equations.

Note that by using Einstein’s equation, Eq. (26) can be written as

$$\begin{aligned} Y_{TF}=\frac{e^{-\lambda } \left( \nu ' \left( r \lambda '-r \nu '+2\right) -2 r \nu ''\right) }{4 r}, \end{aligned}$$
(28)

so that \(Y_{TF}=0\) implies

$$\begin{aligned} \nu ' \left( r \lambda '-r \nu '+2\right) -2 r \nu ''=0, \end{aligned}$$
(29)

which can be expressed as a total derivative

$$\begin{aligned} \frac{d}{dr}\left( \log \nu '+\frac{\nu -\lambda }{2}-\log r\right) =0. \end{aligned}$$
(30)

Next, we arrive at

$$\begin{aligned} \log \nu '+\frac{\nu -\lambda }{2}-\log r=constant, \end{aligned}$$
(31)

from where, taking the exponential function at both sides leads to

$$\begin{aligned} e^{\nu /2}\nu '={\tilde{\alpha }} r e^{\lambda /2} \end{aligned}$$
(32)

with \({\tilde{\alpha }}\) a constant. Now, if we define,

$$\begin{aligned} \nu =2\log u \end{aligned}$$
(33)

we obtain

$$\begin{aligned} u'=\alpha r e^{\lambda /2}, \end{aligned}$$
(34)

with \(\alpha ={\tilde{\alpha }}/2\). In this regard, after solving Eq. (34), we can obtain \(\nu \) analytically from Eq. (33). This procedure is advantageous in the context MGD-e where \(\nu =\xi +g\), so that

$$\begin{aligned} g=2\log u-\xi . \end{aligned}$$
(35)

At this point a couple of comments are in order. First, note that Eq. (35) allows to obtain g in terms of the seed \((\xi ,\mu )\) and the radial deformation f. Of course, this requires the previous computation of the radial deformation by assuming some equation of state which only involve f and its derivatives. Now, that Eq. (35) admits analytical solutions or not will depend critically on the choice of both the seed and the equation of state. Second, once the integration is accomplished, the total solution automatically fulfills the vanishing complexity condition by construction.

Based on the above results, let us propose the following protocol to obtain interior solutions with vanishing complexity by GD through MGD-e:

  1. 1.

    Consider a seed metric \(\{\xi ,\mu \}\).

  2. 2.

    Impose an equation of state which only involve f(r), in particular, the mimic constrain for the density (for example).

  3. 3.

    With f, construct \(e^{-\lambda }=e^{-\mu }+f\) and replace it in Eq. (34) to solve for u(r).

  4. 4.

    Use the result obtained for u(r) to obtain \(\nu \) from (33).

In the next sections, we shall implement the protocol using the Tolman VII and Tolman IV solution as seeds.

4 Like-Tolman VII solution

Recently, the Tolman VII solution [75] has grabbed the attention in the community given that it allows to represent neutron stars with realistic equations of state [76,77,78,79,80,81], contrary to the famous internal Schwarzschild solution which is sourced by an uniform distribution of energy [82, 83]. An anisotropic version of the Tolman VII solution was reported in [84]. Besides, extremely compact Tolman VII solutions were treated in [81] while the exact version was recently found by numerical solution of the Einstein equations in [85].

In this section we shall use the Tolman VII solution as a seed \(\{\xi ,\mu ,\rho , p\}\) for perfect fluids [75], namely,

$$\begin{aligned} e^{\xi }= & {} B^2 \sin ^2\log \left( \sqrt{\frac{\exp \left( -\frac{\mu (r)}{2}\right) +\frac{2 r^2}{A^2}-\frac{A^2}{4 R^2}}{C}}\right) \end{aligned}$$
(36)
$$\begin{aligned} e^{-\mu }= & {} 1-\frac{r^2}{R^2}+\frac{4 r^4}{A^4} \end{aligned}$$
(37)
$$\begin{aligned} \rho= & {} \frac{1}{8 \pi }\left( \frac{3}{R^2}-\frac{20 r^2}{A^4}\right) , \end{aligned}$$
(38)
$$\begin{aligned} p= & {} \frac{4 A^2 R^2 \varXi (r) \cot \varPsi (r) -A^4+4 r^2 R^2}{8 \pi A^4 R^2} \end{aligned}$$
(39)
$$\begin{aligned} \varXi= & {} \sqrt{\frac{4 r^4}{A^4}-\frac{r^2}{R^2}+1} \end{aligned}$$
(40)
$$\begin{aligned} \varPsi= & {} \frac{1}{2} \log \left( \frac{\varXi (r)+\frac{2 r^2}{A^2}-\frac{A^2}{4 R^2}}{C}\right) , \end{aligned}$$
(41)

where R is the radius of the stellar configuration and the constants A, B and C are determined by the matching conditions in Eqs. (23)–(25) with \(f_R=g_R=0\), which leads to

$$\begin{aligned} A= & {} \left( \frac{4R^{5}}{R-2M}\right) ^{1/4} \end{aligned}$$
(42)
$$\begin{aligned} B= & {} \sqrt{\frac{5M^{2}-4MR+R^{2}}{R(R-2M)}} \end{aligned}$$
(43)
$$\begin{aligned} C= & {} \frac{(3 R-8 M) e^{-2 \cot ^{-1}\left( \frac{M}{R-2 M}\right) }}{2 \sqrt{R(R-2 M)}}, \end{aligned}$$
(44)

with the compactness \(M/R<4/9\), and M the total mass. The expressions in Eq. (42) ensure the geometric continuity at \(r=R\).

Following the protocol in Sect. 3, the next step is to consider an equation of state which only involve f(r). We note that, given the simple form of (38), in this case is appropriate to implement the mimic constraint for the density, namely

$$\begin{aligned} \theta ^{0}_{0}=\beta \rho , \end{aligned}$$
(45)

with \(\beta \) a constant, from where

$$\begin{aligned} \frac{f'}{r}+\frac{f}{r^2}=\beta \left( \frac{20r^2}{A^4}-\frac{3}{R^2}\right) . \end{aligned}$$
(46)

Solving (46) leads to

$$\begin{aligned} f=\beta \left( \frac{4 r^4}{A^4}-\frac{r^2}{R^2}\right) , \end{aligned}$$
(47)

so that the total radial metric reads

$$\begin{aligned} e^{-\lambda }=1+(1+\beta ) \left( \frac{4 r^4}{A^4}-\frac{r^2}{R^2}\right) . \end{aligned}$$
(48)

Replacing in (34), we obtain

$$\begin{aligned} u=\frac{\alpha A^2}{2 \left( 4 \sqrt{\beta +1}\right) } \log \left( \frac{\eta _{+}+A^4}{\eta _{-}-A^4}\right) +c_{1} \end{aligned}$$
(49)

with

$$\begin{aligned} \eta _{\pm }=4 R \left( \sqrt{A^4 \left( \frac{R^2}{\beta +1}-r^2\right) +4 r^4 R^2}\pm 2 r^2 R\right) , \end{aligned}$$
(50)

from where \(\nu \) and g can be easily determined through (33) and (35). After implementing the matching conditions, all the parameters can be expressed in terms of \(\{R,M,\beta \}\), namely

$$\begin{aligned} A= & {} \frac{\sqrt{2} \root 4 \of {\beta +1} R^{5/4}}{\root 4 \of {-2 M+\beta R+R}} \end{aligned}$$
(51)
$$\begin{aligned} c_{1}= & {} -\frac{M \log \left( \frac{\varTheta _+}{\varTheta _-}\right) \sqrt{\frac{R^6 (R-2 M)}{-2 M+\beta R+R}}+4 R^3 (R-2 M)}{4 R^{7/2} \sqrt{R-2 M}} \end{aligned}$$
(52)
$$\begin{aligned} \alpha= & {} \frac{4 \left( c_1 \sqrt{R}+\sqrt{R-2 M}\right) \sqrt{-2 M+\beta R+R}}{R^3 \log \left( \frac{\varTheta _+}{\varTheta _-}\right) } \end{aligned}$$
(53)

with

$$\begin{aligned} \varTheta _{\pm }= & {} 4 M \left( \sqrt{\frac{R^6 (R-2 M)}{-2 M+\beta R+R}}-R^3\right) \nonumber \\&\pm (\beta +1) R \left( R^3-2 \sqrt{\frac{R^6 (R-2 M)}{-2 M+\beta R+R}}\right) \end{aligned}$$
(54)

The obtained solution satisfies the basic requirements of an interior solution as shown in Fig. 1.

Fig. 1
figure 1

Metric functions \(\{e^{\nu },e^{-\lambda }\}\) (left panel) and matter sector\(\{10^{2}\times {\tilde{\rho }}\), \(10^{3}\times {\tilde{p}}_{r},10^{3}\times {\tilde{p}}_{t}\}\) (right panel) as a function of the radial coordinate r, for \(M/R=0.2\) and \(\beta =-0.52\) for the like-Tolman VII model

Another interesting point that can be discussed is the exchange of energy between the generic fluid \(\theta _{\mu \nu }\) and the perfect fluid given by Eq. (22). First of all, we note that although the total solution does not depends on the parameter C appearing in the seed metric (36), the expression for the exchange of energy does so that such a parameter is free. The interesting feature is that, depending on its values, we observe a transition between situations in which \(\varDelta E>0\) (generic fluid giving energy) to situations where \(\varDelta E<0\) (perfect fluid giving energy) as shown in Fig. 2.

Fig. 2
figure 2

Left panel: exchange of energy \(10^{2}\times \varDelta E\) for different values of C. Right panel: density plot of the exchange of energy for \(C=-1\) for the like-Tolman VII model. In both cases we have taken \(M/R=0.2\) and \(\beta =-0.52\)

5 Like-Tolman IV solution

In this section we shall consider the Tolman IV solution [75] as a seed to test our method with a different condition involving f. In this case the metric reads

$$\begin{aligned} e^{\xi }= & {} B^{2}\left( 1+\frac{r^{2}}{A^{2}}\right) \end{aligned}$$
(55)
$$\begin{aligned} e^{-\mu }= & {} \frac{(C^{2}-r^{2})(A^{2}+r^{2})}{C^{2}(A^{2}+2r^{2})} \end{aligned}$$
(56)
$$\begin{aligned} \rho= & {} \frac{3A^{4}+A^{2}(3C^{2}+7r^{2})+2r^{2}(C^{2}+3r^{2})}{8 \pi C^{2}(A^{2}+2r^{2})^{2} }, \end{aligned}$$
(57)
$$\begin{aligned} p= & {} \frac{C^{2}-A^{2}-3r^{2}}{8 \pi C^{2}(A^{2}+2r^{2})} \end{aligned}$$
(58)

where R is the radius of the stellar configuration and the constants A, B and C are determined by the matching conditions in Eqs. (23)–(25) with \(f_R=g_R=0\)

By simple inspection of Eq. (57), we note that the imposition of the mimic constraint for the density is not convenient in this case. Instead, we shall impose the mimic constraint for the mass function, namely

$$\begin{aligned} m(r)=\beta m_{\theta }(r), \end{aligned}$$
(59)

which (taking \(\beta =1\) for simplicity) leads to

$$\begin{aligned} \frac{r}{2}(1-e^{-\mu })=-\frac{r}{2}f \end{aligned}$$
(60)

Now, replacing (55) in (60) we obtain

$$\begin{aligned} f=-\frac{r^2 \left( A^2+c^2+r^2\right) }{c^2 \left( A^2+2 r^2\right) }. \end{aligned}$$
(61)

It is worth mentioning that, as far as we known, this is the first time that such a constraint is considered. Besides, it results advantageous in the sense that the radial deformation can be obtained algebraically.

Next, by solving Eq. (34), we obtain

$$\begin{aligned} u=\eta \ _2F_1\left( 1,\frac{5}{4};\frac{7}{4};\frac{\left( A^2+2 r^2\right) ^2}{A^4+2 c^2 A^2}\right) +c_{1}, \end{aligned}$$
(62)

with \(_2F_1\left( a,b;c;z\right) \) the hypergeometric function and

$$\begin{aligned} \eta =\frac{\alpha C^2 \left( A^2+2 r^2\right) ^2 \sqrt{\frac{A^2 \left( c^2-2 r^2\right) -2 r^4}{c^2 \left( A^2+2 r^2\right) }} \, }{3 A^2 \left( A^2+2 c^2\right) }. \end{aligned}$$
(63)

Following the protocol, \(\nu \) and g can be easily determined through (33) and (35). After implementing the matching conditions, all the parameters can be expressed in terms of \(\{R,M,C\}\) but the expression are too long to be shown here.

It is worth noticing that the solution satisfies the basic requirements of an interior solution as shown in Fig. 3 whenever \(C\approx 1.5\).Footnote 2

Fig. 3
figure 3

Metric functions \(\{e^{\nu },e^{-\lambda }\}\) (left panel) and matter sector \(\{10^{2}\times 2{\tilde{\rho }}\),\(10^{3}\times {\tilde{p}}_{r},10^{3}\times {\tilde{p}}_{t}\}\) (right panel) as a function of the radial coordinate r, for \(M/R=0.2\) and \(C=1.5\) for the like-Tolman IV model

The exchange of energy is shown in Fig. 4. In contrast to the previous case, in this case the physical solution has associated \(\varDelta E<0\) which corresponds to the situation in which the generic source gives energy to to the perfect fluid.

Fig. 4
figure 4

Left panel: exchange of energy \(10^{3}\times 2\varDelta E\) for different values of C. Right panel: density plot of the exchange of energy for \(C=1.5\) for the like-Tolman IV model. In both cases \(M/R=0.2\)

6 Conclusions

The Gravitational Decoupling by the Minimal Geometric Deformation is a invaluable tool in the construction of well-behaved solutions. However, it extended version, requires dealing with non-trivial differential equations for the deformation metrics and sometimes obtaining analytical solutions for both functions is simply not possible. In this regard, in this work we proposed a simple protocol to simplify the differential equations arising from the Gravitational Decoupling by the Minimal Geometric Deformation extended. More precisely, we used the well-established definition of complexity for self-gravitating spheres to obtain a simple constraint between the radial and the temporal components of a general metric for static and spherically symmetric spacetimes. It is worth mentioning that our method works whenever the supplementary condition only involve the radial deformation.

In order to test our protocol, we used both the Tolman VII and Tolman IV solutions as seeds. In the former case, we used the mimic constraint for the density which (as required by the method) only involve the deformation f. In this case, given the simple form of the radial metric, we obtained analytical expressions for the total solution. However, in latter case, the mimic constraint is not suitable for the implementation of the protocol so we used a mimic constraint for the mass function that, as far as we know, has not been explored before. We found that this constraint leads to (semi) analytical expressions for the total solution involving hypergeometric functions. In both cases, we obtain new anisitropic systems with nonvaishing complexity satisfying the basic requirements of an interior solution. Additionally, we obtained the exchange of energy between the perfect fluid and the generic source \(\theta _{\mu \nu }\) and, in contrast to the results reported in previous works, in our case the generic fluid can give or receive energy from the perfect fluid in the case of Tolman VII depending on the value taken by the free parameter involved. Besides, the generic fluid only give energy to the perfect fluid in the case of Tolman IV.