1 Introduction

The idea that the endpoint of stellar evolution of sufficiently massive and compact stars is a black hole can be tested by exploring the consequences of the existence of very compact objects, which would offer a window to extreme relativistic effects, and point out to new physics (for a review see [1]). In the realm of General Relativity, there are currently many examples of such objects : boson stars [2], gravastars [3], wormholes [4, 5], quasi-black holes [6], and superspinars [7], among others which, under reasonable assumptions, obey the Buchdahl limit (\(M/R<4/9\)) [8]. In the family of compact objects, those that are ultra-compact (UCOs) are particularly interesting. In the static and spherically symmetric case they obey \(2M<R<3M\) [9]. Hence they have a photosphere, and a second - stable - light ring [10, 11], that give rise to a trapping zone for particles with zero mass. Such a zone may have important consequences for gravitational perturbations [12],Footnote 1 since some of their modes can decay very slowly [14], and source nonlinear effects which may destabilize the system [15].

The simplest UCO in GR is the one described by the Schwarzschild solution [16]. Several aspects of this model have been studied, such as its stability under radial perturbations [17], and its mode structure [12]. The constant density star has also been used to model the gravitational-wave echoes of the remnant of neutron-star binary coalescences [18], and to describe gravastars (by going beyond the Buchdahl limit) [19,20,21,22]. The slowly-rotating generalization of the homogeneous star was obtained in [23], while the influence of a nonzero cosmological constant was considered in [13, 24,25,26,27].Footnote 2 The goal of the present work is to study the features of a simple UCO, inspired in the constant density star, when a theory different from GR is considered. In particular, we shall concentrate here in \(f(\mathcal {R})\) theories of gravity in their Palatini version (see [31, 32] for reviews). Such theories offer an alternative to GR, and their consequences have been widely studied in compact objects (see for instance [33,34,35]).Footnote 3

We shall consider a model described by a density that is almost constant inside the object, and falls smoothly to zero near the surface.Footnote 4 It will be shown that the models built with this density profile in the theory given by \(f(\mathcal {R})=\mathcal {R}+\lambda \mathcal {R}^2\) are everywhere regular.Footnote 5 This type of \(f(\mathcal {R})\) has been frequently employed both in the metric and the Palatini formalism. In the latter, among many examples we can cite the following: charged black hole solutions with nonlinear electrodynamics as a source have been analysed in [42] (and their quasinormal modes in [43]), wormholes solutions in [44], and nonsingular black holes in [45]. The ratio of crustal to the total moment of inertia of NSs in this theory was calculated in [46]. The structure of neutron stars focusing in the role of the derivatives of the equation of state was studied in [33]. Polytropic stars in the Ehlers–Pirani–Schild approach to Palatini \(\mathcal {R}\)-squared gravity have been considered in [34].Footnote 6

The paper is structured as follows. The modified TOV equations for \(f(\mathcal {R})\) a la Palatini are presented in Sect. 2. The results obtained by numerical integration of such equations, paying special attention to the compactness and the central pressure, and to the comparison with the model obtained with the same density profile in GR, will be displayed in Sect. 3. An examination of the trapping zones using the effective potential will be given in Sect. 4. Our closing remarks are presented in Sect. 5.

2 Stellar structure in \({f(\mathcal {R})}\) Palatini gravity

The modified Hilbert-Einstein action is given by

$$\begin{aligned} S[g_{\mu \nu },\Gamma ,\psi _\mathrm{m}]=\frac{1}{16 \pi }\int {\mathrm{d}^4x \sqrt{-g}\; f(\mathcal {R})} + S_\mathrm{m}[g_{\mu \nu },\psi _\mathrm{m}], \end{aligned}$$
(1)

where \(f(\mathcal {R})\) is a function of the Ricci scalar \(\mathcal {R}\equiv g^{\mu \nu }\mathcal {R}_{\mu \nu }(\Gamma )\), with \(\mathcal {R}_{\mu \nu }(\Gamma )=-\partial _\mu \Gamma ^{\lambda }_{\lambda \nu }+ \partial _\lambda \Gamma ^{\lambda }_{\mu \nu }+ \Gamma ^\lambda _{\mu \rho }\Gamma ^{\rho }_{\nu \lambda }- \Gamma ^{\lambda }_{\nu \rho }\Gamma ^{\rho }_{\mu \lambda }\). In the Palatini formalism [50], both the metric and the connection \(\Gamma \) are taken as independent fields. The matter action \(S_\mathrm{m}\) depends on the matter fields \(\psi _\mathrm{m}\) and the metric \(g_{\mu \nu }\). The field equations, obtained by varying the action with respect to the metric and the connection [51], are given by

