#  Stability of a realistic astrophysical pulsar and its mass-radius relation
in higher-order curvature gravity

G. G. L. Nashed *  —<EMAIL_ADDRESS>Centre for Theoretical Physics, The
British University, P.O. Box 43, El Sherouk City, Cairo 11837, Egypt  Kazuharu
Bamba *  —<EMAIL_ADDRESS>Faculty of Symbiotic Systems Science,
Fukushima University, Fukushima 960-1296, Japan

(August 28, 2024)

###### Abstract

The objective of this research is to explore compact celestial objects while
considering the framework of an extended gravitational theory known as
$\mathcal{R}+f(\mathcal{G})$ gravity. The notations $\mathcal{R}$ and
$\mathcal{G}$ denote the Ricci scalar and the Gauss-Bonnet invariant,
respectively. Radio pulsars, which are neutron stars with masses greater than
1.8 times that of the Sun ($M_{\odot}$), provide exceptional opportunities for
delving into fundamental physics in extraordinary environments unparalleled in
the observable universe and surpassing the capabilities of experiments
conducted on Earth. Through the utilization of both the linear and quadratic
expressions of the function $f(\mathcal{G})=\alpha_{1}\mathcal{G}^{2}$, where
$\alpha_{1}$ (with dimensional units of [${\textit{l}ength}^{6}$]) are
incorporated, we have achieved an accurate analytical solution for anisotropic
perfect-fluid spheres in a state of hydrostatic equilibrium. By integrating
the dimensional parameters $\alpha_{1}$ and the compactness factor, defined as
${\mathcal{C}=\frac{2GM}{Rc^{2}}}$, we showcase our capacity to encompass and
depict all physical characteristics within the stellar structure. We
illustrate that the model can produce a stable arrangement encompassing its
physical and geometric properties. We illustrate that by utilizing the
quadratic form of $\mathcal{G}$ in the $\mathcal{R}+f(\mathcal{G})$ framework,
the ansatz of Krori-Barua establishes connections between pressure in the
radial direction ($p_{r}$) using semi-analytical methods, pressure in the
tangential direction ($p_{t}$), and density ($\rho$). Remarkably, in the
context of the positive/negative $\alpha_{1}$ quadratic
$\mathcal{R}+f(\mathcal{G})$ gravity framework, the maximum compactness is
inherently restricted to values that fail below the Buchdahl limit when the
surface density exceeds $4\times 10^{14}$ g/cm3. In contrast to General
Relativity (GR), where compactness is unlikely to approach the black hole
limit, our study reveals a different trend. We draw the relation between mass
and radius associated with the boundary density we have determined, and this
diagram is consistent with other observational discoveries.

Keywords: Krori-Barua ansatz; Modified gravity; Compact stars.

##  I Introduction

Anisotropic pressure has been imposed in many models developed to derive
realistic stellar models within the Einstein general relativity context, and
in modified gravity as well. These models are motivated by the claim that
pressure at the core of the compact star model could have an anisotropic
structure where the density exceeds the nuclear density $10^{15}g/cm^{3}$.
Herrera and Santos Herrera and Santos (1997) have looked into how things can
be different in different directions, called local anisotropy, and how it
influences whether self-gravitating systems stay stable or collapse under
gravity. Other researchers have also explored this topic in related studies;
see for example, Herrera et al. (2008). More and more people are getting
interested in anisotropic fluids, which are fluids where the pressure pushing
outwards isn’t the same in all directions. Recent studies suggest that forcing
these fluids to be the same in all directions, known as enforcing local
isotropy, might not be the best approach. It could make it harder to
accurately model objects influenced by their gravity. In compact objects like
stars, many different things are happening that can cause pressure to be
different in different directions. So, it’s really important to figure out
ways to accurately describe these situations where pressure isn’t the same
everywhere. Thus, investigating possible techniques for obtaining precise
solutions that characterize anisotropic fluid distributions is crucial.
Readers are referred to Herrera (2020) for a thorough examination of the
causes and effects of local anisotropy in astrophysical objects.

The configuration and characteristics of compact celestial entities pose a
fundamental challenge within the realm of general relativity. This area of
research was inaugurated as early as 1916 by Schwarzschild, who derived the
inner solution for a spherical object with a uniform density, featuring zero
pressure at its vacuum boundary Schwarzschild (1916). Although theoretically
simple and of limited relevance to real stellar objects, the Schwarzschild
interior solution garnered significant attention, leading to intensive
examination of its properties and extensions Florides (1974); Grøn (1986);
Kohri (2001); Gabbanelli et al. (2019); Posada and Chirenti (2019); Calmet et
al. (2020). A pivotal milestone in the advancement of relativistic
astrophysics can be attributed to the contributions of Tolman Tolman (1934,
1939) and Oppenheimer and Volkoff Oppenheimer and Volkoff (1939) (TOV), who
derived the structural equations for compact, spherically symmetric general
relativistic objects in a static configuration.

Both theoretical and numerical explorations of the TOV equation culminated in
the determination of the maximum mass limit for neutron stars, which was
identified to be approximately $3.2M_{\odot}$ Rhoades and Ruffini (1974). This
outcome was achieved through the application of causality principles, the
highly rigid equation of state characterized by $p=\rho c^{2}$, and Le
Chatelier’s principle. Importantly, this result remains true when the equation
of state (EoS) is not fully understood within a certain range of densities.
Conversely, Chandrasekhar Chandrasekhar and Milne (1931) derived a limiting
mass of approximately $1.4M_{\odot}$ for white dwarfs. Both theoretical
reasoning and observational findings subsequently gave rise to the widely
accepted notion, upheld for a considerable duration, that the mass
distribution of neutron stars is concentrated around a value roughly in the
vicinity of $1.4M_{\odot}$ Shapiro and Teukolsky (1983). This mass value is a
consequence of the understanding that neutron stars rely on the dominant
pressure exerted by neutron degeneracy following the collapse of a white
dwarf. For a neutron star with a mass of approximately $1.4M_{\odot}$, the
associated radius is expected to be around $10\approx 15$km, with average
$\rho$ to be roughly $6\times 10^{14}{\mathrm{g}/cm^{3}}$.

Nevertheless, the conventional perspective on the masses of neutron stars has
undergone a significant transformation in recent times, as more precise
determinations of neutron star masses have become increasingly accessible
Horvath et al. (2021). Extensive astronomical observations and the detection
of gravitational waves have definitively shown that the masses of neutron
stars span a significantly wider range than what one would expect solely based
on the Chandrasekhar limit. In their study, Margalit and Metzger Margalit and
Metzger (2017) combined electromagnetic (EM) and gravitational wave (GW) data
from the binary neutron star (NS) merger GW170817 to constrain the radii and
maximum mass $M_{max}$ of neutron stars. They established an upper limit of
Mmax?=2.17M?? (90% confidence), which is arguably less model-dependent than
other current constraints. This limitation is more stringent and less reliant
on specific models compared to alternative constraints. The study conducted by
Shibata et al. Shibata et al. (2017) based on the same event indicated that
the equation of state for neutron matter must exhibit significant rigidity,
suggesting that $M_{max}$ of neutron stars should considerably exceed
$2M_{\odot}$. This mass threshold is essential to allow for the formation of a
stable, long-lasting massive neutron star as the outcome of the merger in
binary systems like GW170817, where the initial combined mass overrides
$2.73M_{\odot}$. Furthermore, considering the absence of a relativistic
optical counterpart, we can deduce $M_{max}$ value for the neutron star in the
range of approximately $2.15-2.25M_{\odot}$. Comparable estimates for the
neutron star’s maximum mass have been derived in the studies conducted by Ruiz
and Rezzolla Ruiz et al. (2018); Rezzolla et al. (2018), respectively. Using
the Shapiro delay, alternative methods for estimating the masses of neutron
stars produced results of approximately $1.928\pm 0.017M_{\odot}$ for the
pulsar PSR J1614-2230 1, and a mass of $2.14_{-0.09}^{+0.10}M_{\odot}$ for the
Millisecond Pulsar MSPJ0740+6620 Cromartie et al. (2019).

One significant pathway for potentially elucidating the elevated mass values
of neutron stars involves the realm of modified gravity. Modified theories
have primarily appeared to account for contemporary expansion of the cosmos.
To delve into in-depth conversations concerning the accelerating Universe, the
concept of dark energy, and matters pertaining to modified gravity, consider
consulting the reviews listed in the provided references Nojiri and Odintsov
(2011); Joyce et al. (2015); Nojiri et al. (2017); Frusciante and Perenon
(2020).

Modified theories of gravity can potentially provide fresh perspectives on
comprehending the composition of compact celestial bodies. Several essential
characteristics of star structures, including maximum masses, moments of
inertia, and mass-radius relationships, differ from standard general
relativity within modified gravitational theories Olmo et al. (2020). These
alterations stem from the modification of the Poisson equation for
gravitational potential, resulting in changes to the radius, central density,
mass, and luminosity of the stars Olmo et al. (2020). The measured masses of
many neutron stars, which fall in the range of approximately $2M_{\odot}$,
have led to disagreements with predictions from realistic equations of state
for dense matter. As a result, certain softer equations, especially those
incorporating hyperons, have been ruled out Olmo et al. (2020). Advanced
gravity theories that extend beyond general relativity have the potential to
mitigate or resolve these discrepancies by introducing corrections into the
generalized hydrostatic equilibrium equations of extended stellar models Olmo
et al. (2020).

Different forms of general relativity modifications have been put forth to
explain the observed properties of compact celestial bodies, such as neutron
stars, and their mass distribution. These extensions encompass various gravity
theories, including $f(\mathcal{G})$, $f(\mathcal{R},\mathcal{G})$,
$f(\mathcal{R},T)$, and $f\left(\mathcal{R},L_{m}\right)$ types, For a concise
overview of the astrophysical consequences of the aforementioned theories,
refer to (Olmo et al. (2020) and references therein).

A captivating subset of modified gravity models, commonly denoted as
$f(\mathcal{R},\mathcal{G})$ Lobo (2006); Rahaman et al. (2012a); Nojiri et
al. (2017), arises from the inspiration of string theory and is known as
modified Gauss-Bonnet gravity. It provides an interesting way to efficiently
generate the late-time acceleration phase. Gravitation theories that combine
the Gauss-Bonnet and Ricci scalars are found in the literature; studies of
this type of theory can be found in Mehdizadeh et al. (2015); Sharif and Ikram
(2014). The modified Gauss-Bonnet theory holds a significant role in the field
of astrophysics due to its potential to reshape our understanding of the
universe and its fundamental structures. This theory, inspired by string
theory and emerging from the broader landscape of modified gravity, offers a
novel perspective on gravity’s behavior in extreme astrophysical environments.
It opens the door to exploring phenomena that cannot be explained by
conventional general relativity such as the nature of compact objects like
neutron stars and black holes, their mass distributions, and the equations of
state for dense matter. Moreover, the modified Gauss-Bonnet theory provides a
framework to investigate the late-time acceleration of the universe, a
critical aspect of modern cosmology. Its flexibility in accommodating various
forms of gravitational interactions and its ability to address long-standing
astrophysical anomalies make it an essential tool for astrophysicists seeking
to comprehend the cosmos in its entirety. This theory’s potential to reconcile
theory with observations and offer new avenues for astrophysical exploration
makes it a prominent and vital component of contemporary astrophysical
research. The goal of this study is to leverage the higher-order aspects of
Gauss-Bonnet gravity, drawn from its known properties and advantages. Gauss-
Bonnet gravity finds frequent use in theoretical physics to extend general
relativity by accommodating higher-order curvature corrections. This extension
can provide insights into various phenomena such as black hole physics,
cosmology, and gravitational wave physics, thereby offering a more
comprehensive understanding of gravity beyond standard Einsteinian theory.
Hence, the implicit motivation for employing Gauss-Bonnet gravity could be to
investigate its implications within the astrophysical framework, determining
its potential to yield a consistent stellar model. This aspect will be
explored throughout the study.

The study’s structure includes a review in Section II for the framework
$\mathcal{R}+f(\mathcal{G})$ modified theory. Section III applies quadratic
$\mathcal{R}+f(\mathcal{G})=\mathcal{R}+\alpha_{1}\mathcal{G}^{2}$ gravity to
the KB stellar model, ensuring compatibility with the Schwarzschild exterior
vacuum solution through imposed matching conditions. In Section IV, We use
astrophysical data to study radius and mass of the pulsar
${\mathcal{J}0740+6620}$ to limit the dimensionless $\alpha_{1}$.
Additionally, we assess the model’s validity by applying diverse stability
criteria. In Section V, we derive the Equations of State (EoS) governing the
matter sector. We also analyze the associated mass-radius diagram and present
the study’s conclusion in Section VI.

