1 Introduction

Scalar–tensor theories (STT) are a class of so-called extended theories of gravity, whose main aim is to go beyond standard theory of gravity formulated by Einstein in order to account for certain phenomena that cannot be satisfactorily explained by General Relativity (GR) itself [1,2,3]. They introduce an additional mediator of gravitational interaction, a scalar field, coupled non-minimally to the curvature and, possibly, matter fields. Historically, this class of theories was considered first by Jordan [4] and then by Brans and Dicke [5], who added a scalar field in order to incorporate Mach’s Principle into the theory; the massless field, sourced by matter distribution (trace of energy–momentum tensor), acted as an effective gravitational constant. The first attempts to include a new field were, however, lacking theoretical motivation; only then it was shown that such a field, coupled non-minimally to the curvature, arises naturally in the low-energy limit of theories considered fundamental, such as string theory [6], for instance.

STT found applications in various contexts. For example, it can be demonstrated that f(R) theories of gravity [7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22], where one replaces the Einstein–Hilbert Lagrangian with a function of the curvature, have an equivalent scalar–tensor (ST) representation. A noteworthy example of f(R) gravity is the Starobinsky model [23], in which one adds a quadratic correction in order to explain inflationary behavior of the early universe. This model corresponds strictly to a ST theory with a specific potential. Other examples include attempts at accounting for accelerated expansion of the universe, since the field can act as quintessence [24].

The theories are analyzed both in the metric, and in the so-called Palatini formalism (or metric-affine), where one decouples metric structure from the affine structure of space-time. Recently, the Palatini approach to ST gravity has been gaining more attention [25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]. Palatini STT theories were analyzed in the context of inflation [31,32,33,34,35,36,37,38,39,40,41,42]. Also, a recent paper proves that one can construct an f(R) theory à la Palatini which evades Ostrogradsky’s instability, is renormalizable and invariant under conformal change of the metric in its high energy limit and reduces to GR for small energies [50]. It was also shown that for certain models, both approaches lead to the same predictions regarding certain observables related to inflation, such as tensor-to-scalar ratio and scalar spectral index [51].

When analyzing STT, one usually makes an extensive use of Weyl (or conformal) transformations of the metric tensor [52]. Conformal transformations of the metric tensor establish a mathematical equivalence between so-called conformal frames, but usually the description of physics is frame-dependent, since Weyl transformations are not symmetries of Nature. Therefore, in case of STT, it is important to establish which frame is considered physical. The two most commonly used in the literature frames are ‘Einstein’ and ‘Jordan’ [53,54,55,56,57,58,59,60]; the main difference between them is the nature of coupling of the scalar field. In the Einstein frame, the field is coupled to matter part of the action, whereas in the Jordan frame, the field is coupled to the curvature.

It is possible, however, to define certain quantities which preserve their form under conformal transformations [61,62,63,64]. Such quantities, introduced in [61], consist of functions of the scalar field defining a conformal frame. One can also construct an invariant metric and, in the Palatini case, an invariant connection, allowing different conformal observers to measure distances and calculate geodesics in the same way [41]. The advantage of introducing such quantities is also of different type: they allow to classify mathematically equivalent theories, since a class of conformally-related frames will yield the same values of invariants.

Stars in the scalar–tensor theories framework, relativistic [65,66,67,68,69,70,71,72,73,74,75,76,77] and non-relativistic ones [78,79,80,81,82,83,84,85,86,87,88], were widely studied in literature; however, the invariant theory has not been applied yet to stellar objects. In this paper, we aim at using the results of [61] in order to analyze stellar structure in ST theories in a way independent of the choice of conformal metric. This will be achieved by expressing all relevant equations describing structure of stars in terms of invariants. Such a procedure will allow one not only to easily compare different conformal frames, but also inscribes in the way of reasoning concerning the issue of physicality of different frames described above.

The paper is organized as follows: first, we start by writing the action for STT in the most general parametrization and then, upon introducing transformation formulae for the metric, scalar fields and functions thereof, we write out most commonly used invariants. Having those, we obtain the Tolman–Oppenheimer–Volkoff (TOV) equation in the invariant Einstein frame, in which the calculations are particularly simple. Then, we transform to the Jordan frame and obtain relation between the pressure and other quantities entering the theory. That should allow us to interpret the extra terms written with respect to the invariants appearing in the modified/extended TOV equation.

For the reader’s convenience, we present physical quantities, parameters and coordinates in different frames in the Table 1 below:

Table 1 Summary of quantities used in different frames

2 Invariant quantities

2.1 General frame

The action for the class of scalar–tensor theories of gravity written in the Wagoner parametrization takes the following form:

$$\begin{aligned} \begin{aligned} S[\bar{g}_{\mu \nu }, \bar{\Phi }, \chi ]&= \frac{1}{2\kappa ^2}\int _\Omega d^4x \sqrt{-\bar{g}} \Big [\bar{\mathcal {A}}(\bar{\Phi })\bar{R}- \bar{\mathcal {B}}(\bar{\Phi })\bar{g}^{\mu \nu }\partial _\mu \bar{\Phi }\partial _\nu \bar{\Phi }\\&- \bar{\mathcal {V}}(\bar{\Phi }) \Big ]+ S_\text {matter}\left[ e^{2\bar{\alpha }(\bar{\Phi })}\bar{g}_{\mu \nu }, \chi \right] , \end{aligned}\nonumber \\ \end{aligned}$$
(1)

where \(\{ \bar{\mathcal {A}},\bar{\mathcal {B}},\bar{\mathcal {V}},\bar{\alpha } \}\) are four arbitrary functions of the scalar field, providing, together with the choice of the metric and the scalar field the so-called ‘conformal frame’. The function \(\bar{\mathcal {A}}\) describes the coupling between the scalar field and the curvature, \(\bar{\mathcal {B}}\) is the kinetic coupling, \(\bar{\mathcal {V}}\) – the self-interaction potential of the scalar field, and \(\bar{\alpha }\) – an anomalous coupling between matter and the scalar field. The constant \(\kappa ^2=8\pi Gc^{-4}\).

The equations of motion derived from this action are the following [61]:

$$\begin{aligned}&\begin{aligned}&\bar{\mathcal {A}}\bar{G}_{\mu \nu } + \left( \frac{1}{2}\bar{\mathcal {B}}+ \bar{\mathcal {A}}''\right) \bar{g}_{\mu \nu }\bar{g}^{\alpha \beta }\partial _\alpha \bar{\Phi }\partial _\beta \bar{\Phi }\\&\qquad -\left( \bar{\mathcal {B}}+ \bar{\mathcal {A}}''\right) \partial _\mu \bar{\Phi }\partial _\nu \bar{\Phi }- \bar{\mathcal {A}}'(\bar{g}_{\mu \nu }\bar{\Box } - \bar{\nabla }_\mu \bar{\nabla }_\nu )\bar{\Phi }\\&\qquad +\frac{1}{2}\bar{\mathcal {V}}\bar{g}_{\mu \nu } = \kappa ^2 \bar{T}_{\mu \nu }, \end{aligned} \end{aligned}$$
(2a)
$$\begin{aligned}&\begin{aligned}&2[3(\bar{\mathcal {A}}')^2 +2\bar{\mathcal {A}}\bar{\mathcal {B}}]\bar{\Box }\bar{\Phi }+ \frac{d [3(\bar{\mathcal {A}}')^2 +2\bar{\mathcal {A}}\bar{\mathcal {B}}]}{d\Phi } (\partial \bar{\Phi })^2\\&\qquad +4\bar{\mathcal {A}}'\bar{\mathcal {V}}-2\bar{\mathcal {A}}\bar{\mathcal {V}}'=2\kappa ^2\,\bar{T} (\bar{\mathcal {A}}'-2\bar{\alpha }' \bar{\mathcal {A}})\,. \end{aligned} \end{aligned}$$
(2b)

The action (1) is form-invariant under the conformal change of the metric tensor, accompanied by a re-definition of the scalar field:

$$\begin{aligned} \bar{g}_{\mu \nu } = e^{2\bar{\bar{\gamma }}(\bar{\bar{\Phi }})}\bar{\bar{g}}_{\mu \nu },\quad \bar{\Phi }= \bar{\bar{f}}(\bar{\bar{\Phi }}) \end{aligned}$$
(3)

if the four functions of the scalar field transform in the following way:

$$\begin{aligned} \bar{\bar{{\mathcal {A}}}}(\bar{\bar{\Phi }})&=e^{2\bar{\bar{\gamma }}(\bar{\bar{\Phi }})}\bar{\mathcal {A}}(\bar{\bar{f}}(\bar{\bar{\Phi }})), \end{aligned}$$
(4a)
$$\begin{aligned}&\begin{aligned} \bar{\bar{{\mathcal {B}}}}(\bar{\bar{\Phi }})&=e^{2\bar{\bar{\gamma }}(\bar{\bar{\Phi }})}\Bigg (\Big (\frac{d\bar{\Phi }}{d\bar{\bar{\Phi }}}\Big )^2\bar{\mathcal {B}}(\bar{\bar{f}}(\bar{\bar{\Phi }})) -6\Big (\frac{d\bar{\bar{\gamma }}}{d\bar{\bar{\Phi }}}\Big )^2\bar{\mathcal {A}}(\bar{\bar{f}}(\bar{\bar{\Phi }}))\\&\quad -6\frac{d\bar{\bar{\gamma }}}{d\bar{\bar{\Phi }}}\frac{d\bar{\mathcal {A}}}{d\bar{\Phi }}\frac{d\bar{\Phi }}{d\bar{\bar{\Phi }}}\Bigg ), \end{aligned} \end{aligned}$$
(4b)
$$\begin{aligned} \bar{\bar{{\mathcal {V}}}}(\bar{\bar{\Phi }})&=e^{4\bar{\bar{\gamma }}(\bar{\bar{\Phi }})}\bar{\mathcal {V}}(\bar{\bar{f}}(\bar{\bar{\Phi }})), \end{aligned}$$
(4c)
$$\begin{aligned} \bar{\bar{\alpha }}(\bar{\bar{\Phi }})&=\bar{\alpha }(\bar{\bar{f}}(\bar{\bar{\Phi }}))+\bar{\bar{\gamma }}(\bar{\bar{\Phi }}). \end{aligned}$$
(4d)

It is possible to construct out of these functions quantities which have the same functional dependence in every conformal frame. Such quantities are called ‘conformal invariants’ [61], and their usefulness consists in possibility of expressing certain quantities in a frame-independent way. All mathematically equivalent frames (i.e. relatable by a conformal transformation and a re-definition of a scalar field) will share the same invariants, so it is possible to label classes of equivalent theories by using them. The invariants which will be used in this paper are given belowFootnote 1:

$$\begin{aligned}&{\mathcal {I}}_1 = \frac{\bar{\mathcal {A}}}{e^{2\bar{\alpha }}}, \end{aligned}$$
(5a)
$$\begin{aligned}&{\mathcal {I}}_2 = \frac{\bar{\mathcal {V}}}{\bar{\mathcal {A}}^2}, \end{aligned}$$
(5b)
$$\begin{aligned}&\frac{d\tilde{{\mathcal {I}}}}{d\bar{\Phi }} = e^{-\bar{\alpha }}\sqrt{\pm \left( \bar{\mathcal {B}}-6\left( \frac{d\bar{\alpha }}{d\bar{\Phi }}\right) ^2\bar{\mathcal {A}}+ 6\frac{d\bar{\alpha }}{d\bar{\Phi }}\frac{d\bar{\mathcal {A}}}{d\bar{\Phi }}\right) }, \end{aligned}$$
(5c)
$$\begin{aligned}&\frac{d{\mathcal {I}}}{d\bar{\Phi }}= \sqrt{\pm \frac{2\bar{\mathcal {A}}\bar{\mathcal {B}}+3(\bar{\mathcal {A}}')^2}{2\bar{\mathcal {A}}^2}}. \end{aligned}$$
(5d)

The first invariant tells us if there is a non-minimal coupling present in the theory. The second invariant generalizes the notion of potential of the scalar field, while the third one can play a role of an invariant scalar field in the Jordan frame, and becomes zero for metric f(R) theory (but it does not necessarily mean that the field has no dynamics). The last one can be treated as a scalar field in the Einstein frame; if it vanishes, then the scalar field is non-dynamical (as it happens in case of Palatini f(R) theories, where \({\mathcal {I}} = 0\)). In our convention, we do not write any subscript in \({\mathcal {I}}\) for convenience and to indicate its importance. The plus/minus sign corresponds to positive and negative value of the expression under the square root.

In what follows, we will examine a static, spherical-symmetric objects whose metric is given as usually:

$$\begin{aligned} \bar{g}_{\mu \nu } = \text {diag}\left( - \bar{b}(\bar{r}), \bar{a}(\bar{r}), \bar{r}^2, \bar{r}^2 \sin {\bar{\theta }}\right) . \end{aligned}$$
(6)

Since all quantities are assumed to be dependent on the radial coordinate only, the conformal transformation preserves the static, spherical symmetric geometry. We will always write down the coordinate transformations in the further parts of the paper.

2.2 Einstein frame

In order to make use of the invariant quantities introduced earlier in this paper, let us choose the following invariant metric:

$$\begin{aligned} \hat{g}_{\mu \nu } = \bar{\mathcal {A}}\bar{g}_{\mu \nu }. \end{aligned}$$
(7)

Written in components, the metric \(\hat{g}\) reads:

$$\begin{aligned} \hat{g}_{\mu \nu } = \text {diag}\left( - \bar{\mathcal {A}}\bar{b}(\bar{r}), \bar{\mathcal {A}}\bar{a}(\bar{r}), \bar{\mathcal {A}}\bar{r}^2, \bar{\mathcal {A}}\bar{r}^2 \sin {\bar{\theta }}\right) . \end{aligned}$$
(8)

We may want to introduce a new radial coordinate and re-define the ab functions in order to preserve the form (6) of the metric. Such a change of variables is defined as follows (remembering that the scalar field is the function of the radial component only):

$$\begin{aligned} \hat{r} = \sqrt{\bar{\mathcal {A}}}\,\bar{r} \quad \rightarrow \quad d\bar{r} = \sqrt{\frac{1}{\bar{\mathcal {A}}}}\left( -\frac{\hat{r}}{2}\partial _{\hat{r}} \ln \bar{\mathcal {A}}+ 1\right) d\hat{r}. \end{aligned}$$
(9)

Let us notice that the new radial component is itself an invariant. The new metric will take the form:

$$\begin{aligned} \hat{g}_{\mu \nu } = \text {diag}\left( - \hat{b}(\hat{r}), \hat{a}(\hat{r}), \hat{r}^2, \hat{r}^2 \sin {\theta }\right) , \end{aligned}$$
(10)

where the new metric components \(\hat{a}\) and \(\hat{b}\) are related to the general ones as:

$$\begin{aligned}&\hat{b} = \bar{\mathcal {A}}\, \bar{b}, \end{aligned}$$
(11a)
$$\begin{aligned}&\hat{a} = \left( -\frac{\hat{r}}{2}\partial _{\hat{r}} \ln \bar{\mathcal {A}}+ 1\right) ^2 \bar{a}. \end{aligned}$$
(11b)

Let us notice that the following quantity:

$$\begin{aligned} \frac{1}{\hat{a}}\left( \frac{d}{d\hat{r}}\right) ^2 = \frac{1}{\bar{\mathcal {A}}\bar{a}}\left( \frac{d}{d\bar{r}}\right) ^2 \end{aligned}$$
(12)

is also an invariant. Therefore, if any equation contains (functions of) invariant quantities and the derivative with respect to the radial component precisely in the form shown above, then it must be also conformally invariant.

The choice (7) of the invariant metric results in the following action for the theory:

$$\begin{aligned} \begin{aligned} S[\hat{g}_{\mu \nu }, {\mathcal {I}}, \chi ]&= \frac{1}{2\kappa ^2}\int _\Omega d^4x \sqrt{-\hat{g}}\left[ \hat{R} - \hat{g}^{\mu \nu }\partial _\mu {\mathcal {I}}\partial _\nu {\mathcal {I}} - {\mathcal {I}}_2\right] \\&\quad + S_\text {matter}\left[ \frac{1}{{\mathcal {I}}_1}\hat{g}_{\mu \nu }, \chi \right] . \end{aligned} \end{aligned}$$
(13)

In this frame, the invariant \({\mathcal {I}}\) plays the role of the scalar field, and all invariants are now functions of it.

As we can see, in the invariant Einstein frame, the action takes a particularly simple form. The coupling between the curvature and the scalar field is now non-existent, and the kinetic coupling has a constant value. Such a simplicity is achieved at a price: there is an anomalous coupling between the scalar field and matter part of the action, which may lead to undesirable consequences, such as violation of the Weak Equivalence Principle. Nevertheless, it is convenient to perform the calculations in the Einstein frame and then transform the result back to the frame which is deemed ’physical’.

The field equations resulting from this action can be obtained quickly by comparing the action (13) with the action (1) and identifying the corresponding scalar field functions in the field equations. The result is the following:

$$\begin{aligned} \hat{G}_{\mu \nu } +&\frac{1}{2}\hat{g}_{\mu \nu }\hat{g}^{\alpha \beta }\partial _\alpha {\mathcal {I}}\partial _\beta {\mathcal {I}} - \partial _\mu {\mathcal {I}}\partial _\nu {\mathcal {I}} + \frac{1}{2}\hat{g}_{\mu \nu }{\mathcal {I}}_2 = \kappa ^2 \hat{T}_{\mu \nu }, \end{aligned}$$
(14a)
$$\begin{aligned}&\hat{\Box }{\mathcal {I}} - \frac{1}{2}\frac{d{\mathcal {I}}_2}{d{\mathcal {I}}} = \kappa ^2\frac{1}{{\mathcal {I}}_1}\frac{d{\mathcal {I}}_1}{d{\mathcal {I}}}\hat{T}, \end{aligned}$$
(14b)

where \(\hat{T}=\hat{g}^{\mu \nu }\hat{T}_{\mu \nu } = -\hat{\rho } + 3\hat{p} \equiv \frac{1}{\mathcal {\bar{A}}^2}(\bar{\rho } + 3\bar{p})\).

Information about different ST theories, characterized by a particular choice of the functions \(\{\bar{\mathcal {A}},\bar{\mathcal {B}},\bar{\mathcal {V}},\bar{\alpha }\}\), is stored in two invariants \(\{{\mathcal {I}}_1, {\mathcal {I}}_2\}\) being now a function of the third invariant, \({\mathcal {I}}\). Therefore, the knowledge of the functions \({\mathcal {I}}_1({\mathcal {I}})\) and \({\mathcal {I}}_2({\mathcal {I}})\) allows one to reconstruct the original theory after two of the four functions of the field have been fixed.

The energy–momentum tensor is not conservedFootnote 2 in this frame:

$$\begin{aligned} \hat{\nabla }^\mu \hat{T}_{\mu \nu } = \frac{1}{2}\partial _\nu (\ln {\mathcal {I}}_1)\hat{T}. \end{aligned}$$
(15)

The relation between the trace of the energy–momentum tensor in different frames are given in (31c) and (32b).

3 Stellar structure equations

In the following section we will derive the Tolman–Oppenheimer–Volkoff equation written with respect to the invariants of the scalar–tensor theories. Considering the Newtonian limit of TOV equations, we will also provide the non-relativistic hydrostatic equilibrium equation.

In order to do so, let us notice that the field equations (14) have a particular form discussed in [90,91,92], that is:

$$\begin{aligned} \bar{\sigma }(\bar{\Psi }^i)(\bar{G}_{\mu \nu }-\bar{W}_{\mu \nu })=\kappa ^2 \bar{T}_{\mu \nu }, \end{aligned}$$
(16)

where \(\bar{G}_{\mu \nu }\) represents the Einstein tensor while the factor \(\bar{\sigma }(\bar{\Psi }^i)\) is a coupling to the gravity, \(\bar{\Psi }\) can stand for, for instance, curvature invariants or other fields, like scalar ones in our case. The tensor \(\bar{W}_{\mu \nu }\) is a symmetric tensor which can be treated as an additional geometrical term, whose form depends on theory of gravity one is interested in. The Eq. (16) do not take into account other field equations which can be obtained by varying a specific Lagrangian with respect to, for example, scalar fields, or an independent connection.

For such a representation, the TOV equations can be written in a schematic way as: [93]Footnote 3:

$$\begin{aligned} \left( \frac{\bar{\Pi }}{\bar{\sigma }}\right) '=&-\frac{G{\mathcal {M}}}{c^2\bar{r}^2}\left( \frac{c^2\bar{Q}}{\bar{\sigma }}+\frac{\bar{\Pi }}{\bar{\sigma }}\right) \left( 1+\frac{4\pi \bar{r}^3\frac{\bar{\Pi }}{\bar{\sigma }}}{c^2{\mathcal {M}}}\right) \bar{a}(\bar{r})\nonumber \\&-\frac{2\bar{\sigma }}{\kappa ^2 \bar{r}}\left( \frac{\bar{W}_{\theta \theta }}{\bar{r}^2}-\frac{\bar{W}_{\bar{r}\bar{r}}}{\bar{a}}\right) \end{aligned}$$
(17)

with the mass function \({\mathcal {M}}\) defined as:

$$\begin{aligned} {\mathcal {M}}(\bar{r})= \int ^{\bar{r}}_0 4\pi \tilde{r}^2\frac{\bar{Q}(\tilde{r})}{\bar{\sigma }(\tilde{r})} d\tilde{r}, \end{aligned}$$
(18)

appearing in the solution of the static spherical-symmetric metric:

$$\begin{aligned} \bar{a}(\bar{r})=\left( 1-\frac{2G {\mathcal {M}}(\bar{r})}{c^2\bar{r}} \right) ^{-1}. \end{aligned}$$
(19)

The prime \('\) in the equation (17) denotes the derivative with respect to the radial coordinate \(\bar{r}\). The quantities \(\bar{Q}\) and \(\bar{\Pi }\) appearing in the above TOV and mass equations are called effective energy density and pressure, respectively, and are defined as:

$$\begin{aligned} \bar{Q}(\bar{r}):=\bar{\rho }(\bar{r})-\frac{\bar{\sigma }(\bar{r})\bar{W}_{tt}(\bar{r})}{\kappa ^2c^2 \bar{b}(\bar{r})}, \end{aligned}$$
(20)
$$\begin{aligned} \bar{\Pi }(\bar{r}):=\bar{p}(\bar{r})-\frac{\bar{\sigma }(\bar{r})\bar{W}_{\bar{r}\bar{r}}(\bar{r})}{\kappa ^2 \bar{a}(\bar{r})}. \end{aligned}$$
(21)

Here, the energy density \(\bar{\rho }\) and pressure \(\bar{p}\) are the ones related by the barotropic equation of state, \(\bar{p}=\bar{p}(\bar{\rho })\), and appear in the perfect fluid form of the energy momentum tensor \(\bar{T}_{\mu \nu }\):

$$\begin{aligned} \bar{T}_{\mu \nu }=(\bar{\rho }+\bar{p})\bar{u}_\mu \bar{u}_\nu +\bar{p} \bar{h}_{\mu \nu }, \end{aligned}$$
(22)

where \(\bar{u}^\mu \) is a vector field co-moving with the fluid while \(\bar{h}_{\mu \nu }=\bar{g}_{\mu \nu }+\bar{u}_\mu \bar{u}_\nu \) is a projector tensor on the 3-dimensional hypersurface.

3.1 Tolman–Oppenheimer–Volkoff equation

Using the formalism briefly discussed above, we will write down the components of the \(\hat{W}_{\mu \nu }\) tensor considered in the Einstein frame with respect to the metric \({\hat{g}}_{\mu \nu }\), which we will use to construct the TOV equations. Its form in the general frame can be found in the (Appendix A). On the other hand, in the Einstein frame this tensor has a much simpler form written with respect to the scalar–tensor invariants as:

$$\begin{aligned} \hat{W}_{tt}&= \frac{1}{2}\frac{\hat{b}}{\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2 + \frac{\hat{b}}{2}{\mathcal {I}}_2, \end{aligned}$$
(23a)
$$\begin{aligned} \hat{W}_{\hat{r}\hat{r}}&= \frac{1}{2}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2 - \frac{\hat{a}}{2}{\mathcal {I}}_2, \end{aligned}$$
(23b)
$$\begin{aligned} \hat{W}_{\theta \theta }&= -\frac{1}{2}\frac{\hat{r}^2}{\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2 - \frac{\hat{r}^2}{2}{\mathcal {I}}_2, \end{aligned}$$
(23c)
$$\begin{aligned} \hat{W}_{\Phi \Phi }&= \sin ^2{\theta } \hat{W}_{\theta \theta } \end{aligned}$$
(23d)

which now can be used to construct the effective energy density and pressure given in the ST invariants’ terms as:

$$\begin{aligned}&\hat{Q} = \hat{\rho } - \frac{\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2}{2\kappa ^2c^2\hat{a}} - \frac{{\mathcal {I}}_2}{2\kappa ^2c^2}, \end{aligned}$$
(24a)
$$\begin{aligned}&\hat{\Pi } = \hat{p} - \frac{1}{2\kappa ^2\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2 + \frac{1}{2\kappa ^2}{\mathcal {I}}_2. \end{aligned}$$
(24b)

Let us remind that \({\hat{\rho }}\) and \({\hat{p}}\) are not considered as physical quantities.

Consequently, we are now able to write down the TOV equation in Einstein frame using the schematic way (17):

$$\begin{aligned} \begin{aligned} \frac{d\hat{\Pi }}{d\hat{r}}=&-\frac{G{\mathcal {M}}}{c^2\hat{r}^2}\left( c^2\hat{\rho }+\hat{p} -\frac{(\partial _r{\mathcal {I}})^2}{\kappa ^2\hat{a}}\right) \left( 1+\frac{4\pi \hat{r}^3\hat{\Pi }}{c^2{\mathcal {M}}}\right) \\&\times \left( 1-\frac{2G{\mathcal {M}}}{c^2\hat{r}}\right) ^{-1} + \frac{1}{\kappa ^2 \hat{a}\hat{r}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned} \end{aligned}$$
(25)

where the effective mass is defined as:

$$\begin{aligned} {\mathcal {M}}(\hat{r})= \int ^{\hat{r}}_0 4\pi r^2 \hat{Q}(r) dr. \end{aligned}$$
(26)

In order to rewrite it with respect to the Einstein frame pressure \(\hat{p}\) and density \({\hat{\rho }}\), we use the definition (24b) to get:

$$\begin{aligned} \frac{d\hat{p}}{d\hat{r}}=&-\frac{G{\mathcal {M}}(\hat{r})}{c^2\hat{r}^2}(c^2{\hat{\rho }} +{\hat{p}})\left( 1-\frac{2G{\mathcal {M}}(\hat{r})}{c^2\hat{r}} \right) ^{-1}\end{aligned}$$
(27)
$$\begin{aligned}&\times \left[ 1+\frac{4\pi {\hat{r}}^3}{c^2{\mathcal {M}}(\hat{r})}\left( {\hat{p}}-\frac{(\partial _{{\hat{r}}}{\mathcal {I}})^2}{2\kappa ^2{\hat{a}}}+\frac{{\mathcal {I}}_2}{2\kappa ^2} \right) \right] \nonumber \\&+{\hat{T}}\partial _{\hat{r}} \ln {\mathcal {I}}_1-\frac{(\partial _{\hat{r}} {\mathcal {I}})^2}{\kappa ^2 \hat{a}\hat{r}} \end{aligned}$$
(28)

while the effective mass can be expressed as:

$$\begin{aligned} {\mathcal {M}}(\hat{r})= M_0(\hat{r})-\eta (\hat{r},{\mathcal {I}},{\mathcal {I}}_2). \end{aligned}$$
(29)

We have defined the “General Relativity” mass in the Einstein frame as \({\mathcal {M}}_0(\hat{r})= \int ^{\hat{r}}_0 4\pi x^2 \hat{\rho }(x) dx\) and the additional ingredient \(\eta (\hat{r},{\mathcal {I}},{\mathcal {I}}_2)\) as:

$$\begin{aligned} \eta (\hat{r},{\mathcal {I}},{\mathcal {I}}_2)=\frac{c^2}{4G}\int ^{\hat{r}}_0 x^2 \left( \frac{(\partial _{x}{\mathcal {I}})^2}{{\hat{a}}}+{\mathcal {I}}_2\right) dx. \end{aligned}$$
(30)

The Eqs. (27) and (29) are TOV equations written in Einstein frame. In order to consider a physical stellar system, we need to transform them to the (physical) Jordan frame, that is, we need to express the TOV equations in terms of physical metric components and quantities. Thus, they are defined as follows (w.r.t. the initial Wagoner parametrization):

$$\begin{aligned}&g_{\mu \nu } = e^{2\bar{\alpha }}\bar{g}_{\mu \nu }, \quad r = e^{\bar{\alpha }}\bar{r}, \end{aligned}$$
(31a)
$$\begin{aligned}&a = (1 - r \partial _r \bar{\alpha })^2 \bar{a}, \quad b = e^{\bar{\alpha }}\bar{b}, \end{aligned}$$
(31b)
$$\begin{aligned}&\rho = \frac{\bar{\rho }}{e^{4\bar{\alpha }}}, \quad p = \frac{\bar{p}}{e^{4\bar{\alpha }}}, \quad T = \frac{\bar{T}}{e^{4\bar{\alpha }}}, \end{aligned}$$
(31c)

while the relations between the invariant Einstein and Jordan frame quantities are now:

$$\begin{aligned}&\hat{r}=\sqrt{{\mathcal {I}}_1} r, \quad \hat{a} = {\mathcal {I}}_1 a \left( \frac{dr}{d\hat{r}}\right) ^2, \end{aligned}$$
(32a)
$$\begin{aligned}&\hat{\rho }=\frac{\rho }{{\mathcal {I}}^2_1}, \quad \hat{p}=\frac{p}{{\mathcal {I}}^2_1}, \quad \hat{T}=\frac{T}{{\mathcal {I}}^2_1}. \end{aligned}$$
(32b)

Therefore, the effective mass written as a function of the coordinate r and Jordan frame functions \(\rho \), p will be:

$$\begin{aligned} \begin{aligned} {\mathcal {M}}(r) =&\int ^r_0 \frac{4\pi r^2}{\sqrt{{\mathcal {I}}}_1}\Bigg [{\rho } - \frac{1}{2\kappa ^2c^2}\frac{{\mathcal {I}}_1}{{a}}\left( \partial _r {\mathcal {I}}\right) ^2 - \frac{1}{2\kappa ^2c^2}{\mathcal {I}}^2_1{\mathcal {I}}_2\Bigg ] \\&\times \left( \frac{r}{2}\partial _{r} \ln {\mathcal {I}}_1 + 1 \right) dr, \end{aligned}\nonumber \\ \end{aligned}$$
(33)

while the TOV equation can be rewritten as:

$$\begin{aligned} \begin{aligned} \frac{dp}{dr}&= \Bigg [-\frac{G{\mathcal {M}}(r)}{c^2r^2{\mathcal {I}}^{1/2}_1}(c^2\rho +p)\left( 1 - \frac{2G{\mathcal {M}}(r)}{c^2r{\mathcal {I}}^{1/2}_1}\right) ^{-1}\\&\quad \times \left( 1 + \frac{4\pi {\mathcal {I}}_1^\frac{3}{2}r^3}{c^2{\mathcal {M}}(r)}\left( \frac{p}{{\mathcal {I}}^2_1} - \frac{\left( \partial _r {\mathcal {I}}\right) ^2 }{2\kappa ^2 a {\mathcal {I}}_1}+ \frac{{\mathcal {I}}_2}{2\kappa ^2}\right) \right) \\&\quad -\frac{{\mathcal {I}}_1^{2}(\partial _r {\mathcal {I}})^2}{\kappa ^2 a r}\Bigg ]\left( \frac{r}{2}\partial _{r} \ln {\mathcal {I}}_1 + 1 \right) +\left( -c^2\rho + 5p\right) \partial _{r} \ln {\mathcal {I}}_1 \end{aligned} \end{aligned}$$
(34)

The Eqs.  (33) and (34) are mass and relativistic hydrostatic equilibrium equations, respectively, describing a spherically-symmetric stellar system in the scalar–tensor theory written with respect to invariants’ formalism given by [61]. We recover the GR form for the above equations when the invariant \({\mathcal {I}}_1=1\) and the remaining ones are set to zeros (or \({\mathcal {I}}\) is a constant).

3.2 Non-relativistic limit of TOV equation

Let us consider now non-relativistic limit of the Eqs. (33) and (34). Such equations are used to study, for instance, main-sequence stars, or low-mass stars and substellar objects. In the non-relativistic limit one assumes that the pressure is much smaller then the energy density \(p \ll c^2\rho \), as well as that the gravitational pressure can be neglected, \(r^3p \ll c^2M_0\). The curvature effects are also neglected, that is, \(2GM_0/c^2r \ll 1\) holds.

Since we want to keep our equations as general as possible, we will not assume any limiting form of the invariants \({\mathcal {I}}\) and \({\mathcal {I}}_2\) when:

$$\begin{aligned} \phi (r)\approx \phi _0+\bar{\epsilon } \varphi (r) \end{aligned}$$
(35)

is applied to the scalar field in the Jordan frame. However, in order not to change significantly the physics of the Sun, we cannot allow the coupling, which is represented by the invariant \({\mathcal {I}}_1\), to be too strong in our case. Because of that fact, one then requires that (we assume that \(\varphi (0)=0\) and \(i_1(0)=0\)):

$$\begin{aligned} {\mathcal {I}}_1\approx 1+\epsilon i_1(r). \end{aligned}$$
(36)

such that the mass function (33) will have the form \({\mathcal {M}}=M_0(r)+\mu (r,i_1,{\mathcal {I}},{\mathcal {I}}_2)\). Thus, applying (36) to (33) and keeping only the terms up to the first order, we may write:

$$\begin{aligned} {\mathcal {M}}(r)&=M_0(r)+\epsilon \int ^r_0\pi r^2\rho \Big ( 2(r i_1'-i_1) \end{aligned}$$
(37)
$$\begin{aligned}&\quad - \frac{c^2 {\mathcal {I}}_2}{8\pi G\rho }(3i_1+ri'_1) \Big )dr \end{aligned}$$
(38)

where:

$$\begin{aligned} M_0(r)=\int ^r_0 4\pi r^2\rho \left[ 1- \frac{c^2{\mathcal {I}}_2}{16\pi G\rho }\right] dr. \end{aligned}$$
(39)

In the above expressions we have treated the term \((d{\mathcal {I}}/dr)^2\) as a term of the second order.

Then, in the similar way, the non-relativistic limit of the TOV equations is given by:

$$\begin{aligned} \frac{dp}{dr} = -\frac{G{\mathcal {M}}(r)}{c^2r^2}\rho \left[ 1+\epsilon \left( \frac{c^2i_1' r^2}{GM_0}+i'r-\frac{i_1}{2}\right) \right] , \end{aligned}$$
(40)

where we have skipped the terms such as \(\alpha {\mathcal {I}}_2/M_0c^2\) etc. However, it may happen, similarly as with the terms \((d{\mathcal {I}}/dr)^2\), that they will have a non-negligible contribution but this depends on the relations between the invariants and matter fields (thus on a particular theory under consideration), given by the Klein–Gordon equation.

4 Examples

We will briefly discuss two models of gravity in both, metric and Palatini approaches. Therefore, as a first example we will consider f(R) gravity and then Brans–Dicke model.

4.1 f(R) gravity

Let us consider as an example the f(R) theory in order to illustrate how the invariant quantities allow one to quantify the difference between theories of gravity. In this section, we will compute the invariants for both metric and Palatini versions of the theory.

First, let us notice that f(R) gravity has a scalar–tensor representation if \(\frac{d^2 f}{dR^2}\ne 0\). Assuming this condition is satisfied, we can perform a Legendre transformation and identify a scalar degree of freedom with the derivative of the f function w.r.t the curvature R. This procedure is canonical and has been presented in a number of papers, for example in [7]. The result is the following:

$$\begin{aligned} \begin{aligned} S[g_{\mu \nu }, \Phi , \chi ] =&\frac{1}{2\kappa }\int _\Omega d^4x \sqrt{-g}\Big [\Phi R(g) +\delta _\Gamma \frac{3}{2\Phi }g^{\mu \nu }\partial _\mu \Phi \partial _\nu \Phi \\&- V(\Phi )\Big ] + S_\text {matter}[g_{\mu \nu }, \chi ]. \end{aligned} \end{aligned}$$
(41)

Here, the parameter \(\delta _\Gamma \) assumes two possible values:

$$\begin{aligned} \delta _\Gamma = {\left\{ \begin{array}{ll} 1 \text { for the Palatini theory}\\ 0 \text { for the metric theory.} \end{array}\right. } \end{aligned}$$
(42)

We can immediately identify the functions of the scalar field defining the theory:

$$\begin{aligned} {\mathcal {A}}(\Phi )&=\Phi , \quad {\mathcal {B}}(\Phi ) = -\delta _\Gamma \frac{3}{2\Phi }, \nonumber \\ {\mathcal {V}}(\Phi )&= V(\Phi ), \quad \alpha (\Phi ) = 0. \end{aligned}$$
(43)

The invariants \({\mathcal {I}}_1\) and \({\mathcal {I}}_2\) will be the same for both approaches; however, we will be able to distinguish between the two formalism by looking at the values of the invariants \({\mathcal {I}}\) and \(\tilde{{\mathcal {I}}}\). Their values are given in the table below:

Table 2 Invariant scalar field for f(R) gravity in different approaches

We can be more specific and take as an example the following model: \(f(R) = R + \beta R^n\), where \(n\in {\mathbb {R}}\), \(n\ne 1\). Such a choice will lead to the following parametrization in the ST representation:

Table 3 Parametrization of the \(f(R) = R + \beta R^n\) model

and, consequently, to the invariants:

$$\begin{aligned}&{\mathcal {I}}_1(\Phi ) = \Phi , \end{aligned}$$
(44a)
$$\begin{aligned}&{\mathcal {I}}_2(\Phi ) = \beta ^{-\frac{1}{n-1}}\left( n^{-\frac{1}{n-1}} - n^{-\frac{n}{n-1}}\right) \frac{(\Phi - 1)^\frac{n}{n-1}}{\Phi ^2}. \end{aligned}$$
(44b)

For the Palatini theory, scalar field is non-dynamical, so the invariant \(\mathcal {I}\) cannot be used in the theory. Therefore, the relation between the field and the trace of energy–momentum tensor will be purely algebraic, and the exact dependence can be obtained from the Eq. (14b), with the derivative taken w.r.t. the scalar field \(\Phi \). All the remaining invariants entering the field equations and, consequently, the TOV equation, will depend explicitly on \(\hat{T}\).

In the Palatini case, the effective energy density and pressure will have a simple form:

$$\begin{aligned} \hat{Q}_P&= \hat{\rho } - \frac{1}{2\kappa ^2c^2}{\mathcal {I}}_2(\hat{T}), \end{aligned}$$
(45a)
$$\begin{aligned} \hat{\Pi }_P&= \hat{p} + \frac{1}{2\kappa ^2}{\mathcal {I}}_2(\hat{T}). \end{aligned}$$
(45b)

The TOV equation in the Einstein frame will now read as:

$$\begin{aligned} \begin{aligned} \frac{d\hat{\Pi }_P}{d\hat{r}}&= -\frac{G{\mathcal {M}}_P}{c^2\hat{r}^2}\left( c^2\hat{\rho }+\hat{p}\right) \left( 1+\frac{4\pi \hat{r}^3\hat{\Pi }_P}{c^2{\mathcal {M}}_P}\right) \left( 1-\frac{2G{\mathcal {M}}_P}{c^2\hat{r}}\right) ^{-1}, \end{aligned} \end{aligned}$$
(46)

which agrees with [95]. If we set \(n=2\), we recover Starobinsky theory. For this particular choice, the invariants \({\mathcal {I}}_1\) and \({\mathcal {I}}_2\) can be expressed in terms of the trace of energy–momentum tensor in the Jordan frame:

$$\begin{aligned} {\mathcal {I}}_1&= \Phi = 1 + 4\beta \kappa ^2 (c^2\rho - 3p), \end{aligned}$$
(47a)
$$\begin{aligned} {\mathcal {I}}_2&= \frac{4\beta \kappa ^4(c^2\rho - 3p)^2}{\left( 1 + 4\beta \kappa ^2 (\rho - 3p) \right) ^2}. \end{aligned}$$
(47b)

The mass function will take the form:

$$\begin{aligned} \begin{aligned} {\mathcal {M}}_P(r)&= \int ^{r}_0 4\pi \tilde{r}^2 \frac{\rho - 2c^{-2}\beta \kappa ^2(c^2\rho - 3p)^2}{\left( 1 + 4\beta \kappa ^2 (c^2\rho - 3p) \right) ^{1/2}}\\&\quad \times \left[ 1+ \frac{\tilde{r}}{2}\partial _{\tilde{r}}\ln \left( 1+4\beta \kappa ^2 (c^2\rho -3p)\right) \right] d\tilde{r} \end{aligned} \end{aligned}$$
(48)

In the non-relativistic limit, the TOV equation (34) for quadratic Palatini gravity takes the form

$$\begin{aligned} \frac{dp}{dr} = -\frac{G{\mathcal {M}}_P(r)}{r^2}\rho \left[ 1+4c^2\beta \kappa ^2 \left( r\rho '-\frac{\rho }{2}+\frac{c^2r^2\rho '}{GM_0}\right) \right] .\nonumber \\ \end{aligned}$$
(49)

whereas the mass reduces to:

$$\begin{aligned} {\mathcal {M}}_P(r) = \int ^{r}_0 4\pi \tilde{r}^2\rho \left[ 1+2c^2\kappa ^2\beta (-2\rho + \tilde{r} \rho ')\right] d\tilde{r} \end{aligned}$$
(50)

The expression (49) has a slightly different form (in the coefficients in the round bracket) than the result obtained in [96]. This is because of the fact that in [96], the assumption of the invariant polytropic equation of state for the quadratic Palatini model was made, following the result given in [97]. In this work we do not set any particular relation between pressure and density, neither we assume its behaviour under the conformal transformation.

In the metric case, the relation between the scalar field and the invariant \(\mathcal {I}\) becomes relevant. It must be used to express the invariants \({\mathcal {I}}_1\) and \({\mathcal {I}}_2\) as a function of \(\mathcal {I}\). The result is the following:

$$\begin{aligned} {\mathcal {I}}_1(\mathcal {I})&= \Phi _0 e^{\frac{2}{\sqrt{3}}\mathcal {I}}, \end{aligned}$$
(51a)
$$\begin{aligned} {\mathcal {I}}_2(\mathcal {I})&= \beta ^{-\frac{1}{n-1}}\left( n^{-\frac{1}{n-1}} - n^{-\frac{n}{n-1}}\right) \frac{(\Phi _0 e^{\frac{2}{\sqrt{3}}\mathcal {I}} - 1)^\frac{n}{n-1}}{\Phi _0^2 e^{\frac{4}{\sqrt{3}}\mathcal {I}}}. \end{aligned}$$
(51b)

Unlike in the Palatini case, it is now not possible to express \({\mathcal {I}}\) as an algebraic function of \(\rho \) and p, as the relation between these quantities is described by the Klein–Gordon equation with a source. Applying the above forms to the Eqs. (33) and (34), one obtains the mass function and TOV equation for the f(R) metric gravity. Let us notice that the Eq. (34) already includes the Klein–Gordon equation to get rid of the second derivative of \({\mathcal {I}}\). However, we do not write the TOV equations explicitly because of their complex form in this particular case.

It was shown in [98, 99] that for f(R) gravity, one can use multimessenger astronomy results to demonstrate the maximal mass and causal limit maximal mass of neutron stars, for example in Starobinsky model. As the analysis is usually performed in the Jordan frame, the use of invariants might help to generalize the investigation by allowing one to express relevant quantities in a frame-independent way, and transform solutions easily between frames.

4.2 Brans–Dicke theory

Let us now consider a scalar–tensor theory which cannot be derived from f(R) gravity, namely, a Brans–Dicke gravity without the self-interaction potential, both in the metric and the Palatini approach. The action for the theory is the following:

$$\begin{aligned} \begin{aligned} S[g, \Gamma , \Phi ]&= \frac{1}{2\kappa ^2}\int _\Omega d^4x\sqrt{-g}\left[ \xi \Phi R(g, \Gamma ) - \frac{\omega }{\Phi }g^{\mu \nu }\partial _\mu \Phi \partial _\nu \Phi \right] \\&\quad + S_\text {matter}[g, \chi ]. \end{aligned} \end{aligned}$$
(52)

Here, \(\xi \) and \(\omega \) are parameters of the theory. We assume that \(\xi > 0\) and \(\omega \ne 0\), otherwise the scalar field would have no dynamics in the Palatini formulation. Also, the action (52) is not specified to be either a Palatini, or a metric action; therefore, we take a theory with the same functions of the scalar field, but with different definitions of the curvature scalar.

In the Palatini case, one needs to consider an additional variation with respect to the independent conection. As a result of this procedure, one discovers that the initially independent connection is in fact Levi-Civita with respect to a new metric tensor, conformally related to the initial one. The connection introduces no additional degrees of freedom, and can be eliminated from the action, modifying the kinetic coupling of the scalar field, \(\mathcal {B}\), yielding effectively a metric theory. The scalar field functions in this case can be written as:

$$\begin{aligned} \mathcal {A}= \xi \Phi , \quad \mathcal {B}= \frac{\omega }{\Phi } - \delta _\Gamma \frac{3\xi }{2\Phi },\quad \mathcal {V}=0,\quad \alpha = 0, \end{aligned}$$
(53)

where \(\delta _\Gamma \) was defined in the previous section. The invariants are now:

$$\begin{aligned}&{\mathcal {I}}_1(\Phi ) = \xi \Phi , \end{aligned}$$
(54a)
$$\begin{aligned}&{\mathcal {I}}_2(\Phi ) = 0, \end{aligned}$$
(54b)
$$\begin{aligned}&{\mathcal {I}} = \sqrt{\frac{2\omega + 3\xi (1 - \delta _\Gamma )}{4\xi }}\ln \left( \frac{\Phi }{\Phi _0.}\right) \end{aligned}$$
(54c)

How the scalar field varies will be now described by a massless Klein–Gordon equation with a source term:

$$\begin{aligned} \hat{\Box }{\mathcal {I}} = \kappa ^2\sqrt{\frac{4\xi }{2\omega + 3\xi (1 - \delta _\Gamma )}}\hat{T}. \end{aligned}$$
(55)

As we can see, the invariant scalar field is sourced by the trace of energy–momentum tensor. In case of radiation, the trace vanishes, and the equation is of particularly simple form.

The components of the \(\hat{W}_{\mu \nu }\) tensor for this class of theories are now:

$$\begin{aligned} \hat{W}_{tt}&= \frac{1}{2}\frac{\hat{b}}{\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned}$$
(56a)
$$\begin{aligned} \hat{W}_{\hat{r}\hat{r}}&= \frac{1}{2}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned}$$
(56b)
$$\begin{aligned} \hat{W}_{\theta \theta }&= -\frac{1}{2}\frac{\hat{r}^2}{\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned}$$
(56c)
$$\begin{aligned} \hat{W}_{\Phi \Phi }&= \sin ^2{\theta } \hat{W}_{\theta \theta }, \end{aligned}$$
(56d)

and the effective energy density and pressure can be expressed as:

$$\begin{aligned} \hat{Q}&= \hat{\rho } - \frac{1}{2\kappa ^2c^2\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned}$$
(57a)
$$\begin{aligned} \hat{\Pi }&= \hat{p} - \frac{1}{2\kappa ^2\hat{a}}\left( \partial _{\hat{r}} {\mathcal {I}}\right) ^2, \end{aligned}$$
(57b)

where \(\hat{\rho } = \frac{\rho }{\xi ^2\Phi ^2}\), and \(\hat{p} = \frac{p}{\xi ^2\Phi ^2}\). As for the metric case, we do not write the hydrostatic equilibrium equation explicitly because of its long form.

5 Discussion and conclusions

In the presented paper we have obtained the stellar structure equations for a general family of the modified gravity theories, written with respect to the scalar field invariants, introduced some time ago in [61]. We found out the invariant representation very useful since it allows to study diverse theories of gravity, such as for example f(R) and scalar–tensor gravity in different approaches – metric, Palatini, or hybrid, at one go [100]. The relativistic hydrostatic equilibrium equation (34) and the mass function (33) are thus the master equations of our work, and their specific shape can help us to understand effects arising by the presence of such invariants, whose specific forms and characteristics, as shown by a few examples in the Sect. 4, are ruled by gravitational theories, which possess the invariant representation.

Therefore, one may also try to interpret the role of the invariants, as it was presented for example in [101], where the free parametrization of the TOV equation was discussed together with physical meanings of the parameters. Let us firstly notice that the invariant \({\mathcal {I}}\), which carries an information about the varying scalar field, and \({\mathcal {I}}_2\), which traces its potential, enter the part of the stellar equation (34) related to the active gravitational effects of pressure (studied for instance in [102]). In the case of GR, this pressure is a pure relativistic effect which does not appear in the non-relativistic counterpart of the hydrostatic equilibrium equation. Thus, modifications which can be related to the varying scalar field and/or its potential, reinforce or impair, depending on their nature, the effect of the gravitational pressure. Let us also comment that the invariant \({\mathcal {I}}_2\) also appears in the TOV equation (34) throughout the mass function. We will discuss it in a moment.

On the other hand, the non-minimal coupling, represented by the invariant \({\mathcal {I}}_1\), clearly plays many roles in the stellar structure. It also appears in the gravitational pressure part, in a non-trivial way, strengthening or weakening this relativistic effect. It acts, as already mentioned in the introduction, as an effective gravitational constant which is also apparent in our TOV equation. Moreover, it contributes to the inertial pressure and intrinsic curvature contributions which are, similar to the gravitational pressure, relativistic impacts, affecting equation of state (see such an effect in some theories of gravity, for example [103,104,105]) and geometry, where the last one is an expected result. Besides, the presence of \({\mathcal {I}}_1\) may also be interpreted as anisotropies of the fluid (pronounced by the last terms of (34)) [106, 107].

Let us notice that the anisotropy of the fluid, as well as the active gravitational effects of pressure provided by the presence of the invariants \({\mathcal {I}}\) and \({\mathcal {I}}_1\) arise in the Einstein frame, too.

The mass equation (33) also provides some information about the nature of the invariants. The most prominent one is the fact that \({\mathcal {I}}_1\) cannot be a strong coupling; that is, it cannot differ significantly from unity in order not to violate the solar physics. It may happen, as it was discussed in, for instance, [108,109,110], that the extra terms introduced by the invariants provide a non-zero contribution to the mass function far away from the star’s surface (when \(p(R)=0\), where R is the star’s radius); that is, the mass function does not converge when \(r\rightarrow \infty \) but can oscillate instead around a constant value. This fact has following consequences: as proposed in [108] and then discussed in more detail in [111], in the case of f(R) metric gravity and general ST theories which introduce an additional degree of freedom, this phenomena could be used to test such theories against GR by the mean of the surface gravitational redshift. It comes from the fact that mass measured by a distant observer (gravitational mass) differs from the stellar mass, which is understood as a sphere bounded by the star’s surface together with gravitational energy, in the energy of the extra degree of freedom, which happens not to be zero inside and outside the star. Moreover, it was also demonstrated that the stellar mass appearing in the definition of the mentioned redshift in the case of modified gravity is smaller that its analogue in GR. Therefore, a high-precision in the measurements of the surface redshift can be in future a powerful tool to test and to discriminate different theories of gravity.

On the other hand, the invariant \({\mathcal {I}}_2\) in the masses (37) and (39), as well as in the TOV equation (34), can be identified with the cosmological constant [112, 113]; then, its contribution is negligible to the solar gravitational mass \({\mathcal {M}}\) while the input from \(i_1\) is also expected to be small, as already mentioned.

It should be also highlighted that \(i_1\) is not an invariant anymore. As in the case of the invariants, we do not know its form without assuming any particular theory (in that case, the potential of the scalar field), or without guessing/adjusting its character by other means. Therefore, in order to write down the non-relativistic hydrostatic equilibrium equation in the terms of the matter fields only, one should choose a particular model of gravity. Then, the modified Klein–Gordon equation will provide the relation between the invariants (the scalar field) and the trace of the energy momentum tensor, that is, the matter fields. Equipped with this relation, it will be possible to write hydrostatic equilibrium equation in such a form that it would allow to study physical stellar system. However, as briefly discussed in the example section, it might be quite tough because of the complicated form of the equations.

Since the theories discussed in this work introduce an additional scalar field permeating the space-time, it will be necessary to invoke a screening mechanism effectively hiding its effect outside stars. As it was shown in recent papers, the mechanism can be broken inside stellar objects in more general scalar–tensor theories, such us DHOST or beyond Horndeski, where the gravitational potential is not determined solely by the enclosed mass, but depends additionally on extra terms [76, 114,115,116]. Moreover, another issue concerns Noether symmetries in scalar–tensor theories, discussed for example in [117, 118] in the context of spherically-symmetric objects. In the most general case, the invariant scalar field carries an additional degree of freedom that will have a non-zero contribution to Noether conserved quantities. Because of the very nature of invariants, all solutions would be relevant for whole conformally-equivalent classes of theories. We did not investigate these issues in this paper. Work along this line is currently underway.