$$\begin{aligned}&f_\mathcal {R}(\mathcal {R})\mathcal {R}_{\mu \nu }(\Gamma )-\frac{1}{2}f(\mathcal {R}) g_{\mu \nu } = 8\pi T_{\mu \nu }\,, \end{aligned}$$
(2)
$$\begin{aligned}&\nabla _{\rho }\left[ \sqrt{-g}\left( \delta ^{\rho }_{\lambda }f_\mathcal {R}g^{\mu \nu } -\frac{1}{2}\delta ^{\mu }_{\lambda }f\mathcal {R}g^{\rho \nu }-\frac{1}{2}\delta ^{\nu }_{\lambda }f_\mathcal {R}g^{\mu \rho } \right) \right] =0,\nonumber \\ \end{aligned}$$
(3)

where \(f_\mathcal {R}\equiv \mathrm{d}f/\mathrm{d}\mathcal {R}\) and \(T_{\mu \nu }\equiv (2 / \sqrt{-g}) \delta S_{m}/\delta g^{\mu \nu }\) is the energy-momentum tensor, which satisfies the conservation equation

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

The trace of Eq. (2) yields

$$\begin{aligned} f_\mathcal {R}(\mathcal {R})\mathcal {R}-2f(\mathcal {R})=8\pi T. \end{aligned}$$
(5)

For a given \(f(\mathcal {R})\), this algebraic equation yields the scalar curvature \(\mathcal {R}\) as a function of the trace T of the energy-momentum tensor.

The stellar structure is computed by assuming a spherically-symmetric and static metric with line element

$$\begin{aligned} \mathrm{d}s^2=-e^{\,A(r)}\mathrm{d}t^2+e^{\,B(r)}\mathrm{d}r^2+r^2(\mathrm{d}\theta ^2+\sin ^2{\theta }\mathrm{d}\phi ^2), \end{aligned}$$
(6)

and a perfect-fluid matter with energy-momentum tensor \(T_{\mu \nu }=(\rho + p)u_\mu u_\nu + p g_{\mu \nu }\), where \(\rho (r)\) is the density and p(r) is the pressure, and \(u^\mu \) the four-velocity of the fluid. Under these assumptions, Eq. (4) yields

$$\begin{aligned} p'=-\frac{A'}{2}(\rho +p)\, , \end{aligned}$$
(7)

where the prime denotes derivative with respect to the radial coordinate, r. The tt and rr components of the field equations (2) are [52, 53]

$$\begin{aligned} A'= & {} -\frac{1}{1+\gamma _0} \left( \frac{1-e^{B}}{r} - \frac{e^{B}}{f_\mathcal {R}} 8 \pi r p + \frac{\alpha _0}{r} \right) \,, \end{aligned}$$
(8)
$$\begin{aligned} B'= & {} \frac{1}{1+\gamma _0} \left( \frac{1-e^{B}}{r} + \frac{e^{B}}{f_\mathcal {R}} 8 \pi r \rho + \frac{\alpha _0 + \beta _0}{r} \right) , \end{aligned}$$
(9)

where