##  II Distribution of anisotropic matter in $\mathcal{R}+f(\mathcal{G})$
gravity

The overarching action for the modified $f(\mathcal{G})$ is as follows Shamir
and Ahmad (2017),

$\mathcal{L}=\frac{1}{2{\kappa}^{2}}\int
d^{4}x\sqrt{-g}[\mathcal{R}+f(\mathcal{G})]+\int
d^{4}x\sqrt{-g}\mathcal{L}_{M}\,.$ (1)

In this context, $f(\mathcal{G})$ represents the arbitrary Gauss-Bonnet (GB)
function with $\mathcal{G}$ being the GB, while $\kappa^{2}$ stands for the
coupling constant. The GB expression, $\mathcal{G}$, is defined as follows:

$\mathcal{G}=\mathcal{R}^{2}-4\mathcal{R}_{\zeta\eta}\mathcal{R}^{\zeta\eta}+\mathcal{R}_{\zeta\eta\mu\nu}\mathcal{R}^{\zeta\eta\mu\nu}\,.$
(2)

In this context, $\mathcal{R}_{\zeta\eta}$ and $\mathcal{R}_{\zeta\eta\mu\nu}$
represent the Ricci and Reimann tensors, respectively. When we vary Eq. (1)
concerning $g_{\zeta\eta}$, it yields the following set of fourth-order non-
linear field equations:

$\displaystyle
G_{\zeta\eta}-[2\mathcal{R}g_{\zeta\eta}\nabla^{2}+2\mathcal{R}\nabla_{\zeta}\nabla_{\eta}+4g_{\zeta\eta}\mathcal{R}^{\mu\nu}\nabla_{\mu}\nabla_{\nu}+4\mathcal{R}_{\zeta\eta}\nabla^{2}-4\mathcal{R}^{\mu}_{\zeta}\nabla_{\eta}\nabla_{\mu}-4\mathcal{R}^{\mu}_{\eta}\nabla_{\zeta}\nabla_{\mu}-4\mathcal{R}_{\zeta\mu\eta\nu}\nabla^{\mu}\nabla^{\nu}]f_{\mathcal{G}}$
$\displaystyle-\frac{1}{2}g_{\zeta\eta}f+[2\mathcal{R}\mathcal{R}_{\zeta\eta}-4\mathcal{R}^{\mu}_{\zeta}\mathcal{R}_{\mu\eta}-4\mathcal{R}_{\zeta\mu\eta\nu}R^{\mu\nu}+2\mathcal{R}^{\mu\nu\delta}_{\zeta}\mathcal{R}_{\eta\mu\nu\delta}]f_{\mathcal{G}}=\kappa^{2}\mathrm{\textit{T}}_{\zeta\eta},$
(3)

In this context, we have the d’Alembertian operator denoted as
$\Box=\nabla^{2}=\nabla_{\zeta}\nabla^{\zeta}$, the Einstein tensor
${G}_{\zeta\eta}=\mathcal{R}_{\zeta\eta}-\frac{1}{2}g_{\zeta\eta}\mathcal{R}$,
the function $f$ represented as $f\equiv f(\mathcal{G})$, and
$f_{\mathcal{G}}$ denoting the partial derivative of $f(\mathcal{G})$
concerning $\mathcal{G}$. The Einstein equations can be restored simply by
setting $f(\mathcal{G})=0$. Here $\mathrm{\textit{T}}_{\zeta\eta}$ is the
energy-momentum tensor defined as:

$\mathrm{\textit{T}}_{\zeta\eta}=-\frac{2}{\sqrt{-g}}\frac{\delta(\sqrt{-g}\mathcal{L}_{M})}{\delta
g^{\zeta\eta}}.$ (4)

Furthermore, the energy-momentum tensor that depends on the metric can take
the following shape:

$\mathrm{\textit{T}}_{\zeta\eta}=g_{\zeta\eta}\mathcal{L}_{M}-2\frac{\partial\mathcal{L}_{M}}{\partial
g^{\zeta\eta}}.$ (5)

The anisotropic for of $T_{\zeta\eta}$ is defined as:

${T^{\zeta}}_{\eta}=(\rho+p_{t})V^{\zeta}V_{\eta}-p_{t}{\delta^{\zeta}}_{\eta}+(p_{r}-p_{t})\xi^{\zeta}\xi_{\eta}.$
(6)

The energy-momentum tensor, ${T}{{}^{\mu}}{{}_{\nu}}$, is defined as:

${{T}{{}^{\mu}}{{}_{\nu}}}={diag(-\rho c^{2}\,,p_{r}\,,p_{t}\,,p_{t})}.$

The trace part of Eq.(II) is given by

$\displaystyle-\mathcal{R}+2\mathcal{G}f_{\mathcal{G}}(\mathcal{G})+2\mathcal{R}\nabla^{2}f_{\mathcal{G}}(\mathcal{G})-4R_{\alpha\beta}\nabla^{\alpha}\nabla^{\beta}f_{\mathcal{G}}(\mathcal{G})=\kappa^{2}\mathrm{\textit{T}}.$

It is significant to mention that in $f(\mathcal{G})$, the standard
conservation equation of the stress-energy tensor is not satisfied, i.e.,
covariant derivative of $T_{\alpha\beta}$ is non-zero
($\nabla^{\alpha}T_{\alpha\beta}\neq 0$). This fact can be justified by taking
the covariant derivative of Eq.(II), which on combing with the Bianchi
identity $\nabla^{\alpha}G_{\alpha\beta}$, gives

$\displaystyle\kappa^{2}\nabla^{\alpha}T_{\alpha\beta}=-\frac{1}{2}g_{\alpha\beta}\nabla^{\alpha}f(\mathcal{G}).$
(7)

It can be easily seen from the above expression that in general, the
conservation law does not hold for this gravitational theory. For the
linearized $\mathcal{R}+f(\mathcal{G})$ gravity, the corresponding field
equations, as the linear results, are the same as those of the linearized $R$
gravity. In this limit, the gravitational coupling constant $\kappa^{2}$ does
not differ from Einstein’s $8\pi G/c^{4}$ Wu and Huang (2019).

##  III The anisotropic Gauss-Bonnet coupled with matter model

In this section, we will seek an anisotropic solution within the framework of
$R+f\left(\mathcal{G}\right)$. To achieve this, we will employ the following
particular model,

$f(\mathcal{G})=\alpha_{1}\mathcal{G}^{2}\,,$ (8)

where $\alpha_{1}$ is a dimensional quantity that has the unit
${\textit{l}engh}^{6}$. In this investigation, we will introduce the following
line element:

$\displaystyle{\mathrm{d}s^{2}=g_{\mu\nu}dx^{\mu}dx^{\nu}=-e^{\psi}c^{2}dt^{2}+e^{\lambda}dr^{2}+r^{2}(d\theta^{2}+\sin^{2}\theta
d\phi^{2})}\,.$ (9)

The metric functions, represented as $\psi$ and $\lambda$, are two functions
that depend solely on the radial coordinate $r$. Consequently, we can
calculate $\sqrt{-g}=r^{2}\sin\theta\,e^{(\psi+\lambda)/2}$, as well as the
four-velocity vector. $v^{\mu}=(ce^{-\psi/2},0,0,0)$.

By using Eq. (9) for computation, we obtain the Ricci and Gauss-Bonnet scalars
as follows:

$\displaystyle\mathcal{R}=\frac{\left(\lambda^{\prime}{r}^{2}-4\,r\right)\psi^{\prime}-2\,\psi^{\prime\prime}{r}^{2}-\psi^{\prime
2}{r}^{2}+4\,\lambda^{\prime}r+4\,{e^{\lambda}}-4}{2{r}^{2}{e^{\lambda}}}\,,$
$\displaystyle\mathcal{G}=\frac{2{e^{-2\,\lambda}}\left\\{\left[\lambda^{\prime}\left(e^{\lambda}-3\right)-\left({e^{\lambda}}-1\right)\psi^{\prime}\right]\psi^{\prime}-\left(2\,{e^{\lambda}}-2\right)\psi^{\prime\prime}\right\\}}{{r}^{2}}\,,$
(10)

where ${}^{\prime}\equiv d/dr$ and ${}^{\prime\prime}\equiv d^{2}/dr^{2}$, and
so on. Utilizing the Ricci and Gauss-Bonnet values provided by Eq. (III) in
the field equations (II) after applying the constraints (8), we obtain:

$\displaystyle\rho=\frac{1}{c^{2}{\kappa^{2}}{r}^{6}{e^{4\lambda}}}\left(32\,\alpha_{1}{r}^{2}\left({e^{\lambda}}-1\right)^{2}\psi^{\prime\prime\prime\prime}+32\,r\alpha_{1}\,\left(r\left({e^{\lambda}}-1\right)\psi^{\prime}+\left(7r-3r{e^{\lambda}}\right)\psi^{\prime}_{1}-4{e^{\lambda}}+4\right)\left({e^{\lambda}}-1\right)\psi^{\prime\prime\prime}-16\alpha_{1}\psi^{\prime}{r}^{2}\left({e^{\lambda}}-1\right)\right.$
$\displaystyle\left.\times\left({e^{\lambda}}-3\right)\lambda^{\prime\prime\prime}+24\alpha_{1}\,{r}^{2}\left({e^{\lambda}}-1\right)^{2}a^{\prime\prime
2}-8\left(8{r}^{2}\left({e^{\lambda}}-\frac{5}{2}\right)\left({e^{\lambda}}-1\right)\lambda^{\prime\prime}+{r}^{2}\left({e^{\lambda}}-1\right)^{2}a^{\prime
2}+9\left(\left({e^{\lambda}}-{\frac{19}{9}}\right)ra^{\prime}_{1}\right.\right.\right.$
$\displaystyle\left.\left.\left.+{\frac{16}{9}}{e^{\lambda}}-{\frac{16}{9}}\right)r\left({e^{\lambda}}-1\right)\psi^{\prime}-11\,\left(\left({e^{\lambda}}\right)^{2}-{\frac{64}{11}}\,{e^{\lambda}}+{\frac{61}{11}}\right){r}^{2}\lambda^{\prime}{}^{2}-28\,\left({e^{\lambda}}-{\frac{17}{7}}\right)r\left({e^{\lambda}}-1\right)a^{\prime}_{1}-24\,\left({e^{\lambda}}-1\right)^{2}\right)\alpha_{1}\,\psi^{\prime\prime}\right.$
$\displaystyle\left.-16\,\left(r\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-2\right)a^{\prime}-7/2\,r\left({\frac{45}{7}}+\left({e^{\lambda}}\right)^{2}-{\frac{48}{7}}\,{e^{\lambda}}\right)\lambda^{\prime}-12+16\,{e^{\lambda}}-4\,\left({e^{\lambda}}\right)^{2}\right)\psi^{\prime}r\alpha_{1}\,\lambda^{\prime\prime}-2\,\alpha_{1}\,{r}^{2}\left({e^{\lambda}}-1\right)^{2}a^{\prime
4}\right.$
$\displaystyle\left.+4\alpha_{1}\lambda^{\prime}{r}^{2}\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-3\right)\psi^{\prime
3}+22\,\alpha_{1}\,\left({r}^{2}\left(\left({e^{\lambda}}\right)^{2}-{\frac{54}{11}}{e^{\lambda}}+{\frac{47}{11}}\right)\lambda^{\prime
2}+{\frac{40}{11}}\,r\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-{\frac{11}{5}}\right)a^{\prime}_{1}+{\frac{48}{11}}\left({e^{\lambda}}-1\right)^{2}\right)\psi^{\prime
2}\right.$
$\displaystyle\left.+24\,\psi^{\prime}\alpha_{1}\,\left(\left({e^{2\lambda}}-{\frac{35}{3}}\,{e^{\lambda}}+14\right){r}^{2}\lambda^{\prime
2}+\frac{10}{3}\left({\frac{33}{5}}-{\frac{34}{5}}\,{e^{\lambda}}+{e^{2\lambda}}\right)ra^{\prime}_{1}-16\,{e^{\lambda}}+4{e^{2\lambda}}+12\right)\psi^{\prime}+{r}^{4}{e^{3\lambda}}\left({e^{\lambda}}-1+a^{\prime}_{1}r\right)\right),$
(11) $\displaystyle
p_{r}=\frac{1}{{\kappa^{2}}\left({e^{\lambda}}\right)^{4}{r}^{5}}\left\\{8\,\alpha_{1}\,r\left({e^{\lambda}}-1\right)^{2}a^{\prime\prime
2}-16\,r\alpha_{1}\,\psi^{\prime}\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-3\right)\psi^{\prime\prime\prime}-8\,\psi^{\prime}\left(r\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-5\right)a^{\prime}-2\,\left({e^{\lambda}}-3\right)\right.\right.$
$\displaystyle\left.\left.\left(r\left({e^{\lambda}}-3\right)\lambda^{\prime}+2\,{e^{\lambda}}-2\right)\right)\alpha_{1}\,\psi^{\prime\prime}+8\,r\alpha_{1}\,a^{\prime
2}\left({e^{\lambda}}-3\right)^{2}a^{\prime\prime}_{1}+2\,\alpha_{1}\,r\left({e^{\lambda}}-1\right)^{2}a^{\prime
4}+4\,\left({e^{\lambda}}-3\right)\left(r\left({e^{\lambda}}-3\right)\lambda^{\prime}+4\,{e^{\lambda}}-4\right)\alpha_{1}\,\psi^{3}\right.$
$\displaystyle\left.-6\,\left({e^{\lambda}}-3\right)\left(r\left({e^{\lambda}}-7\right)\lambda^{\prime}+\frac{8}{3}\,{e^{\lambda}}-8\right)\lambda^{\prime}\alpha_{1}\,\psi^{\prime
2}+{r}^{4}\psi^{\prime}\left({e^{\lambda}}\right)^{3}-{r}^{3}\left({e^{\lambda}}\right)^{3}\left({e^{\lambda}}-1\right)\right\\},$
(12) $\displaystyle
p_{t}=\frac{1}{4{\kappa^{2}}\left({e^{\lambda}}\right)^{4}{r}^{5}}\left(64\alpha_{1}{r}^{2}\psi^{\prime}\left({e^{\lambda}}-1\right)\psi^{\prime\prime\prime\prime}+96r\alpha_{1}\left(\frac{2}{3}r\left({e^{\lambda}}-1\right)\psi^{\prime\prime}+\psi^{\prime}\left(r\left({e^{\lambda}}-1\right)\psi^{\prime}-\frac{8}{3}\left({e^{\lambda}}-\frac{7}{4}\right)ra^{\prime}_{1}+\frac{8}{3}-\frac{8}{3}{e^{\lambda}}\right)\right)\psi^{\prime\prime\prime}\right.$
$\displaystyle\left.-32\,\alpha_{1}{r}^{2}\psi^{\prime
2}\left({e^{\lambda}}-3\right)\lambda^{\prime\prime\prime}+32r\alpha_{1}\,\left(4r\left({e^{\lambda}}-1\right)a^{\prime}-\left(3{e^{\lambda}}-7\right)r\lambda^{\prime}+5-6{e^{\lambda}}+\left({e^{\lambda}}\right)^{2}\right)\psi^{\prime\prime
2}+\left(160\left({\frac{13}{5}}-{e^{\lambda}}\right)\psi^{\prime}{r}^{2}\alpha_{1}\lambda^{\prime\prime}\right.\right.$
$\displaystyle\left.\left.+32\,\alpha_{1}\,{r}^{2}\left({e^{\lambda}}-1\right)\psi^{\prime
3}-304\,\left(\left(-{\frac{33}{19}}+{e^{\lambda}}\right)r\lambda^{\prime}-\frac{2}{19}\,\left({e^{\lambda}}-1\right)\left({e^{\lambda}}-13\right)\right)r\alpha_{1}\,\psi^{\prime
2}+304\,\alpha_{1}\,\left(\left({e^{\lambda}}-{\frac{73}{19}}\right){r}^{2}\lambda^{\prime}{}^{2}\right.\right.\right.$
$\displaystyle\left.\left.\left.-2/19\,r\left(\left({e^{\lambda}}\right)^{2}-24\,{e^{\lambda}}+43\right)\lambda^{\prime}-{\frac{24}{19}}+{\frac{24}{19}}\,{e^{\lambda}}\right)\psi^{\prime}+2\,{r}^{5}\left({e^{\lambda}}\right)^{3}\right)\psi^{\prime\prime}-48\,\psi^{\prime
2}r\left(\left({e^{\lambda}}-7/3\right)r\psi^{\prime}-3\,r\left({e^{\lambda}}-5\right)\lambda^{\prime}-\frac{8}{3}\,{e^{\lambda}}\right.\right.$
$\displaystyle\left.\left.+8\right)\alpha_{1}\,\psi^{\prime\prime}_{1}-16\,\left(r\left({e^{\lambda}}-2\right)\lambda^{\prime}-\frac{5}{2}+3\,{e^{\lambda}}-1/2\,\left({e^{\lambda}}\right)^{2}\right)r\alpha_{1}\,\psi^{\prime
4}+96\,\left({r}^{2}\left({e^{\lambda}}-\frac{10}{3}\right)\lambda^{\prime
2}-\frac{1}{6}\,r\left(-20\,{e^{\lambda}}+31+\left({e^{\lambda}}\right)^{2}\right)\lambda^{\prime}\right.\right.$
$\displaystyle\left.\left.\left.+2\,{e^{\lambda}}-2\right)\alpha_{1}\,\psi^{\prime
3}+\left(-80\,\left({e^{\lambda}}-{\frac{42}{5}}\right){r}^{2}\alpha_{1}\,\left(\lambda^{\prime}\right)^{3}+8\,\alpha_{1}\,r\left(141+\left({e^{\lambda}}\right)^{2}-34\,{e^{\lambda}}\right)\lambda^{\prime}{}^{2}-192\,\left({e^{\lambda}}-3\right)\alpha_{1}\,\lambda^{\prime}\right.\right.\right.$
$\displaystyle\left.\left.+{r}^{5}\left({e^{\lambda}}\right)^{3}\right)\psi^{\prime
2}-{r}^{4}\left({e^{\lambda}}\right)^{3}\left(-2+\lambda^{\prime}r\right)a^{\prime}-2\,{r}^{4}\lambda^{\prime}\left({e^{\lambda}}\right)^{3}\right)\,.$
(13)

It’s evident that t density and the components of the pressures are altered
and become identical with the GR solution when considering $\alpha_{1}=0$ (as
discussed in Nashed and Capozziello (2020) and Roupas and Nashed (2020)).

###  III.1 Krori-Barua model

Because Eqs. (III), (III), and (III) form complex systems comprising three
non-linear differential equations with five unknowns, namely, $\psi$,
$\lambda$, $\rho$, $p_{r}$, and $p_{t}$ additional conditions are required to
render these systems solvable. There are various approaches to impose these
two constraints, with one option being to adopt specific equations of state
(EoS). However, this method may not be particularly advantageous since the
aforementioned systems, namely, Eqs. (III), (III), and (III), involve fourth-
order differential equations. The most effective approach we can employ is to
prescribe specific forms for the ansatz of $\psi$ and $\lambda$. In this
study, we will utilize the KB metric potentials, as presented in Krori and
Barua (1975). Anisotropic compact star models in the Krori-Barua spacetime in
GR have been studied in Refs. Varela et al. (2010); Rahaman et al. (2012b);
Kalam et al. (2013); Bhar (2015a, b); Bhar et al. (2015) and in modified
theories of gravity in Refs. Abbas et al. (2015); Zubair et al. (2016); Zubair
and Abbas (2016); Ilyas et al. (2017); Yousaf et al. (2018); Saha and Debnath
(2019); Nashed (2023a); Nashed and El Hanafy (2023); Nashed (2023b); Nashed
and El Hanafy (2022); Nashed (2021).

${\psi(r)=n_{0}(r/R_{s})^{2}+n_{1},\,\qquad\lambda(r)=n_{2}(r/R_{s})^{2}}\,,$
(14)

with $R_{s}$ representing the radius surface of the pulsar, and
${n_{0},n_{1},n_{2}}$ are parameters that will be fixed from through the
junction conditions. For the sake of unit adjustment, we assume:

$\alpha_{1}=\alpha_{2}R_{s}{}^{6}.$ (15)

Using Eqs. (14), (15), in Eqs. (III), (III) and (III), we obtain the explicate
forms of energy-density, and the components of pressure as:

$\displaystyle\rho=\frac{1}{{\kappa^{2}}{e^{{\frac{4n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{6}{c}^{2}}\left(4480\,\alpha_{2}{n_{2}}^{3}n_{0}\,{e^{{\frac{n_{2}{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}-384\,\alpha_{2}\,{n_{2}}^{3}n_{0}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}-1728\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}+352\,\alpha_{2}{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}\right.$
$\displaystyle\left.+64\alpha_{2}{n_{0}}^{3}n_{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}-256\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}+64\,\alpha_{2}\,{R_{s}}^{4}{n_{0}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{2}-32\,\alpha_{2}\,{R_{s}}^{4}{n_{0}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{2}-64\,\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}\right.$
$\displaystyle\left.+128\,\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}+2560\,\alpha_{2}\,{n_{2}}^{2}n_{0}\,{R_{s}}^{2}{r}^{4}-64\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{R_{s}}^{2}{r}^{4}+1152\,\alpha_{2}\,{R_{s}}^{4}n_{0}\,n_{2}\,{r}^{2}-{e^{{\frac{3n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}+{e^{{\frac{4n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}\right.$
$\displaystyle\left.-5376\,\alpha_{2}\,{n_{2}}^{3}n_{0}\,{r}^{6}+1504\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{r}^{6}+192\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{r}^{6}-32\,\alpha_{2}\,{R_{s}}^{4}{n_{0}}^{2}{r}^{2}-64\,\alpha_{2}\,{n_{0}}^{3}{R_{s}}^{2}{r}^{4}-768\,\alpha_{2}\,{R_{s}}^{6}n_{0}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right.$
$\displaystyle\left.+384\,\alpha_{2}\,{R_{s}}^{6}n_{0}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+64\,\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}-32\,\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}+384\,\alpha_{2}\,{R_{s}}^{6}n_{0}+2\,n_{2}\,{e^{{\frac{3n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{6}-32\,\alpha_{2}\,{n_{0}}^{4}{r}^{6}\right.$
$\displaystyle\left.+128\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}-64\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}-1664\,\alpha_{2}\,{R_{s}}^{4}n_{0}\,n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{2}+512\,\alpha_{2}\,{R_{s}}^{4}n_{0}\,n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{2}\right.$
$\displaystyle\left.+512\,\alpha_{2}\,{n_{2}}^{2}n_{0}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}-2816\,\alpha_{2}\,{n_{2}}^{2}n_{0}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}{r}^{4}\right)\,,$
$\displaystyle
p_{r}=\frac{1}{{\kappa^{2}}{e^{{\frac{4n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}}\left(2\,n_{0}\,{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}-384\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}+576\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{R}^{2}{r}^{2}+64\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}\right.$
$\displaystyle\left.+960\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}-2016\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{r}^{4}+576\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{r}^{4}-96\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}+64\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}\right.$
$\displaystyle\left.-384\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}-576\,\alpha_{2}\,{R}^{4}{n_{0}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}+416\,\alpha_{2}\,{R}^{4}{n_{0}}^{2}-64\,\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{r}^{4}+32\,\alpha_{2}\,{n_{0}}^{4}{r}^{4}+160\,\alpha_{2}\,{R}^{4}{n_{0}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}\right.$
$\displaystyle\left.+32\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{2n_{2}{r}^{2}}{{R}^{2}}}}}{r}^{4}+64\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{2n_{2}{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}+64\alpha_{2}\,{n_{0}}^{3}{R}^{2}{r}^{2}-128\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{n_{2}{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}+{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}-{e^{{\frac{4n_{2}{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{2}\right)\,,$
$\displaystyle{p_{t}}=\frac{1}{{\kappa^{2}}{e^{{\frac{4n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{4}{r}^{4}}\left(-n_{2}\,{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}-{r}^{6}n_{0}\,n_{2}\,{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}+{r}^{6}{n_{0}}^{2}{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}+2\,n_{0}\,{e^{{\frac{3n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}+192\,\alpha_{2}\,{R}^{6}{n_{0}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}\right.$
$\displaystyle\left.+32\,\alpha_{2}\,{R}^{6}{n_{0}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}-2560\,{r}^{6}\alpha_{2}\,{n_{0}}^{3}{n_{2}}^{2}+5376\,{r}^{6}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{3}+256\,{r}^{6}\alpha_{2}\,{n_{0}}^{4}n_{2}+32\,\alpha_{2}\,{n_{0}}^{4}{R}^{2}{r}^{4}+192\,\alpha_{2}\,{n_{0}}^{3}{R}^{4}{r}^{2}\right.$
$\displaystyle\left.-224\,\alpha_{2}\,{R}^{6}{n_{0}}^{2}+896\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{4}{r}^{2}-64\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{4}{r}^{2}+704\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}+32\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}\right.$
$\displaystyle\left.-64\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}-128\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}-640\,{r}^{6}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{3}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}+768\,{r}^{6}\alpha_{2}\,{n_{0}}^{3}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}\right.$
$\displaystyle\left.-128\,{r}^{6}\alpha_{2}\,{n_{0}}^{4}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}-64\,\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}+32\,\alpha_{2}\,{n_{0}}^{4}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{2}{r}^{4}+64\,\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{2n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{4}{r}^{2}-256\,\alpha_{2}\,{n_{0}}^{3}{e^{{\frac{n_{2}\,{r}^{2}}{{R}^{2}}}}}{R}^{4}{r}^{2}\right.$
$\displaystyle\left.-1088\,\alpha_{2}\,{n_{0}}^{2}n_{2}\,{R}^{4}{r}^{2}-3040\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{R}^{2}{r}^{4}+576\,\alpha_{2}\,{n_{0}}^{3}n_{2}\,{R}^{2}{r}^{4}\right).$
(16)

Furthermore, we present the force with anisotropic, $F_{a}=\frac{2\Delta}{r}$,
which arises from the pressure difference. In situations with significant
anisotropy $0<r\leq R_{s}$, where $\Delta>0$, it necessitates that
$p_{t}>p_{r}$ throughout the star’s interior. Conversely, in the mild
anisotropy case, where $\Delta<0$, it requires that $p_{r}>p_{t}$ within the
pulsar.

###  III.2 Junction conditions

To address the equation of motions under specified junction conditions at
$r=R_{s}$, where $p_{r}=0$, the inner metric described by Eq. (9) necessitates
the application of these matching conditions. This can be achieved by smoothly
connecting the interior metric at $r=R_{s}$ to Schwarzschild’s exterior
metric, which is expressed as:111 To justify the use of Schwarzschild solution
as an exterior solution for our system we will apply the form of Schwarzschild
spacetime to the field equations of $f(G)=\alpha_{1}G^{2}$. For this purpose,
we get the following non-vanishing components:  $\displaystyle tt-
component\equiv\frac{1152\alpha_{1}M^{3}G^{3}(67GM-32Rc^{2})}{c^{8}R^{6}}\,,\qquad
rr-
component\equiv\frac{1152\alpha_{1}M^{3}G^{3}(11GM-4Rc^{2})}{c^{8}R^{6}}\,,$
$\displaystyle\theta\,\theta-
component\equiv\frac{1152\alpha_{1}M^{3}G^{3}(41GM-18Rc^{2})}{c^{8}R^{6}}\,.$
(17) If we calculate the above quantities numerically using the data of the
pulsar under consideration which are $M=2.07\pm 0.11M_{\odot}$ and
$R_{s}=12.34^{+1.89}_{-1.67}$ km and $\alpha_{1}=0.0004$ the following
numerical values are obtained:  $\displaystyle tt-
component\equiv\,7.089001308\times 10^{-10}\,,\quad rr-component\,\equiv
5.866809379\times 10^{-11}\,,\quad\theta\,\theta-component\,3.609693140\times
10^{-10}$ $\displaystyle\mbox{while the Schwarzchild mass term has an
oder}\sim 0.5\,.$ (18) The above numerical values indicate that we can use the
Schwarzschild solution as an exterior solution for the theory under
consideration.

${ds^{2}=-\left(1-\frac{2GM}{c^{2}r}\right)c^{2}dt^{2}+\frac{dr^{2}}{\left(1-\frac{2GM}{c^{2}r}\right)}+r^{2}(d\theta^{2}+\sin^{2}\theta
d\phi^{2})}\,,$ (19)

where, as seen from a point at an infinite distance, $M$ denotes the star’s
gravitational mass. We apply the junction conditions as follows:

$\psi(r={R_{s}})=\ln(1-C)\,,\qquad\lambda(r={R_{s}})=-\ln(1-C)\,,\qquad\text{and}\,\quad{{p}_{r}}(r={R_{s}})=0\,,$
(20)

with $C$ being figured as:

$\displaystyle{C=\frac{2GM}{c^{2}{R_{s}}}}\,,$ (21)

With the radial pressure from Eq. (III.1) and the KB ansatz (14), the
parameters $\\{n_{0},n_{1},n_{2}\\}$ can be expressed with respect to
$\alpha_{2}$ $C$s.

##  IV Constraints on astrophysics and stability derived from pulsar
${\mathcal{J}0740+6620}$ observations

Now, we specifically employ restrictions on $M$ and $R$ from the pulsar
${\mathcal{J}0740+6620}$ to calculate the quadratic gravity correction
parameter’s value $\alpha_{2}$. Additionally, to calculate the quadratic
gravity correction parameter’s value. As previously stated in the
introduction, it is crucial to emphasize that precise observational data plays
an immensely significant role in restricting $\alpha_{2}$. Initially, we need
to address our selection of ${\mathcal{P}SRJ0740+6620}$ to constrain the form
of $f({\mathcal{G}})$ theory under consideration.

###  IV.1 Constraints on mass and radius derived from ${\mathcal{J}0740+6620}$

Next, we employ the values of $M$ and $R$ of ${\mathcal{P}SRJ0740+6620}$, as
$M=2.07\pm 0.11M_{\odot}$ and $R_{s}=12.34^{+1.89}_{-1.67}$ km, as documented
in (Legred et al., 2021). These measurements combine data from NICER and XMM
to limit $\alpha_{2}$.

(a) Mass Figure 1: Mass gievn by Eq. (22) for pulsar ${\mathcal{J}0740+6620}$
is shown to represent the limitations of observation on its radius and mass (
$R_{s}=12.35\pm 0.11$ km, $M=2.07\pm 0.11M_{\odot}$) as per (Legred et al.,
2021). For $\alpha_{2}=-0.0004$, we employ model parameters of approximately
[$C\approx 0.524$, $n_{0}\approx 0.489$, $n_{1}\approx-1.174$, $n_{2}=0.684$].
For $\alpha_{2}=0.0004$, we utilize [$C=0.47$, $n_{0}=0.493$, $n_{1}=-1.177$,
$n_{2}=0.684$]. For $\alpha_{2}=0$ GR, we use [$n_{0}\approx 0.491$,
$n_{1}=-1.1756$, $n_{2}=0.684$].

The mass function is defined as follows:

$\displaystyle{m(r)}=4\pi\int_{0}^{r}\rho(\zeta)\zeta^{2}d\zeta\,.$ (22)

Returning to the density profile described in Eq. (III.1), in the context of
the model $R+f({\mathcal{G}})=R+\alpha_{1}{\mathcal{G}}^{2}$, we generate the
plots shown in Fig. 1 for various numerical value of the parameter
$\alpha_{2}$.

  * •

In the case of $\alpha_{2}=0$, which corresponds to the GR scenario, the
constant’s numerical values are set as follows: {$n_{0}\approx 0.491$,
$n_{1}=-1.1756$, $n_{2}=0.684$}.

  * •

With $\alpha_{2}=0.0004$, we find $1.96M_{\odot}$ with ${R_{s}}\approx 12.65$
km, and $C\approx 0.47$. This leads to: {$\alpha_{2}=0.0004$, $C=0.47$,
$n_{0}=0.493$, $n_{1}=-1.177$, $n_{2}=0.684$}.

  * •

When $\alpha_{2}=-0.0004$, the gravitational mass is approximately
$2.22M_{\odot}$ with ${R_{s}}\approx 11.96$ km, and $C\approx 0.524$. These
values determine the numerical constants as follows: {$\alpha_{2}=-0.0004$,
$C\approx 0.524$, $n_{0}\approx 0.489$, $n_{1}\approx-1.174$, $n_{2}=0.684$}.

###  IV.2 Geometric component

We must highlight that the metric components ${\textit{g}_{tt}}$ and
${\textit{g}_{rr}}$ should not display any singularities within the star’s
interior. The ansatz given by Eq. (14) guarantees regularity of these
potentials at the central region because ${{g_{tt}(r=0)=e^{\psi}}}\neq 0$ and
${{g_{rr}(r=0)=1}}$. Meanwhile, the way these potentials behave inside the
star at any given radial position is shown in Fig. 2 1(a).

(a) matching conditions

(b) Z

Figure 2: The geometric aspect of pulsar ${\mathcal{J}0740+6620}$, as depicted
in 1(a), illustrates $g_{tt}$ and $g_{rr}$ using the KB, and the vacuum is the
Schwarzschild exterior solution. These graphical representations serve to
confirm the metric potentials’ finite values throughout the interior of the
pulsar and their seamless connection; 1(b) the redshift function (23), when
considering values of $\alpha_{2}$ equal to 0, as well as approximately $\pm
0.0004$, exhibits a peak redshift at the central point $\approx 0.8$, which
then consistently reduces to approximately $0.4$ as $r\to R_{s}$, across all
scenarios.

Additionally, we express the redshift function on the KB potentials in
relation to the quadratic form of ${\mathcal{R}}+f({\mathcal{G}})$ gravity.

$Z(r)=\frac{1}{\sqrt{-g_{tt}}}-1=\frac{1}{\sqrt{e^{n_{0}(r/R_{s})^{2}+n_{1}}}}-1.$
(23)

We have generated $Z$ plot for ${\mathcal{J}0740+6620}$, varying $\alpha_{2}$
as depicted in plot 21(b). When $\alpha_{1}=0$ (which corresponding to GR),
$Z(r\to 0)$ yields $Z(0)\approx 0.806$, while $Z(r\to R_{s})$ is
$Z_{s}=Z_{R_{s}}\approx 0.4$. When considering $\alpha_{2}=-0.0004$, $Z$
reaches its maximum value at the core with $Z(0)\approx 0.832$, which is
greater from GR. It then gradually reduces as we approach the surface, with
$Z_{s}\approx 0.405$, a value close to that of GR which is below $2$ as
indicated in (Buchdahl, 1959; Ivanov, 2002; Barraco et al., 2003; Böhmer and
Harko, 2006). Likewise, for $\alpha_{2}=0.0004$, we observe the maxima of
$Z(r\to 0)$ is $Z(0)\approx 0.774$, which is lower than the corresponding GR
value. This maximum redshift then gradually diminishes as we approach the
surface, with the redshift at the surface measuring approximately
$Z_{s}\approx 0.4072$ a value close to the GR prediction.

###  IV.3 Matter sector

By referring to Equ. (III.1) in conjunction with the numerical values in
Subsection IV.1, we can generate visual representations of$\rho$, $p_{r}$ and
$p_{t}$ as functions of the radial coordinate, as shown in the Fig.
32(a)–2(c). Clearly, $rho$, $p_{r}$ and $p_{t}$ adhere to the stability
criteria. Furthermore, we graphically represent $\Delta(r)$, in Fig. 32(d).
It’s important to highlight that in situations of substantial anisotropy, such
as in our current investigation, an additional positive force, proportional to
$\Delta/r$, becomes a significant factor. This opposing force counteracts
gravity, allowing the star to support high mass and achieve enhanced
compactness which we will provide in details in Subsection IV.7.

(a) $\rho$

(b) $p_{r}$

(c) $p_{t}$

(d) $\Delta$

Figure 3: Characteristics of pulsar under consideration, as depicted in 2(a)
to 2(c), illustrate $\rho$, $p_{r}$ and $p_{t}$ of Eq. (III.1). These visual
representations are provided for three scenarios:
$\alpha_{2}=0,\leavevmode\nobreak\ \pm 0.0004$. The illustrations confirm that
$\rho$ and the components of the pressures maintain limited values through the
inner of the pulsar and consistently reduce as we approach the surface 2(d)
depicts the anisotropy using the three cases:
$\alpha_{2}=0,\leavevmode\nobreak\ \pm 0.0004$. It’s evident that at the
central point, the anisotropy vanishes, indicated by $p_{t}=p_{r}$. However,
in regions away from the center, $\Delta$ takes on positive values (reflecting
strong anisotropy with $p_{t}>p_{r}$), which, in turn, gives rise to a
repulsive force denoted as $F_{a}=2\Delta/r$. This force plays a pivotal role
in adjusting the pulsar’s radius.

It’s important to provide numerical values for certain physical parameters of
pulsar ${\mathcal{J}0740+6620}$, as projected by the current model. These
values are as follows: With $\alpha_{2}=0.0004$, the core density amounts to
approximately ${\rho_{\text{core}}\approx 6.68\times 10^{14}}$ g/cm3, which is
approximately 2.5($\rho_{\text{nuc}}$), and $p_{r\to 0}$, is roughly
$7.81\times 10^{33}$ dyn/cm2, approximately equal to the core tangential
pressure, $p_{t\text{(core)}}$. At the pulsar’s surface, the density is
approximately ${\rho_{s}\approx 4.14\times 10^{14}}$ g/cm3, which is
approximately 1.5($\rho_{\text{nuc}}$). The radial pressure at the surface,
$p_{r(R_{s})}$, is approximately 0 dyn/cm2, and the tangential pressure at the
surface, $p_{t(R_{s})}$, is approximately $4.01\times 10^{33}$ dyn/cm2.

For $\alpha_{2}=-0.0004$, the central density amounts to approximately
${\rho_{\text{core}}\approx 7.78\times 10^{14}}$ g/cm3, which is approximately
2.9($\rho_{\text{nuc}}$). The pressure $p_{r\to 0}$, is approximately
$1.104\times 10^{34}$ dyn/cm2, approximately equal to the core tangential
pressure, $p_{t\text{(core)}}$. At the pulsar’s surface, we observe the
density to be approximately ${\rho_{s}\approx 4.1\times 10^{14}}$ g/cm3, which
is roughly 1.4 times the nuclear density ($\rho_{\text{nuc}}$). The radial
pressure at the surface, $p_{r(R_{s})}$, is nearly 0 dyn/cm2, while the
tangential pressure at the surface, $p_{t(R_{s})}$, is approximately
$3.9\times 10^{33}$ dyn/cm2.

As explained in Section III, we have employed the KB ansatz (14) to close the
system (III)–(III) instead of relying on EoS’s. Consequently, we define
$\eta:=r/R_{s}$ and express asymptotically Eqs. (III.1) to order
$O(\eta^{2})$. These equations yield the following relationships:

$\mathrm{p_{r}(\rho)\approx c_{1}\rho+c_{2}\,,\qquad p_{t}(\rho)\approx
c_{3}\rho+c_{4}}\,,$ (24)

where $c_{1}$, $c_{2}$, $c_{3}$, and $c_{4}$, are entirely dictated by
specific parameters in the model space, which are defined in Appendix A.
Notably, we can represent the previously mentioned equations in a way that is
more intuitively understandable from a physical perspective.

${\mathrm{p}_{r}(\rho)\approx v_{r}^{2}(\rho-{\rho_{1}})\,,\qquad
p_{t}(\rho)\approx v_{t}^{2}(\rho-{\rho_{2}})}\,,$ (25)

In this case, the quantities assume a more comprehensible form:
$v_{t}^{2}=c_{1}$, $v_{r}^{2}=c_{3}$ are the speeds of sound in the tangential
and radial directions moreover, $c_{2}/c_{1}$ is the density defined as
$-{\rho_{1}}$ and so on. It’s worth noting that ${\rho_{1}}$ corresponds
$\rho_{s}$ and verifies $p_{r}(\rho_{s})=0$. This doesn’t hold true to
${\rho_{2}}$ because $p_{t}$ may not necessarily be zero at the surface.

###  IV.4 Zeldovich’s criterion

A crucial requirement to ensure the stability of a star, as discussed in
(Zeldovich and Novikov, 1971), is that $p_{r}(r\to 0)$ should not $\rho(r\to
0)$, i.e.

${\mathrm{\frac{{p}_{r}(0)}{c^{2}{\rho}(0)}\leq 1.}}$ (26)

Referring to Eq. (III.1), we can derive $\rho(r\to 0)$ and $p_{r}(r\to 0)$.

$\displaystyle{\rho}_{{}_{r\to
0}}=3{\frac{n_{2}\,\left(1+32\alpha_{2}\,{n_{0}}^{2}n_{2}-3226\,\alpha_{2}\,{n_{2}}^{2}n_{0}\right)}{{c}^{2}{R_{s}}^{2}{\kappa^{2}}}}\,,$
$\displaystyle{p_{r}}_{{}_{r\to
0}}={\frac{2\,n_{0}-1376\,\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}+\left(256\,\alpha_{2}\,{n_{0}}^{3}-1\right)n_{2}}{{\chi}^{2}{R}^{2}}}.\quad$
(27)

Employing the previously obtained numerical values for the pulsar
${\mathcal{J}0740+6620}$ in Subsection IV.1, when $\alpha_{2}=0.0004$, the
Zeldovich inequality (26) translates to
$\frac{{p}_{r}(0)}{c^{2}{\rho}(0)}=0.102$, which is less than 1. Similarly,
for $\alpha_{2}=-0.0004$, the inequality leads to
$\frac{{p}_{r}(0)}{c^{2}{\rho}(0)}=0.105$, which is also less than 1. This
affirms that the Zeldovich criterion is satisfied in both scenarios. One of
the most exciting issues is the sign of the matter trace inside neutron stars.
Usually, the trace is assumed to be negative for normal matter
(electromagnetic field and non-interacting particles). However, this condition
could be broken in strongly interacting systems as mentioned by Zeldovich .
This case within the theory under consideration, $\mathcal{R}+f(\mathcal{G})$
gravity, is not satisfied, i.e., the trace of the solution presented in this
study has a positive value which is in agreement with what presented in
Podkowka et al. (2018).

###  IV.5 Conditions related to energy distributions

It is advantageous to express the Eq. (II) as:

$G_{\mu\nu}=\kappa\left(\mathfrak{T}_{\mu\nu}+\mathfrak{T}_{\mu\nu}^{geom}\right)=\kappa{{T_{\mu\nu}}^{eff}}.$
(28)

Here, $G_{\mu\nu}:=\mathcal{R}_{\mu\nu}-g_{\mu\nu}\mathcal{R}/2$ represents
the Einstein tensor, which accounts for the corrections introduced by the
quadratic form in $f({\mathcal{G}})$ theory De Felice and Tsujikawa (2010)

$\displaystyle\mathfrak{T}_{\mu\nu}^{geom}=-\frac{1}{\kappa^{2}}\left([2\mathcal{R}g_{\zeta\eta}\nabla^{2}+2\mathcal{R}\nabla_{\zeta}\nabla_{\eta}+4g_{\zeta\eta}\mathcal{R}^{\mu\nu}\nabla_{\mu}\nabla_{\nu}+4\mathcal{R}_{\zeta\eta}\nabla^{2}-4\mathcal{R}^{\mu}_{\zeta}\nabla_{\eta}\nabla_{\mu}-4\mathcal{R}^{\mu}_{\eta}\nabla_{\zeta}\nabla_{\mu}-4\mathcal{R}_{\zeta\mu\eta\nu}\nabla^{\mu}\nabla^{\nu}]f_{\mathcal{G}}\right.$
$\displaystyle-\left.\frac{1}{2}g_{\zeta\eta}f+[2\mathcal{R}\mathcal{R}_{\zeta\eta}-4\mathcal{R}^{\mu}_{\zeta}\mathcal{R}_{\mu\eta}-4\mathcal{R}_{\zeta\mu\eta\nu}R^{\mu\nu}+2\mathcal{R}^{\mu\nu\delta}_{\zeta}\mathcal{R}_{\eta\mu\nu\delta}]f_{\mathcal{G}}\right),$
(29)

and ${{T_{\mu\nu}}^{eff}}$ is given by
${{T_{\mu\nu}}^{eff}}=diag(-{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}{\tilde{\rho}_{1}}}}c^{2},{\tilde{p}_{1}}{}_{r},{\tilde{p}_{1}}{}_{t},{\tilde{p}_{1}}{}_{t})$.

(a) WEC &NEC (in the tangential direction)

(b) WEC & NEC (in the radial direction)

(c) SEC

(d) DEC in the radial direction

(e) DEC in the tangential direction

Figure 4: The graphical representations confirm the satisfaction of all the
energy conditions of ${{T_{\mu\nu}}^{eff}}$, as elaborated in Subsection IV.5.
The scenarios where $\alpha_{2}>0$ and $\alpha_{2}<0$ correspond to the cases
with $\alpha_{2}=0.0004$ and $\alpha_{2}=-0.0004$ respectively.

It’s important to note that the Ricci tensor in modified gravity of
$\mathcal{R}+f(\mathcal{G})$ can be expressed as follows
$\mathcal{R}_{\mu\nu}=\kappa\left({{T_{\mu\nu}}^{eff}}-\frac{1}{2}g_{\mu\nu}{{T_{\mu\nu}}^{eff}}\right)$.
This can be recognized from Eq. (28). In this context, we can modify the
energy conditions to encompass $\mathcal{R}+f(\mathcal{G})$ as:

  * a.

${{{\tilde{\rho}_{1}}}}\geq 0$,
${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{r}>0$ and
${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{t}>0$, specifically,
(WEC).

  * b.

${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{r}\geq 0$ and
${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{t}\geq 0$, namely, (NEC).

  * c.

${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{r}+2{{{\tilde{p}_{1}}}}{}_{t}\geq
0$, ${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{r}\geq 0$ and
${{{\tilde{\rho}_{1}}}}c^{2}+{{{\tilde{p}_{1}}}}{}_{t}\geq 0$.

  * d.

${{{\tilde{\rho}_{1}}}}\geq 0$,
${{{\tilde{\rho}_{1}}}}c^{2}-{{{\tilde{p}_{1}}}}{}_{r}\geq 0$ and
${{{\tilde{\rho}_{1}}}}c^{2}-{{{\tilde{p}_{1}}}}{}_{t}\geq 0$.

In Fig. 4, we plot the above conditions with possible values of $\alpha_{2}$.
These plots confirm that the current model for pulsar ${\mathcal{J}0740+6620}$
is satisfied.

###  IV.6 Causality properties of the model

Reflecting on the derived EoS (25), $p_{r}$ and $p_{t}$ are represented as:

$v_{r}^{2}=\frac{d{p}_{r}}{d{\rho}}=\frac{p^{\prime}_{r}}{{\rho^{\prime}}},\quad
v_{t}^{2}=\frac{d{p}_{t}}{d{\rho}}=\frac{p^{\prime}_{t}}{{\rho^{\prime}}}.$
(30)

Using Eq. (III.1), we derive derivatives of $\rho$, $p_{r}$ and $p_{t}$, which
are presented in the Appendix B, as detailed in Eqs. (B)–(B). We illustrate
the propagation of $c_{s}$ in both tangential an radial directions within
pulsar ${\mathcal{J}0740+6620}$, considering various values of the model
parameter $\alpha_{2}$. These visual representations are provided in plots
54(a) and 4(b) which confirm that the values of $v_{r}^{2}/c^{2}$ and
$v_{t}^{2}/c^{2}$ fall within the range of $0\leq{v_{r}^{2}}/c^{2}\leq 1$ and
$0\leq{v_{t}^{2}/c^{2}}\leq 1$, thereby satisfying the causality and stability
conditions. As Fig. 54(c) shows the stability of an anisotropic stellar
configuration is verified (Herrera, 1992).

(a) Speed of sound in the radial direction

(b) Speed of sound in the tangential direction

(c) Stability under conditions of strong anisotropy

Figure 5: Sound speed of ${\mathcal{J}0740+6620}$ for
$\alpha_{2}=0,\leavevmode\nobreak\ \pm 0.0004$ is presented as follows: 4(a)
and 4(b) illustrate the sound propagation as described by Eq. (30). In 4(c),
the figures demonstrate that $(v_{t}^{2}-v_{r}^{2})/c^{2}<0$ required for a
strongly anisotropic configuration.

It’s worth mentioning that the speed of sound both directions, (radial and
tangential), undergoes changes as we move radially, as visualized in plots
54(a) and 4(b). When $\alpha_{2}=0.0004$, we observe that
$0.30<v_{r}^{2}/c^{2}<0.45$, and $0.19<v_{t}^{2}/c^{2}<0.22$. In the case of
$\alpha_{2}=-0.0004$, we find that $0.33<v_{r}^{2}/c^{2}<0.35$ and
$0.19<v_{t}^{2}/c^{2}<0.30$. The maximum bounds of these periods correspond to
the speeds of sound as $r\to 0$.

###  IV.7 Adiabatic indices and the state of hydrostatic equilibrium

In this section we are going to use another tool to test the stability of the
model under consideration For this aim, we define the following quantities
(Chandrasekhar, 1964; Chan et al., 1993):

${\gamma}=\frac{4}{3}\left(1+\frac{{\Delta}}{r|{p}^{\prime}_{r}|}\right)_{max},\qquad\qquad{\Gamma_{r}}=\frac{{\rho
c^{2}}+{p_{r}}}{{p_{r}}}{v_{r}^{2}},\qquad\qquad{\Gamma_{t}}=\frac{{\rho
c^{2}}+{p_{t}}}{{p_{t}}}{v_{t}^{2},}$ (31)

where ${\gamma}$, define the adiabatic index and ${\Gamma_{r}}$ and
${\Gamma_{t}}$ are the adiabatic indices in the radial and tangential
direction. Certainly, in the isotropic case where $\Delta=0$, we have
$\gamma=4/3$. In the case of mild anisotropy where $\Delta<0$, we find
$\gamma<4/3$, similar to what is observed in Newtonian theory. However, in the
case of strong anisotropy, we have $\gamma>4/3$. In neutral equilibrium
$\Gamma=\gamma$, while $\Gamma\gamma$ to achieve a stable equilibrium Chan et
al. (1993); Heintzmann and Hillebrandt (1975). By leveraging Eqs. (III.1) we
can determine (B)–(B), and show that $f(\mathcal{G})$ in its quadratic form
offers a stable model for pulsar ${\mathcal{J}0740+6620}$, regardless of the
specific values of $\alpha_{2}$, as shown in Fig. 6. As is clear from Fig. 6
5(b) that the radial pressure diverges at the stellar surface because our
model is self bound Heiselberg and Pandharipande (2000); Lattimer and Prakash
(2007); Lynn et al. (1990).

Next, we explore the hydrostatic equilibrium in the current model using the
TOV equation. This equation has been modified to be applicable to a specific
context of $\mathcal{R}+f(\mathcal{G})$ theory, and it takes the following
form Tolman (1934, 1939); Oppenheimer and Volkoff (1939):222 It is of interest
to stress that the TOV equation given by Eq. (32) is different from the
original one due to the extra term given by ${\mathcal{F}_{G}}$. The
appearance of this term is due to the non-conservation given by Eq. (7).

${\mathcal{F}_{a}}+{\mathcal{F}_{g}}+{\mathcal{F}_{h}}+{\mathcal{F}_{G}}=0\,.$
(32)

in this context, ${\mathcal{F}_{h}}$, ${\mathcal{F}_{a}}$, and
${\mathcal{F}_{g}}$, denote hydrostatic, anisotropic, and gravitational
forces, along with the supplementary force ${\mathcal{F}_{\mathcal{G}}}$
arising from the effects of the quadratic $\mathcal{R}+f(\mathcal{G})$ gravity
theory $f(\mathcal{G})$. Such forces are characterized as:

$\displaystyle{\mathcal{F}_{a}}$ $\displaystyle=$
$\displaystyle\frac{2{\mathit{\Delta}}}{\mathit{r}},\qquad{\mathcal{F}_{g}}=-\frac{{\mathit{M}_{g}}}{r}({\mathit{\rho}c^{2}}+{\mathit{p}_{r}})e^{\varrho/2},$
$\displaystyle{\mathcal{F}_{h}}$ $\displaystyle=$
$\displaystyle-{\mathit{p}^{\prime}_{t}},\qquad{\mathcal{F}_{\mathcal{G}}}=-2\alpha_{2}(\mathcal{G}^{\prime}).$
(33)

Within the force equation for ${\mathcal{F}_{g}}$, we present
$\varrho:=\psi-\lambda$, and $M_{g}$ depicts, in three dimensions, the mass of
an isolated system. This quantity is defined through the use of the expression
presented in (Tolman, 1930) adapted to the context of
$\mathcal{R}+f(\mathcal{G})$ gravity

$\displaystyle{\mathrm{M}_{g}(r)}$ $\displaystyle=$
$\displaystyle{\int_{\mathit{V}}}\Big{(}\mathfrak{{{T_{1}}}}{{}^{r}}{{}_{r}}+\mathfrak{{{T_{1}}}}{{}^{\theta}}{{}_{\theta}}+{\mathfrak{T_{1}}}{{}^{\phi}}{{}_{\phi}}-{\mathfrak{T_{1}}}{{}^{t}}{{}_{t}}\Big{)}\sqrt{-g}\,dV$
(34) $\displaystyle=$ $\displaystyle
e^{-\psi}(e^{\psi/2})^{\prime}e^{\lambda/2}r=\frac{1}{2}r\psi^{\prime}e^{-\varrho/2}\,.$

As a result, the gravitational force is expressed as
${\mathit{F}_{g}}=-\frac{n_{0}r}{R_{s}^{2}}({\mathit{\rho}c^{2}}+{p_{r}})$. By
employing Eqs. (III.1) and (B)–(B), we can verify Eq. (32) which ensure by
plot 7.

(a) $\gamma$

(b) $\Gamma_{r}$

(c) $\Gamma_{t}$

Figure 6: The adiabatic indices, as presented in Eq. (31), for
${\mathcal{J}0740+6620}$.

(a) The TOV limitations of GR

(b) The TOV limitations for $\alpha_{2}>0$

(c) The TOV limitations for $\alpha_{2}<0$)

Figure 7: TOV constraint (32): Various forces, given by Eqs. (IV.7), acting
within the pulsar ${\mathcal{J}0740+6620}$ are depicted for
$\alpha_{2}=0,\leavevmode\nobreak\ \pm 0.0004$. In the case
$\alpha_{2}=0.0004$ an extra negative force, further reinforcing the force of
gravitational collapse. When $\alpha_{2}=-0.0004$, introduces a l positive
additional force, that mitigates the collapsing force.

##  V The relationship between mass and radius and the equation of state

Astrophysicists are still grappling with the enigmatic composition of matter
within the cores of neutron stars, as these cores achieve densities greater
than ($\rho_{\text{nuc}}$), an unexplored domain lying beyond the grasp of
earthly laboratories. In spite that the EoS controlling the matter inside
neutron stars is still unknown, measurements of their mass and radius in
astrophysical settings may be able to constrain it. As a result, astrophysical
observations can narrow down the mass-radius diagram linked to a particular
EoS. Indeed, in this study, we do not enforce specific EoSs; instead, we
employ the KB ansatz (14). However, EoS derived from this ansatz shows a
relationship between $\rho$ and pressure ((25)), which are mainly useful at
the core because of their dependence on power series. Utilizing the numerical
values provided in Section IV.1 for the pulsar ${\mathcal{J}0740+6620}$ and
the equations of motion of $\mathcal{R}+f(\mathcal{G})$ given by Eqs. (III.1),
we create Fig. 8.

(a) EoS in the radial direction

(b) EoS in the tangential direction

Figure 8: Optimal fit EoSs for the pulsar ${\mathcal{J}0740+6620}$, as shown
in 7(a), involve the generation of a series of data for $\rho$ and $p_{r}$
using Eqs. (III.1) with $\alpha_{2}=\pm 0.0004$. These observations are
consistent with a linear EoS behavior (7(b). Likewise, when considering
tangential EoS’s when $\alpha_{2}=\pm 0.0004$ The data points exhibit robust
alignment with a linear trend and align with previously established results,
particularly Eq. (25). This reaffirms the validity of these relationships
within the pulsar’s interior.

(a) Compactness versus radius

(b) Diagram depicting mass as a function of radius

Figure 9: 8(a). Compactness versus radius plot: The dashed horizontal line
denotes the BL at a compactness of $C=8/9$. We illustrate the Compactness-
radius curves associated with the optimal EoS fits as provided in Fig. 8.
Furthermore, we depict Compactness-radius curves for $\rho_{s}=4\times
10^{14}$ g/cm3. It’s worth mentioning that for $\alpha_{2}=0.0004$ the
compactness can be extended up to the BL of $C\to 8/9$ a characteristic shared
with the GR model (Roupas and Nashed, 2020). It is noteworthy that,
intriguingly, when $\alpha_{2}=0.0004$ the extreme value of the compactness is
below the BL for $\rho_{s}=4\times 10^{14}$ g/cm3. The Mass-radius (MR) plot
presented in 8(b), the colors gray (orange) area denotes the black hole limit.
Likewise, in the case of positive/negative $\alpha_{2}$ even at their maximum
mass, the mass-radius curves do not cross the BL.

In this study, concerning $J0740+662$, we determine the BL as follows: For
$\alpha_{2}=\pm 0.0004$ we obtain $C\lesssim 0.86$ which results in slight
modifications to the GR BL. This aligns with our observation that quadratic
gravity in this scenario introduces an additional force to TOV equation. This
opposing force counteracts gravity, allowing the pulsar to have greater mass
and attain greater compactness. We assume a surface density of
$\rho_{\text{s}}=4\times 10^{14}$ g/cm3 for both $\alpha_{2}=\pm 0.0004$. For
various values of the compactness parameter in the range of $0\leq C\leq 1$ we
compute the density profile using Eq. (III.1) to derive the corresponding
radius $R$. Likewise, we derive compactness-radius curves, as depicted in plot
98(a).

For the previously derived best-fit equations of state, MR curves are provided
in plot 98(b) for positive and negative values of $\alpha_{2}$.

##  VI Conclusion and Discussion

The Gauss-Bonnet term holds significant importance in the realms of
differential geometry and theoretical physics. It plays a significant role in
modern theoretical physics, particularly in the framework of gravitational
theories in the frame of astrophysics and cosmology. The Gauss-Bonnet term is
a topological invariant, and its quadratic form is often considered in higher-
dimensional theories of gravity. In four spacetime dimensions, the Gauss-
Bonnet term is a topological invariant and does not contribute to the
equations of motion. However, in higher dimensions, it can significantly
impact the dynamics of spacetime and matter fields.

Pulsars are crucial astronomical objects, serving as powerful tools for
testing various physical theories, including general relativity and
alternative theories of gravity. Understanding the behavior of pulsars in the
presence of exotic terms in the Einstein-Hilbert action, such as the function
$f(\mathcal{G})$ Gauss-Bonnet term, can shed light on the fundamental physics
governing these astrophysical phenomena.

In this current study, we explored the quadratic $\mathcal{R}+f(\mathcal{G})$
gravity theory by subjecting it to scrutiny through the lens of astrophysical
observations. We examined a plausible situation involving an anisotropic
fluid, as is typical for the extremely dense material found within pulsars.
Additionally, we supposed that the interior abide to the KB ansatz, which
guarantees the smoothness of the inner geometry. Specifically, we leveraged
precise measurements of $M$ and $R$ of ${\mathcal{P}SRJ0740+6620}$, which were
determined as $M=2.07\pm 0.11M_{\odot}$ and a radius of
$R_{s}=12.34^{+1.89}_{-1.67}$ km, based on NICER+XMM observations (Legred et
al., 2021). These observations allowed us to delimit $\alpha_{1}$ of
$f(\mathcal{G})$ gravity, i.e. [$\alpha_{1}$, $C$]. Conversely,
${\mathcal{P}SRJ0740+6620}$ stands out as one of the most massive pulsars,
rendering it an ideal candidate for assessing modified gravity theories.

We have shown the MR plot linked to the best-fit EoS, as shown in Fig. 98(b).
When $\alpha_{2}=0.0004$ and with a surface density $\rho_{s}=4\times 10^{14}$
g/cm3 we obtained $M=4.71M_{\odot}$ and $R_{s}=12.6$ km. When
$\alpha_{2}=-0.0004$ and $\rho_{s}=4.0\times 10^{14}$ g/cm3, we obtained
$M=4.1M_{\odot}$ and $R_{s}=14.4$ km. These values align perfectly with those
observed in the pulsar ${\mathcal{J}0740+6620}$.

To summarize our results:
i- We have succeeded for the first time in constructing a stellar model within
the framework of the quadratic form of $f(G)$.
ii- We have shown that our model is satisfactory from different requirements
imposed on any physically admissible stellar model.
iii- Finally, we derive the mass-radius diagram showing the capability of the
obtained curves to match observational data of other pulsars.

## Acknowledgments

The work of KB was partially supported by the JSPS KAKENHI Grant Number
21K03547 and 23KF0008.

A

##  Appendix A The KB model and the induced EoSs

It has been shown that the KB ansatz relates the pressures and the density
which effectively induces the EoSs as given by Eqs. (24). The coefficients in
those equations are related to the model parameters as listed as below.

$\displaystyle
c_{1}=\frac{1}{{R_{s}}^{4}{n_{2}}^{2}}\left\\{{4\left(256\alpha_{1}{n_{0}}^{3}n_{2}{R_{s}}^{4}-1376\alpha_{1}{n_{0}}^{2}{n_{2}}^{2}{R_{s}}^{4}-n_{2}{R_{s}}^{4}+2n_{0}{R_{s}}^{4}\right)n_{2}}+\left(\frac{7}{2}{n_{2}}^{2}{R_{s}}^{4}+192\alpha_{1}{n_{0}}^{3}{n_{2}}^{2}{R_{s}}^{4}-6n_{0}n_{2}{R_{s}}^{4}\right.\right.$
$\displaystyle\left.\left.-{\frac{2464}{3}}\alpha_{1}{n_{0}}^{2}{n_{2}}^{3}{R_{s}}^{4}\right)\right\\}\left(54144\alpha_{1}{n_{0}}^{2}n_{2}-501888\alpha_{1}{n_{2}}^{2}n_{0}+90+6912\alpha_{1}\,{n_{0}}^{3}\right){c}^{2}\left(9024\alpha_{1}{n_{0}}^{2}n_{2}-83648\alpha_{1}{n_{2}}^{2}n_{0}+15\right.$
$\displaystyle\left.+1152\,\alpha_{1}\,{n_{0}}^{3}\right)^{-2},$ (35)
$\displaystyle
c_{2}={\frac{(256\alpha_{1}{n_{0}}^{3}n_{2}-1376\alpha_{1}{n_{0}}^{2}{n_{2}}^{2}-n_{2}+2n_{0})}{\kappa{R_{s}}^{2}}}+\frac{1}{{R_{s}}^{2}{n_{2}}^{2}}\left\\{{\frac{4\left(256\alpha_{1}{n_{0}}^{3}n_{2}-1376\alpha_{1}{n_{0}}^{2}{n_{2}}^{2}-n_{2}+2n_{0}\right)n_{2}}{\kappa}}\right.$
$\displaystyle\left.+\frac{1}{\kappa}\left(\frac{7}{2}\,{n_{2}}^{2}+192\,\alpha_{1}\,{n_{0}}^{3}{n_{2}}^{2}-6\,n_{0}\,n_{2}-{\frac{2464}{3}}\,\alpha_{1}\,{n_{0}}^{2}{n_{2}}^{3}\right)\right\\}\left(54144\,\alpha_{1}\,{n_{0}}^{2}n_{2}-501888\,\alpha_{1}\,{n_{2}}^{2}n_{0}+90+6912\,\alpha_{1}\,{n_{0}}^{3}\right)$
$\displaystyle\left(2496\,\alpha_{1}\,{n_{2}}^{3}n_{0}-3\,n_{2}+96\,\alpha_{1}\,{n_{0}}^{2}{n_{2}}^{2}\right)\left(9024\,\alpha_{1}\,{n_{0}}^{2}n_{2}-83648\,\alpha_{1}\,{n_{2}}^{2}n_{0}+15+1152\,\alpha_{1}\,{n_{0}}^{3}\right)^{-2},$
(36) $\displaystyle
c_{3}={\frac{\left(18432\,\alpha_{1}\,{n_{0}}^{3}\,{R_{s}}^{2}{c}^{2}-6\,{R_{s}}^{2}{c}^{2}\right){n_{2}}^{2}-68416\,\alpha_{1}\,{n_{0}}^{2}\,{R_{s}}^{2}{c}^{2}{n_{2}}^{3}+\left(18\,n_{0}\,\kappa\,{R_{s}}^{2}{c}^{2}-768\,\alpha_{1}\,{n_{0}}^{4}{R_{s}}^{2}{c}^{2}\right)n_{2}-6\,{n_{0}}^{2}{R_{s}}^{2}{c}^{2}}{{R_{s}}^{2}\left(9024\,\alpha_{1}\,{n_{0}}^{2}n_{2}-83648\,\alpha_{1}\,{n_{2}}^{2}n_{0}+15+1152\,\alpha_{1}\,{n_{0}}^{3}\right){n_{2}}^{2}}},$
(37) $\displaystyle
c_{4}=\frac{1}{n_{2}\,{R_{s}}^{2}\kappa}\left\\{68672\,{n_{2}}^{4}\alpha_{1}\,n_{0}-55666688\,{n_{2}}^{5}{\alpha_{1}}^{2}{n_{0}}^{3}+18743296\,{n_{2}}^{4}{\alpha_{1}}^{2}{n_{0}}^{4}+53792\,\alpha_{1}\,{n_{0}}^{2}{n_{2}}^{3}-2961408\,{n_{2}}^{3}{\alpha_{1}}^{2}{n_{0}}^{5}+3\,{n_{2}}^{2}-\right.$
$\displaystyle\left.51264\alpha_{1}{n_{0}}^{3}{n_{2}}^{2}+368640{n_{2}}^{2}{\alpha_{1}}^{2}{n_{0}}^{6}-24n_{0}n_{2}+5184n_{2}\alpha_{1}{n_{0}}^{4}+18{n_{0}}^{2}\right\\}\left(9024\alpha_{1}{n_{0}}^{2}n_{2}-83648\alpha_{1}{n_{2}}^{2}n_{0}+15+1152\alpha_{1}{n_{0}}^{3}\right)^{-1}.$
(38)

Using the above set of equations, one can find the physical quantities appear
in Eq. (25) in terms of the model parameters, where $v_{r}^{2}=c_{1}$,
$\rho_{1}=\rho_{s}=-c_{2}/c_{1}$, $v_{t}^{2}=c_{3}$ and
$\rho_{2}=-c_{4}/c_{3}$.

##  Appendix B Density and pressures gradients

Recalling the matter density and the pressures as obtained for the quadratic
polynomial $f(R)$ gravity, namely Eqs. (III.1), we obtain the gradients of
these quantities with respect to the radial distance as below

$\displaystyle\rho^{\prime}=\frac{-2\,{e^{-4{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}}{{R_{s}}^{4}{\kappa^{2}}{r}^{7}{c}^{2}}\left(256{r}^{6}\alpha_{2}{n_{0}}^{2}{n_{2}}^{2}{R_{s}}^{2}+256{r}^{6}\alpha_{2}\,{n_{0}}^{3}n_{2}\,{R_{s}}^{2}+192\,{r}^{4}\alpha_{2}\,{n_{0}}^{2}n_{2}{R_{s}}^{4}-3840\,{r}^{2}\alpha_{2}{R_{s}}^{6}n_{0}n_{2}-10240\,{r}^{6}\alpha_{2}{n_{2}}^{3}n_{0}\,{R_{s}}^{2}\right.$
$\displaystyle\left.-7168\,{r}^{4}\alpha_{2}\,{n_{2}}^{2}n_{0}\,{R_{s}}^{4}-192\,{r}^{8}\alpha_{2}\,{n_{0}}^{4}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-13440\,{r}^{8}\alpha_{2}\,{n_{2}}^{4}n_{0}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+5184\,{r}^{8}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{3}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+768\,{r}^{8}\alpha_{2}\,{n_{0}}^{3}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right.$
$\displaystyle\left.-128\,{r}^{2}\alpha_{2}\,{R_{s}}^{6}{n_{0}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-128\,{r}^{4}\alpha_{2}\,{a_{0}}^{3}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}+64\,{r}^{8}\alpha_{2}\,{n_{0}}^{4}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}n_{2}+768\,{r}^{8}\alpha_{2}\,{n_{2}}^{4}n_{0}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-704\,{r}^{8}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{3}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right.$
$\displaystyle\left.-128\,{r}^{8}\alpha_{2}\,{n_{0}}^{3}{n_{2}}^{2}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+64\,{r}^{2}\alpha_{2}\,{R_{s}}^{6}{n_{0}}^{2}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+64\,{r}^{4}\alpha_{2}\,{n_{0}}^{3}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}+{r}^{6}{e^{3\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}n_{2}\,{R_{s}}^{2}+{r}^{4}{e^{3\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}-{r}^{4}{e^{4\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}\right.$
$\displaystyle\left.-1152\,{R_{s}}^{8}\alpha_{2}\,n_{0}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+64\,{r}^{4}\alpha_{2}\,{n_{0}}^{3}{R_{s}}^{4}+64\,{r}^{2}\alpha_{2}\,{R_{s}}^{6}{n_{0}}^{2}+21504\,{n_{2}}^{4}{r}^{8}\alpha_{2}\,n_{0}-6016\,{n_{2}}^{3}{r}^{8}\alpha_{2}\,{n_{0}}^{2}-768\,{n_{2}}^{2}{r}^{8}\alpha_{2}\,{n_{0}}^{3}\right.$
$\displaystyle\left.+128\,n_{2}\,{r}^{8}\alpha_{2}\,{n_{0}}^{4}+2304\,{R_{s}}^{8}\alpha_{2}\,n_{0}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-2\,{r}^{8}{n_{2}}^{2}{e^{3\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-1152\,{R_{s}}^{8}\alpha_{2}\,n_{0}+5632\,{r}^{2}\alpha_{2}\,{R_{s}}^{6}n_{0}\,n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right.$
$\displaystyle\left.+7808\,{r}^{4}\alpha_{2}\,{R_{s}}^{4}n_{0}\,{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-320\,{r}^{4}\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}-384\,{r}^{6}\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}-384\,{r}^{6}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}\right.$
$\displaystyle\left.+8448\,{r}^{6}\alpha_{2}\,{n_{2}}^{3}n_{0}\,{e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}-1792\,{r}^{2}\alpha_{2}\,{R_{s}}^{6}n_{0}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}n_{2}-1536\,{r}^{4}\alpha_{2}\,{R_{s}}^{4}n_{0}\,{n_{2}}^{2}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+128\,{r}^{4}\alpha_{2}\,{n_{0}}^{2}n_{2}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{4}\right.$
$\displaystyle\left.+128\,{r}^{6}\alpha_{2}\,{n_{0}}^{3}n_{2}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}+128\,{r}^{6}\alpha_{2}\,{n_{0}}^{2}{n_{2}}^{2}{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}-1024\,{r}^{6}\alpha_{2}\,{n_{2}}^{3}n_{0}\,{e^{2\,{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{2}\right),$
(39) $\displaystyle
p^{\prime}_{r}=\frac{1}{{R_{s}}^{4}{\kappa^{2}}{e^{{\frac{4n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{r}^{5}}\left(2\,\left({e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right)^{4}{R_{s}}^{4}{r}^{2}+\left(-2\,{R_{s}}^{4}{r}^{2}-2\,n_{2}\,{R_{s}}^{2}{r}^{4}-4\,{r}^{6}n_{0}\,n_{2}\right)\left({e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right)^{3}-640\,\alpha_{2}\,\left(\frac{1}{5}\,n_{2}\,\left(n_{0}+3\,n_{2}\right)\right.\right.$
$\displaystyle\left.\left.\left(n_{0}-n_{2}\right){r}^{6}+2/5\,{R_{s}}^{2}n_{2}\,\left(n_{2}+n_{0}\right){r}^{4}+1/5\,{R_{s}}^{4}\left(6\,n_{2}+n_{0}\right){r}^{2}+{R_{s}}^{6}\right){n_{0}}^{2}\left({e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right)^{2}+2304\,\alpha_{2}\,{n_{0}}^{2}\left(\frac{1}{6}\,n_{2}\,\left(6\,n_{0}\,n_{2}-15\,{n_{2}}^{2}\right.\right.\right.$
$\displaystyle\left.\left.\left.+{n_{0}}^{2}\right){r}^{6}+1/3\,{R_{s}}^{2}n_{2}\,\left(n_{0}+3\,n_{2}\right){r}^{4}+1/9\,{R_{s}}^{4}\left(n_{0}+{\frac{33}{2}}\,n_{2}\right){r}^{2}+{R_{s}}^{6}\right){e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}-1664\,\left(\frac{2}{13}\,n_{2}\,\left(n_{0}+21\,n_{2}\right)\left(n_{0}-3\,n_{2}\right){r}^{6}\right.\right.$
$\displaystyle\left.\left.+{\frac{4}{13}}\,{R_{s}}^{2}n_{2}\,\left(9\,n_{2}+n_{0}\right){r}^{4}+1/13\,{R_{s}}^{4}\left(n_{0}+35\,n_{2}\right){r}^{2}+{R_{s}}^{6}\right)\alpha_{2}\,{n_{0}}^{2}\right)\,,$
(40) $\displaystyle
p^{\prime}_{t}=\frac{1}{{\kappa^{2}}{e^{{\frac{4n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}{R_{s}}^{6}{r}^{5}}\left\\{2\,{r}^{6}\left(\left(-n_{2}\,{r}^{2}+{R_{s}}^{2}\right){n_{0}}^{2}+\left({n_{2}}^{2}{r}^{2}-3\,n_{2}\,{R_{s}}^{2}\right)n_{0}+{n_{2}}^{2}{R_{s}}^{2}\right)\left({e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right)^{3}-128\,{R_{s}}^{2}{n_{0}}^{2}\alpha_{2}\,\left(n_{0}\,{r}^{2}+{R_{s}}^{2}\right.\right.$
$\displaystyle\left.\left.-n_{2}\,{r}^{2}\right)\left({R_{s}}^{4}+{r}^{2}{R_{s}}^{2}n_{2}+n_{2}\,{r}^{4}n_{0}-{n_{2}}^{2}{r}^{4}\right)\left({e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}\right)^{2}-768\,\alpha_{2}\,{n_{0}}^{2}\left(\left(-1/6\,n_{2}\,{r}^{6}{R_{s}}^{2}-{n_{2}}^{2}{r}^{8}\right){n_{0}}^{2}+\left(6\,{n_{2}}^{3}{r}^{8}-3\,{n_{2}}^{2}{r}^{6}{R_{s}}^{2}\right.\right.\right.$
$\displaystyle\left.\left.\left.-2\,n_{2}\,{r}^{4}{R_{s}}^{4}-\frac{2}{3}\,{r}^{2}{R_{s}}^{6}\right)n_{0}+{\frac{43}{6}}\,{n_{2}}^{3}{r}^{6}{R_{s}}^{2}+{\frac{23}{6}}\,n_{2}\,{r}^{2}{R_{s}}^{6}+7\,{n_{2}}^{2}{r}^{4}{R_{s}}^{4}-5\,{n_{2}}^{4}{r}^{8}+{R_{s}}^{8}\right){e^{{\frac{n_{2}\,{r}^{2}}{{R_{s}}^{2}}}}}+896\,\alpha_{2}\,{n_{0}}^{2}\left(\frac{2}{7}\,n_{2}\,{r}^{6}\left({R_{s}}^{2}\right.\right.\right.$
$\displaystyle\left.\left.\left.-8\,n_{2}\,{r}^{2}\right){n_{0}}^{2}-\frac{3}{7}\,{r}^{2}\left(4\,n_{2}\,{R_{s}}^{4}{r}^{2}+{R_{s}}^{6}-{\frac{160}{3}}\,{r}^{6}{n_{2}}^{3}+{\frac{76}{3}}\,{n_{2}}^{2}{R_{s}}^{2}{r}^{4}\right)n_{0}+{R_{s}}^{8}-48\,{n_{2}}^{4}{r}^{8}+{\frac{68}{7}}\,{n_{2}}^{2}{r}^{4}{R_{s}}^{4}+{\frac{31}{7}}\,n_{2}\,{r}^{2}{R_{s}}^{6}\right.\right.$
$\displaystyle\left.\left.+{\frac{274}{7}}\,{n_{2}}^{3}{r}^{6}{R_{s}}^{2}\right)\right\\}\,.$
(41)

## References

  * Herrera and Santos (1997) L. Herrera and N. O. Santos, Phys. Rept. 286, 53 (1997).
  * Herrera et al. (2008) L. Herrera, J. Ospino, and A. Di Prisco, Phys. Rev. D 77, 027502 (2008), eprint 0712.0713.
  * Herrera (2020) L. Herrera, Phys. Rev. D 101, 104024 (2020), eprint 2005.06358.
  * Schwarzschild (1916) K. Schwarzschild, Sitzungsberichte der königlich preussischen Akademie der Wissenschaften pp. 189–196 (1916).
  * Florides (1974) P. S. Florides, Proceedings of the Royal Society of London. A. Mathematical and Physical Sciences 337, 529 (1974).
  * Grøn (1986) Ø. Grøn, General relativity and gravitation 18, 591 (1986).
  * Kohri (2001) K. Kohri, Phys. Rev. D 64, 043515 (2001), eprint astro-ph/0103411.
  * Gabbanelli et al. (2019) L. Gabbanelli, J. Ovalle, A. Sotomayor, Z. Stuchlik, and R. Casadio, Eur. Phys. J. C 79, 486 (2019), eprint 1905.10162.
  * Posada and Chirenti (2019) C. Posada and C. Chirenti, Class. Quant. Grav. 36, 065004 (2019), eprint 1811.09589.
  * Calmet et al. (2020) X. Calmet, R. Casadio, and F. Kuipers, Phys. Rev. D 102, 026018 (2020), eprint 2007.05416.
  * Tolman (1934) R. C. Tolman, Proc. Nat. Acad. Sci. 20, 169 (1934).
  * Tolman (1939) R. C. Tolman, Physical Review 55, 364 (1939).
  * Oppenheimer and Volkoff (1939) J. R. Oppenheimer and G. M. Volkoff, Physical Review 55, 374 (1939).
  * Rhoades and Ruffini (1974) C. E. Rhoades, Jr. and R. Ruffini, Phys. Rev. Lett. 32, 324 (1974).
  * Chandrasekhar and Milne (1931) S. Chandrasekhar and E. A. Milne, Mon. Not. Roy. Astron. Soc. 91, 456 (1931).
  * Shapiro and Teukolsky (1983) S. L. Shapiro and S. A. Teukolsky, _Black holes, white dwarfs and neutron stars. The physics of compact objects_ (1983).
  * Horvath et al. (2021) J. E. Horvath, L. S. Rocha, A. Bernardo, R. Valientim, and M. G. B. de Avellar, Astron. Nachr. 342, 294 (2021).
  * Margalit and Metzger (2017) B. Margalit and B. D. Metzger, Astrophys. J. Lett. 850, L19 (2017), eprint 1710.05938.
  * Shibata et al. (2017) M. Shibata, S. Fujibayashi, K. Hotokezaka, K. Kiuchi, K. Kyutoku, Y. Sekiguchi, and M. Tanaka, Phys. Rev. D 96, 123012 (2017), eprint 1710.07579.
  * Ruiz et al. (2018) M. Ruiz, S. L. Shapiro, and A. Tsokaros, Phys. Rev. D 97, 021501 (2018), eprint 1711.00473.
  * Rezzolla et al. (2018) L. Rezzolla, E. R. Most, and L. R. Weih, Astrophys. J. Lett. 852, L25 (2018), eprint 1711.00314.
  * Cromartie et al. (2019) H. T. Cromartie et al. (NANOGrav), Nature Astron. 4, 72 (2019), eprint 1904.06759.
  * Nojiri and Odintsov (2011) S. Nojiri and S. D. Odintsov, Phys. Rept. 505, 59 (2011), eprint 1011.0544.
  * Joyce et al. (2015) A. Joyce, B. Jain, J. Khoury, and M. Trodden, Phys. Rept. 568, 1 (2015), eprint 1407.0059.
  * Nojiri et al. (2017) S. Nojiri, S. D. Odintsov, and V. K. Oikonomou, Phys. Rept. 692, 1 (2017), eprint 1705.11098.
  * Frusciante and Perenon (2020) N. Frusciante and L. Perenon, Phys. Rept. 857, 1 (2020), eprint 1907.03150.
  * Olmo et al. (2020) G. J. Olmo, D. Rubiera-Garcia, and A. Wojnar, Physics Reports 876, 1 (2020).
  * Lobo (2006) F. S. N. Lobo, Phys. Rev. D 73, 064028 (2006), eprint gr-qc/0511003.
  * Rahaman et al. (2012a) F. Rahaman, S. Islam, P. K. F. Kuhfittig, and S. Ray, Phys. Rev. D 86, 106010 (2012a), eprint 1209.2917.
  * Mehdizadeh et al. (2015) M. R. Mehdizadeh, M. Kord Zangeneh, and F. S. N. Lobo, Phys. Rev. D 91, 084004 (2015), eprint 1501.04773.
  * Sharif and Ikram (2014) M. Sharif and A. Ikram, Int. J. Mod. Phys. D 24, 1550003 (2014).
  * Shamir and Ahmad (2017) M. F. Shamir and M. Ahmad, Eur. Phys. J. C 77, 674 (2017), eprint 1705.06910.
  * Wu and Huang (2019) B. Wu and C.-G. Huang, Eur. Phys. J. C 79, 519 (2019), eprint 1807.00683.
  * Nashed and Capozziello (2020) G. G. Nashed and S. Capozziello, The European Physical Journal C 80, 1 (2020).
  * Roupas and Nashed (2020) Z. Roupas and G. G. Nashed, The European Physical Journal C 80, 1 (2020).
  * Krori and Barua (1975) K. D. Krori and J. Barua, Journal of Physics A 8, 508 (1975).
  * Varela et al. (2010) V. Varela, F. Rahaman, S. Ray, K. Chakraborty, and M. Kalam, Phys. Rev. D 82, 044052 (2010), eprint 1004.2165.
  * Rahaman et al. (2012b) F. Rahaman, R. Sharma, S. Ray, R. Maulick, and I. Karar, Eur. Phys. J. C 72, 2071 (2012b), eprint 1108.6125.
  * Kalam et al. (2013) M. Kalam, F. Rahaman, S. Monowar Hossein, and S. Ray, European Physical Journal C 73, 2409 (2013), eprint 1301.0271.
  * Bhar (2015a) P. Bhar, Astrophys. Space Sci. 356, 365 (2015a).
  * Bhar (2015b) P. Bhar, Astrophys. Space Sci. 356, 309 (2015b), eprint 1412.0107.
  * Bhar et al. (2015) P. Bhar, F. Rahaman, A. Jawad, and S. Islam, apss 360, 32 (2015).
  * Abbas et al. (2015) G. Abbas, S. Qaisar, and A. Jawad, apss 359, 17 (2015), eprint 1509.06711.
  * Zubair et al. (2016) M. Zubair, G. Abbas, and I. Noureen, apss 361, 8 (2016), eprint 1512.05202.
  * Zubair and Abbas (2016) M. Zubair and G. Abbas, apss 361, 342 (2016).
  * Ilyas et al. (2017) M. Ilyas, Z. Yousaf, M. Z. Bhatti, and B. Masud, Astrophys. Space Sci. 362, 237 (2017).
  * Yousaf et al. (2018) Z. Yousaf, M. Z.-u.-H. Bhatti, and M. Ilyas, Eur. Phys. J. C 78, 307 (2018), eprint 1804.04953.
  * Saha and Debnath (2019) P. Saha and U. Debnath, Eur. Phys. J. C 79, 919 (2019), eprint 1911.10908.
  * Nashed (2023a) G. G. L. Nashed, Eur. Phys. J. C 83, 698 (2023a), eprint 2308.08565.
  * Nashed and El Hanafy (2023) G. G. L. Nashed and W. El Hanafy, JCAP 09, 038 (2023), eprint 2306.13396.
  * Nashed (2023b) G. G. L. Nashed, Astrophys. J. 950, 129 (2023b), eprint 2306.10273.
  * Nashed and El Hanafy (2022) G. G. L. Nashed and W. El Hanafy, Eur. Phys. J. C 82, 679 (2022), eprint 2208.13814.
  * Nashed (2021) G. G. L. Nashed, Astrophys. J. 919, 113 (2021), eprint 2108.04060.
  * Legred et al. (2021) I. Legred, K. Chatziioannou, R. Essick, S. Han, and P. Landry, Phys. Rev. D 104, 063003 (2021), eprint 2106.05313.
  * Buchdahl (1959) H. A. Buchdahl, Physical Review 116, 1027 (1959).
  * Ivanov (2002) B. V. Ivanov, Physical Review D 65, 104011 (2002).
  * Barraco et al. (2003) D. E. Barraco, V. H. Hamity, and R. J. Gleiser, Physical Review D 67, 064003 (2003).
  * Böhmer and Harko (2006) C. Böhmer and T. Harko, Classical and Quantum Gravity 23, 6479 (2006).
  * Zeldovich and Novikov (1971) Y. B. Zeldovich and I. D. Novikov, Chicago: University of Chicago Press (1971).
  * Podkowka et al. (2018) D. M. Podkowka, R. F. P. Mendes, and E. Poisson, Phys. Rev. D 98, 064057 (2018), eprint 1807.01565.
  * De Felice and Tsujikawa (2010) A. De Felice and S. Tsujikawa, Living Rev. Rel. 13, 3 (2010), eprint 1002.4928.
  * Herrera (1992) L. Herrera, Phys. Lett. A 165, 206 (1992).
  * Chandrasekhar (1964) S. Chandrasekhar, Astrophys. J. 140, 417 (1964), [Erratum: Astrophys.J. 140, 1342 (1964)].
  * Chan et al. (1993) R. Chan, L. Herrera, and N. Santos, Monthly Notices of the Royal Astronomical Society 265, 533 (1993).
  * Heintzmann and Hillebrandt (1975) H. Heintzmann and W. Hillebrandt, Astronomy and Astrophysics 38, 51 (1975).
  * Heiselberg and Pandharipande (2000) H. Heiselberg and V. Pandharipande, Ann. Rev. Nucl. Part. Sci. 50, 481 (2000), eprint astro-ph/0003276.
  * Lattimer and Prakash (2007) J. M. Lattimer and M. Prakash, Phys. Rept. 442, 109 (2007), eprint astro-ph/0612440.
  * Lynn et al. (1990) B. W. Lynn, A. E. Nelson, and N. Tetradis, Nucl. Phys. B 345, 186 (1990).
  * Tolman (1930) R. C. Tolman, Physical Review 35, 896 (1930).