$$\begin{aligned} \alpha _0\equiv & {} r^2 \left[ \frac{3}{4} \left( \frac{f_\mathcal {R}'}{f_\mathcal {R}} \right) ^2 + \frac{2 f_\mathcal {R}'}{ r f_\mathcal {R}} + \frac{e^B}{2} \left( \mathcal {R}- \frac{f}{f_\mathcal {R}}\right) \right] , \end{aligned}$$
(10)
$$\begin{aligned} \beta _0\equiv & {} r^2 \left[ \frac{f_\mathcal {R}''}{f_\mathcal {R}} -\frac{3}{2} \left( \frac{f_\mathcal {R}'}{f_\mathcal {R}} \right) ^2\right] , \end{aligned}$$
(11)
$$\begin{aligned} \gamma _0\equiv & {} \frac{r f_\mathcal {R}' }{2f_\mathcal {R}}, \end{aligned}$$
(12)

are dimensionless. Using Eq. (8) in Eq.(7), and introducing the mass parameter \(m(r)\equiv r(1-e^{-B})/2\), the generalised TOV equations take the form [41, 53]

$$\begin{aligned} p'= & {} -\frac{1}{1+\gamma _0}\ \frac{\rho + p}{r(r-2 m)} \left[ m+\frac{4 \pi r^3 p}{f_\mathcal {R}} - \frac{\alpha _0}{2} (r - 2 m) \right] \,, \nonumber \\ \end{aligned}$$
(13)
$$\begin{aligned} m'= & {} \frac{1}{1+\gamma _0} \left[ \frac{4 \pi r^2 \rho }{f_\mathcal {R}} + \frac{\alpha _0 + \beta _0}{2} -\frac{m}{r}(\alpha _0 + \beta _0- \gamma _0) \right] \,. \nonumber \\ \end{aligned}$$
(14)

For a given \(f({\mathcal {R}})\), the functions A(r), B(r), \(\rho (r)\), and p(r) determine the stellar structure of a model governed ultimately by the field equations (2), (3), and obeying the conservation equation (4). The boundary conditions are the usual ones ( \(p(0)=p_c\) and \(m(0)=0\)), and an equation that defines the form of the energy density is to be added to the system for the numerical integration (see below). Since Birkhoff’s theorem is valid in \(f({\mathcal {R}})\)-Palatini theories (see for instance [32]), the exterior solution of our models is the Schwarzschild-de Sitter solution. Therefore, at the surface of the star, defined by \(p({R})=0\), we have \(A(r={R})= \ln (1-2M/{R}-\Lambda {R}^2)\), where \(\Lambda =\mathcal {R}_*/4\), and the mass of the configuration is given by

$$\begin{aligned} M=m({R})-\frac{{\mathcal {R}}_*{R}}{3}, \end{aligned}$$

where \({\mathcal {R}}_*\) is the solution of Eq. (5) for \(T=0\), and R is the radius of star.

Let us point out that Eqs. (13) and (14) are very different from those corresponding to the GR case (i.e. for \(\alpha _0=\beta _0=\gamma _0=0\)). Leaving aside both the overall \(1/(1+\gamma _0)\) factor on the rhs of both equations and the important changes brought by the explicit form of \(\alpha _0\), \(\beta _0\), and \(\gamma _0\) (to be discussed below), the rhs of Eq. 14 depends on both \(\rho \) and m.

To solve the system numerically, the dependence of \(\alpha _0\), \(\beta _0\), and \(\gamma _0\) with R and its derivatives is written in terms of \(\rho \), p, and their derivatives using Eq. (5).Footnote 7 From now on, we will work with the so-called \(\mathcal {R}\)-squared gravity, characterised by the function \(f(\mathcal {R})=\mathcal {R}+\lambda \mathcal {R}^2\), where \([\lambda ]=L^2\). It follows from Eq. (5) thatFootnote 8\(\mathcal {R}=-8 \pi T =-8 \pi (-\rho + 3p)\) Hence, the energy density and the pressure appear on the r.h.s. of Eqs. (13) and (14), as well as their first and second derivatives. Although, under some assumptions, the dependence on such derivatives leads to the appearance of singularities at the surface of stars built with the equations presented above [52], we shall see in the next section that the model introduced here is everywhere regular.

3 Results

The results of the numerical integration of the system (13)-(14) will be presented next, assuming the following form of the matter density:

$$\begin{aligned} \rho (r) = \frac{\rho _0}{1+\exp \left[ {\frac{r-q}{\Delta }}\right] }, \end{aligned}$$
(15)

where \(\rho _0\), q and \(\Delta \) are parameters. Such a form improves the case \(\rho =\) constant by replacing the abrupt fall to zero of the latter at the surface of the star with a transition zone, which can be considered as a first approach to an atmosphere. In fact, this form of the density smooths out discontinuities of the constant density model at the surface of the star both for GR (where the density as well as the first derivative of the metric component \(g_{rr}\) and of the pressure are -inconsequentially- discontinuous, see the Appendix), and for the model considered here, as will be shown below.

In the following we shall present the results of the integration of the modified TOV system with the density profile given above, for different values of the parameters (the results for GR are presented in the Appendix).Footnote 9 Let us recall that to integrate the system of first order differential equations we need to specify \(p(0)\equiv p_c\), and \(m(0)=0\), as well as the value of the parameters \(\lambda \), and \(\rho _0\) . Numerical integration then provides \(M=M(p_c, \rho _0,\lambda )\) and \({R}={R}(p_c, \rho _0,\lambda )\). In the following, we shall choose to render the parameters dimensionless using R, the radius of each configuration. Such a choice reduces the number of parameters and yields, upon integration, directly the compactness \(\bar{M} = M/{R}\), at the price of disposing of the values of the radius and the mass of each configuration, a fact that does not have any impact on our results, see next section.Footnote 10 It also entails that \(\bar{p}(\bar{r}=1)=0\) in all cases, and permits the construction of point plots of the form \(\bar{p}_c=\bar{p}_c(\bar{\rho }_0, \bar{\lambda })\) and \(\bar{M}=\bar{M}(\bar{\rho }_0, \bar{\lambda })\), among others.

Before presenting the results, it is important to point out that we shall only consider sets of parameters such that the surface of the star is located after the region in which the density falls exponentially to zero, as shown in Fig. 1. Note that at the zero of the pressure (located at \(\bar{r}=1\)), the energy density is extremely small.

Fig. 1
figure 1

The plot shows an example of the radial dependence of the density and the pressure of the models considered here

There is a limited range of values of \(\bar{\lambda }\) and \(\bar{\rho }_0\) that allow for this type of configuration. This in turn leads to limits on \(\bar{p}_c\) and \(\bar{M}\).Footnote 11 Other configurations are possible, for instance those in which the pressure decays slower than the density, and approaches zero from above the latter. Since these models lead to configurations with a very small \(\bar{M}\), we shall not study them here.

Let us begin by showing the values of the central pressure as a function of \(\bar{\rho }_0\) for fixed \(\bar{\lambda }\), see Fig. 2.

Fig. 2
figure 2

\(\bar{p}_c\) as a function of \(\bar{\rho }_0\), for various values of \(\bar{\lambda }>0\) (upper panel) and \(\bar{\lambda }<0\) (lower panel)

Note that, contrary to what the plots seem to indicate, the central pressure is finite for all values of \(\bar{\lambda }\), since for each of them there is a maximum value of \(\bar{\rho }_0\) which, along with the corresponding value of \(\bar{p}_c\), is such that the pressure decays faster than the density, as in Fig. 1. By incrementing \(\bar{\lambda }\) beyond that value, the model changes to the non-compact type alluded to above. The plots in Fig. 2 show that for \(\bar{\rho }_0\) up to approximately 0.095, there are no appreciable differences between the values of \(\bar{p}_c\) with \(\bar{\lambda }\ne 0\) and those of GR. For higher densities, the behaviour is strongly dependent of the sign of \(\bar{\lambda }\). For a given \(\bar{\rho }_0\), the values of \(\bar{p}_c\) for positive \(\bar{\lambda }\) are larger than those corresponding to GR.

In the case of \(\bar{\lambda }<0\), for a given value of \(\bar{p}_c\) larger than approximately 0.20 , there are configurations with a higher (sometimes much higher) value of \(\bar{\rho }_0\). Also, for densities higher than \(\approx 0.15\), the central pressure can be substantially larger than that of GR, and for a given \(\bar{\rho }_0\) in that region the pressure is higher for smaller \(|\bar{\lambda }|\). It is important to point out that, as in the case of GR with density profiles of the form \(\rho =\rho _0 \chi (r)\), where \(\chi \) is dimensionless, it follows from the modified TOV equations that \(p_c\) must have the form \(p_c=\rho _0 g(\bar{\rho }_0,\bar{\lambda })\), where g is dimensionless. Hence, the curves \(p_c\times \rho _0\) for any fixed \(\lambda \) and R will look like the ones displayed in Fig. 2.

The variation of \(\bar{p}_c\) with \(\bar{\lambda }\), for several values of \(\bar{\rho }_0\) is displayed in Fig. 3. The interval of values for \(\bar{\rho }_0\) was chosen in the figure to analyze the behaviour of the configurations with high \(\bar{p}_c\) in the case of \(\bar{\lambda }>0\) (see Fig. 2).

Fig. 3
figure 3

Central pressure as a function of \(\bar{\lambda }\) for different values of \(\bar{\rho }_0\)

Fig. 4
figure 4

\(\bar{M}\) as a function of \(\bar{\lambda }\), for different values of \(\bar{\rho }_0\)

The plots show that, in the interval of \(\rho _0\)Footnote 12 considered here, \(p_c\) is always higher (lower) than the GR case for \(\lambda >0\) (\(<0\)). Also, for a given \(\rho _0\) the central pressure of the configurations grows with \(\lambda \). The models that have central pressure much larger than that of the GR case are those with smaller \(\lambda \) and higher \(\rho _0\).

Figure 4 exhibits the compactness \(\bar{M}=M/{R}\) in terms of \(\bar{\lambda }\) for fixed \(\bar{\rho }_0\).Footnote 13 It is seen that \(\bar{M}\) as a function of \(\bar{\lambda }\), for fixed \(\bar{\rho }_0\), behaves as the central pressure does, for values of \(\bar{\rho }_0\) chosen as in Fig. 3. In particular, objects with \(\bar{\lambda }>0\) are more compact than those with \(\bar{\lambda }\le 0\), for any \(\bar{\rho }_0\), and the latter are less compact than those of GR. These configurations would be in agreement with the idea that the \(\mathcal {R}\)-squared term strengthens or weakens gravity according to the sign of \(\bar{\lambda }\).Footnote 14 However, we shall see below that there are configurations they do not behave like this.

Figure 5 show the dependence of \(\bar{M}\) with \(\bar{\rho }_0\) for different values of \(\bar{\lambda }\).

Fig. 5
figure 5

\(\bar{M}\) as a function of \(\bar{\rho }_0\), for varios values of \(\bar{\lambda }>0\) (upper panel) and \(\bar{\lambda }<0\) (lower panel)

It is seen that for any \(\bar{\lambda }\ne 0\), the compactness starts to depart from the GR case at low densities, yielding slightly higher (lower) values of \(\bar{M}\) than those of the GR case for \(\bar{\lambda }< 0\) (\(>0\)). At densities of approximately 0.095, \(\bar{M}\) is very close to that of GR for any \(\bar{\lambda }\). The behaviour for higher \(\bar{\rho }_0\) depends on the sign of \(\bar{\lambda }\). For positive, the maximum \(\bar{M}\) attained in the model was approximately 0.42, while for \(\bar{\lambda }<0\), \(\bar{M}\) can be close to the Buchdahl limit in GR. The fact that there are configurations with \(\bar{M}\) higher than that of GR in the model explored here is also displayed in the plot of \(\bar{p}_c\) against \(\bar{M}\), see Fig. 6.Footnote 15

Fig. 6
figure 6

Central pressure as a function of \(\bar{M}\)

The variation of the pressure as a function of \(\bar{r}\) for fixed \(\bar{\rho }_0\) is shown in Fig. 7 (for \(\bar{\lambda }>0\)) and Fig. 8 (\(\bar{\lambda }<0\)). The pressure and its derivatives go smoothly to zero at the surface of the star.

Fig. 7
figure 7

Dependence of \(\bar{p}\) with \(\bar{r}\), for \(\bar{\rho }_0=0.100\) (upper panel), and \(\bar{\rho }_0=0.113\) (lower panel)

Fig. 8
figure 8

Pressure as a function of r for different values of \(\bar{\lambda }\) and \(\bar{\rho }_0=0.110\) (upper panel), and \(\bar{\rho }_0=0.116\) (lower panel)

Figures 9 and 10 show \(\bar{m}\) as a function of \(\bar{r}\) for several values of \(\bar{\lambda }\) and \(\bar{\rho }_0\). The presence of extrema in the transition zone is to be expected, following the discussion in [33].

Fig. 9
figure 9

\(\bar{m}\) as a function of \(\bar{r}\), for \(\bar{\rho }_0=0.100\) (upper panel), and \(\bar{\rho }_0=0.110\) (lower panel)

Fig. 10
figure 10

\(\bar{m}(r)\) as a function of \(\bar{r}\) for different values of \(\bar{\lambda }<0\) and \(\bar{\rho }_0=0.110\) (upper panel), and \(\bar{\rho }_0=0.116\) (lower panel)

Notice that, from the plots, \(\bar{m}\) is finite and continuous at \( r= {R}\), while \(\bar{m}'\) is finite but has an inconsequential discontinuity there. Since A and its derivatives are finite and continuous at the surface (see next section), tidal forces are finite at the surface of the star. Hence, the models presented here are everywhere regular, and free of the problems pointed out in [52].Footnote 16

In the next section we shall examine the trapping regions associated to the compact configurations presented above.

4 Effective potential and trapping regions

As shown next, the models under consideration display regions in which zero mass particles are trapped. Such trapping regions are of importance because they may accommodate long-lived axial gravitational perturbations, which in turn may lead to nonlinear effects that destabilize the system [12]. Following [27], the trapping zones will be studied using the effective potential. The motion of zero mass particles is determined by \( p^\mu p_\mu =0\), with \(p^\mu \equiv \frac{\mathrm{d}x^\mu }{\mathrm{d}s}\). Due to spherical symmetry, it is confined to a plane, which can be chosen as \(\theta =\pi /2\). The corresponding constants of motion are \( E=-p_t\), \(L = p_\phi \). The radial component of the null geodesics equation is

$$\begin{aligned} (p^r)^2 = E^2\,e^{-(A(r)+B(r))} \left( 1-e^{\,A(r)}\frac{\ell ^2}{r^2}\right) \,, \end{aligned}$$
(16)

where \(\ell \equiv L/E\) is the impact parameter. The regions where the motion is possible are determined by the condition

$$\begin{aligned} \ell ^2 \le V_\mathrm{eff}(r)\equiv \frac{r^2}{e^{A(r)}}\,. \end{aligned}$$
(17)

\(V_\mathrm{eff}\) smoothly matches the effective potential for null geodesics of the external Schwarzschild solution at \(\bar{r}=1\), as seen in Fig. 11 for the case \(\bar{\lambda }>0\).Footnote 17

Fig. 11
figure 11

\(\bar{V}_{\mathrm{eff}}\) as a function of \(\bar{r}\), for \(\bar{\rho }_0=0.100\) (upper panel), \(\bar{\rho }_0=0.110\) (center panel), and \(\bar{\rho }_0=0.113\) (lower panel)

The effective potential, plotted there for several values of \(\bar{\lambda }\) and different values of \(\bar{\rho }_0\), has a maximum and a minimum, corresponding to stable and unstable null circular geodesics, respectively. The extension of the trapping zone can be visualized by a horizontal line parallel to the \(\bar{r}\) axis and tangent to the minimum of the potential. The figures show that, for \(\bar{\lambda }>0\) and at fixed \(\bar{\rho }_0\), the trapping zone is always larger than that of GR, its extension grows with \(\bar{\lambda }\), and its inner boundary moves closer to the center of the star. The maximum of the effective potential (hence the height of the trapping zone in terms of \(\ell \)) grows with \(\bar{\lambda }\), and moves inward for larger \(\bar{\lambda }\).

Figure 12 show that, for fixed \(\bar{\lambda }\) the trapping regions grow and the maximum of the effective potential grows and moves inward for larger values of \(\bar{\rho }_0\)

Fig. 12
figure 12

\(V_{\mathrm{eff}}(r)\) for different values of \(\bar{\rho }_0\) and \(\bar{\lambda }=0.10\) (upper panel), \(\bar{\lambda }=0.025\) (center panel), \(\bar{\lambda }= 0.013\) (lower panel)

For negative values of \(\bar{\lambda }\) the curves change in exactly the opposite way to the changes in the \(\lambda >0\) case. We show some examples in Fig. 13.

Fig. 13
figure 13

\(\bar{V}_{\mathrm{eff}}\) as a function of \(\bar{r}\) for different values of \(\bar{\lambda }<0\), and \(\bar{\rho }_0=0.110\) (upper panel), \(\bar{\rho }_0=0.115\) (center panel), and for different values of \(\bar{\rho }_0\) and \(\bar{\lambda }=-0.12\) (lower panel)

These features of the effective potential will most likely influence the behaviour of the metric perturbations.Footnote 18

5 Concluding remarks

We have shown that Schwarzschild’s homogeneous star can be ameliorated by the addition of a transition zone near the surface of the star. Such a zone smooths out the discontinuity in the density at the surface of the constant density model. By numerically integrating the modified TOV equations in the \(f(\mathcal {R})=\mathcal {R}+\lambda \mathcal {R}^2\) theory in Palatini for a density profile with the abovementioned features, we have shown that the resultant models are everywhere regular. .

The values of the relevant parameters were chosen in most cases in such a way that the resultant objects are compact. Depending on the choice of the relevant parameters, they can be less, more, or as compact as those in GR with the same profile. UCOs are obtained both for negative and positive values of \(\bar{\lambda }\). Objects more compact than those in GR with the same density profile and fixed \(\bar{\rho }_0\) were obtained with positive values of \(\bar{\lambda }\). Objects with compactness larger than the maximum \(\bar{M}\) of the model in GR were obtained for \(\bar{\lambda }<0\) and high values of \(\rho _0\). Such configurations are close to that corresponding to the Buchdahl limit in GR.

The features of the trapping zones depend on \(\bar{\rho }_0\) and the sign of \(\bar{\lambda }\), and may be crucial for the stability of the models. The latter may be studied using the scalar-tensor representation of the Palatini theories [31], along the lines presented in [58].Footnote 19 Also of great importance is the possible degeneracy of the solution, best displayed in mass-radius diagrams. We hope to return to these issues in a future publication.