On the classification of consistent boundary conditions for $ \mathit{f}(\mathit{R})$-Gravity

Using a completely covariant approach, we discuss the role of boundary conditions (BCs) and the corresponding Gibbons--Hawking--York (GHY) terms in $ \mathit{f}(\mathit{R}) $-gravity in arbitrary dimensions. We show that $ f(\mathit{R}) $-gravity, as a higher derivative theory, is not described by a degenerate Lagrangian, in its original form. Hence, without introducing additional variables, one can not obtain consistent BCs, even by adding the GHY terms (except for $f(\mathit{R})=R$). However, following the Ostrogradsky approach, we can introduce a scalar field in the framework of Brans-Dicke formalism to the system to have consistent BCs by considering appropriate GHY terms. In addition to the Dirichlet BC, the GHY terms for both Neumann and two types of mixed BCs are derived. We show the remarkable result that the $f(\mathit{R})$-gravity is itself compatible with one type of mixed BCs, in $D$ dimension, i.e. it doesn't require any GHY term. For each BC, we rewrite the GHY term in terms of Arnowit-Deser-Misner (ADM) variables.


Introduction
Since the theory of general relativity (GR) is a classical field theory of gravitation, the choice of BCs is of great importance. The role of surface integrals in GR has been investigated first in Dewitt and Dirac's papers [1,2] and then was covered deeply in the works of York, Regge and Teitelboim [3,4].
In Ref. [4], the authors indicated the crucial role of the surface integral in order to have a well-defined functional space of the gravitational field. Three years later, trying to quantize GR in path integral formalism, Gibbons and Hawking [5] showed that, a boundary term should be added to the Einstein-Hilbert (EH) action, in order to have a well-defined variational principle for an open manifold with Dirichlet BC, i.e. δg ab | Boundary = 0. Such terms, added to the EH action, or the action of generalized theories of gravity [6,7,8,9,10,11], are called GHY terms.
The Lagrangian of GR as well as f (R)-gravity contains second derivative of metric. Variational principle for these so called "Jerky mechanics" [12] is not well defined. In such actions, it is needed to apply Dirichlet and Neumann BCs simultaneously which may lead to destroy the Poisson structure of the system in a canonical treatment. However, care is needed to define momentum and go to a well defined phase space via an ordinary Legendre transformation [13,14].
GR is described by a degenerate Lagrangian, i.e. can be written as the sum of a quadratic part in the first derivatives of metric and a total derivative term. There are two approaches to deal with GR. The first one is the well-known ADM formalism which uses the Gauss-Codazzi equation to get rid of the second derivative terms of the Lagrangian [5,6,7,15]. The second one, which is more covariant, uses the holographic relation to manifest the quadratic Lagrangian by subtracting a suitable boundary term which can be removed by adding a GHY term [16,17].
For modified gravity models such as f (R)-gravity one needs to use the so-called Ostrogradsky approach by introducing enough number of fields to the theory such that the whole Lagrangian of the system includes at most the first derivatives of the fields. In this way one is able to go through a canonical approach and at the same time introduce consistent BCs. For f (R)-gravity without considering additional fields, one needs to consider the extrinsic curvature variation δK ij , as well as δg ij to vanish on the boundary, which is inconsistent since extrinsic curvature K ij , includes derivatives of the metric. However, by adding the famous GHY term −2 ∂M d D−1 yǫ √ hf ′ (R)δK (h and K are the trace of induced metric and the extrinsic curvature respectively, ǫ = ±1 depending on the timelike or spacelike nature of the boundary ∂M and f ′ (R) = ∂f ∂R ) to the action, the BCs reduce to vanish δR on the boundary simultaneously with the Dirichlet BC. But calculating δR (see appendix B) shows that the main problem is not resolved since R is not an independent field and its variation includes again variations of the derivatives of the metric.
In this paper we try in section 2 to investigate the more covariant ap-proach for f (R)-gravity. For this reason, we use the equivalent scalar-tensor formulation of f (R)-gravity and then using a suitable conformal transformation, we go to Einstein frame [18,19,20]. After imposing the holographic relation for Einsteinian curvature of space-time and changing back to the original variables [21], we obtain somehow a holographic-like relation for f (R)-gravity in which the bulk term is not quadratic. This shows that the f (R)-gravity by itself is a non-degenerate Lagrangian and the ordinary approach is not suitable for it. Then in section 3, we try to change f (R) Lagrangian into a degenerate one by Ostrogradsky approach. To do so, we write the f (R)-gravity in the Jordan frame of the Brans-Dicke action [18,19,20]. Then by using the holographic relation for the curvature of space-time, we find that the action of the theory is degenerate, though there is not a well defined holographic relation. Hence, by adding appropriate GHY terms, Dirichlet or other BCs can be achieved. Writing the boundary terms of the action in terms of fields and momentum fields, in a foliation independent approach, enables us to introduce the consistent GHY term for Dirichlet, Neumann and two types of mixed BCs in arbitrary dimensions. For one type of mixed BC, the GHY term vanishes. This may be interpreted that the f (R)-gravity is more consistent with this mixed type of BC in D dimension.
In this paper the Latin indices are used to show the space-time coordinates and the Greek ones are used to denote the space coordinates. The calculations are done in arbitrary dimensions of space-time and the signature of metric is (-,+,+,+).

2
Non-degeneracy of f (R)-Gravity Similar to GR, f (R) Lagrangian includes second derivatives of the metric. The variational principle for this type of actions is not primarily well defined due to requirement of applying simultaneously Dirichlet and Neumann BCs. There is also no room in this type of Lagrangian to define the momentum and establish Hamiltonian structure via Legendre transformation. In dealing with these Lagrangians, there are two possibilities: 1) The Lagrangian is degenerate i.e. it can be written as a quadratic Lagrangian which is equivalent to the original one plus a total derivative term which can be removed by adding a GHY term and imposing Dirichlet, Neumann or mixed BCs.
2) The Lagrangian is non-degenerate in which Ostrogradsky method or other equivalent methods should be used [13,14]. In GR, Lagrangian is a degenerate Lagrangian, i.e. using the holographic relation, it can be written as where As can be seen, it can be written as a quadratic Lagrangian plus a total derivative term [16,17]. Unlike the GR Lagrangian, f (R)-gravity given by seems to be non-degenerate. In order to obtain the holographic relation in f (R)-gravity, first we try to write it in the GR form which we know how to work with it. To do so, we write the f (R) action using scalar-tensor theory as follows ) and we have assumed that f ′′ (R) = 0. This is, in fact, the action of Brans-Dicke theory in the Jordan frame with parameter ω = 0 [19,20,23,24]. As is well-known, using the conformal transformation [20]: the action (4) changes to Einstein gravity minimally coupled to a scalar field. Thus, in the so-called Einstein frame, the separation of the Lagrangian into bulk and surface terms can be written as in Eq. (1). Then the obtained holographic relation can be restored into the Jordan frame by the inverse of transformation (5). To the end of this section, all quantities in the Einstein frame are denoted by ∼. Noting and . Now we can separate the action of f (R)gravity into a quadratic bulk term and a surface term. To do this, let us recall that whereṼ c =g ikΓc ik −g ckΓm mk [16]. Hence, the bulk term of (8) in the Einstein frame readsL The second term of (9) is denoted asL Sur and leads to a surface term. Transforming back to the Jordan frame via Eq. (5), we obtain: and The above relations finally yield where and [21,25]. Now let us find the holographic relation for f (R)-gravity similar to Eq.
(1) for GR. It is clear that the holographic relation is satisfied in the Einstein frame due to the minimal coupling of the scalar field to gravity. In order to write the holographic relation in the Jordan frame, let us start from Eqs. (14) and (15). A simple calculation shows and Inserting (16) and (17) into (13) and using φ = f ′ (R), finally one obtains Considering relation (18), we see that the surface part of the Lagrangian is not determined completely by its bulk part. Therefore, we called it "holographic-like" relation. This is in contrast to EH Lagrangian, or more generally Lanczos-Lovelock Lagrangians [21]. Furthermore, the bulk Lagrangian in f (R)-gravity is not necessarily a quadratic Lagrangian and contains an arbitrary function of the second order derivatives of metric. Hence, the f (R) Lagrangian is not a degenerate Lagrangian. where is the momentum conjugate to the h ij in GR and n i is the normal vector of the boundary. As can be seen, to obtain the equations of motion, imposing the Dirichlet BC which leads to δh ij | Boundary = 0, we can get rid of the first surface integral in the above equation. To remove the second surface integral, there are two possibilities: 1) substituting δK ij | Boundary = 0, 2) adding the usual GHY boundary term to the action as follows The first choice implies simultaneously vanishing of the metric and its derivatives on the boundary which is inconsistent. To investigate the second choice let us vary the above action Hence, to get the equations of motion, we need to impose δR| Boundary = 0, in addition to δh ij | Boundary = δn i | Boundary = 0 which is Dirichlet BC because of g ab = h ab + ǫn a n b . It should be noted that although the normal to the boundary has a unit norm, this doesn't imply that the third term of (23) is zero. A simple calculation shows that In appendix B we have shown that δR is a combination of variations δh ij , δK ij , δn i , ∇ i δK and δ(∇ a ∇ i n a ). Now we can ask if δR| Boundary = 0 is compatible with the Dirichlet BC?
To answer this question we need to define, in a consistent way, the momenta conjugate to the field variables in order to distinguish the Dirichlet and Neumann BCs where the momentum fields vanish on the boundary. However, this can be done only for degenerate theories, where the bulk term contains at most the first order derivatives of the fields. Noting Ostrogradsky approach, we should change the f (R) Lagrangian into a degenerate one as much as possible. To do so, using scalar-tensor formulation, by introducing an scalar field φ, we write f (R) as Lagrangian (4) which is not far form GR that is degenerate. Now substituting the holographic relation (1) in action (4), we have The first integral contains only the metric, the field φ and the first order derivatives of the metric. Integrating by parts, this is also the case for the second integral, and thus the above Lagrangian is degenerate. To see this, let us rewrite Eq. (24) as follows where and M iabpqr is defined in Eq. (2). Note that P ab ≡ ∂( √ −gL quad )/∂(∂ 0 g ab ) is the canonical momentum of g ab in GR. Hereafter we have also assumed that ∂M contains two spacelike (D − 1)-dimensional surfaces at t = constant and one timelike surface on which the integral vanishes at large spatial distances. Now we are able to define the canonical momenta of φ and g ab as follows where P = g ab P ab and we have used the following relation Considering the action (25), one can see that, regardless of the surface integral which is a GHY term, the Lagrangian contains fields and their first order derivatives. Therefore, we can be sure that the variational principle for this action is compatible with the Dirichlet BC. Before investigating in details the compatibility of the model, let us show explicitly the structure of the added GHY term in the ADM formalism. Consider the following relation where n a = N −1 (1, −N α ) and the lapse and shift functions are denoted by N and N α . In the last equality we have used the following two identities Substituting the expression (29) into (25) gives where the first surface integral in (32), is the same as GHY term of Refs. [6,7]. However, the second surface term is often lost in the literatures. We will come back to this point in the next subsection. Now let us consider the variations of the action (25). First, we rewrite it in terms of the momenta given in Eqs. (26) and (27). By adding and subtracting the following surface integral to the action (25), we get Varying this action with respect to φ and g ab and using Eq. (28), after a little algebra, we obtain where (36) and in which and H iabkl ≡ ∂M iab /∂g kl . Substituting (36) and (37) in (35) gives As expected, without the GHY term, the undesirable BCs: δg ab | Boundary = δP ab | Boundary = δφ| Boundary = δ(∂ 0 φ)| Boundary = 0 should be assigned. In order to find the appropriate GHY term, let us discuss three different types of BCs leading to a consistent stationary action principle for f (R)-gravity.

Dirichlet BC
Considering the surface terms in Eq. (39), in order to impose the Dirichlet BC δg ab | Boundary = δφ| Boundary = 0, we need to modify the action (34) by adding the following GHY term (40) To see that the above action is compatible with the Dirichlet BC, let us vary it as follows which gives the equation of motion subjected the Dirichlet BC. Note that φ = f ′ (R) gives δφ| Boundary = f ′′ (R)δR| Boundary = 0. Now we can surely say that δR| Boundary = 0 is compatible with the Dirichlet BC and is in fact part of it. This is a clear covariant verification of the result pointed in Ref. [6] in the framework of the ADM foliation. To be more concrete, we can determine the GHY term S GHY D in terms of ADM variables. Using (29) and substituting φ = f ′ (R), we have which are the same terms present in Eq. (32). Since in ADM formalism, the Dirichlet BC means δh ab | Boundary = δN µ | Boundary = δN | Boundary = 0, the last term of the above equation can be neglected and the first term suffices. However, note that this is correct only for the Dirichlet BC.
To complete our discussion, we can set φ = 1 and V (φ) = 0 in Eq. (39) to find the following result for the case of GR Imposing the Dirichlet BC: δg ab | Boundary = 0, the action should be modified by the following GHY term to get the equations of motion, Moreover, using Eq. (29), we can rewrite S GHY D(EH) in the familiar form where for the Dirichlet BC, the second term can be neglected [26].

Neumann BC
In order to obtain the GHY term related to the Neumann BC: δP ab | Boundary = δP φ | Boundary = 0, let us write (39) in a different form. From (26) and (27), we find that Inserting this into (39) gives This shows that the action (34) is consistent with the Neumann BC if we propose the following GHY term Variation of (48) yields which gives the equations of motion using Neumann BC. Using (29) and inserting φ = f ′ (R), we can write the GHY term in (48) in the ADM formalism as It should be noted that unlike the case of Dirichlet BC, the second term in the above action can not be neglected unless for the coordinate system in which N α = 0. It is worth to compare (50) with the GHY term (42) for Dirichlet BC. It is easily seen that

Mixed BC
There are two types of mixed BCs for f (R)-gravity: δP ab | Boundary = δφ| Boundary = 0 or δP φ | Boundary = δg ab | Boundary = 0. We begin with the first one. Using the variation of f (R)-gravity action, (39) or (47), the first type mixed BC would be consistent if we have added the following GHY term to the action Varying the above action gives As can be seen, the mixed BC: δP ab | Boundary = δφ| Boundary = 0 yields consistently the equations of motion. Now using Eq. (29) and φ = f ′ (R), we can write the GHY term of Eq. (52) in terms of ADM variables as It is also worth noting here to find the relation between Dirichlet and the above mixed GHY boundary terms in f (R)-gravity. Comparing the above result with that obtained in Eq. (42), we see that For GR, i.e. φ = 1 and V (φ) = 0, it is interesting that the newly defined action (52) is consistent with the Neumann BC This shows that the pure Neumann BC may be used for GR in arbitrary dimensions. Moreover in four dimensions, for GR with Neumann BC, there is no need to any GHY term in order to have a consistent theory. This point, explained here covariantly is also shown recently in [15] in ADM approach.
To clarify more, using Eq. (29), it is easy to see that the above GHY term with respect to the ADM variables takes the form where again the second term in the above action or in (54), can be ignored only for the special choice of coordinate system mentioned in the previous subsection. Also, it can be easily seen that, in GR, in contrast to the Dirichlet case, the required GHY term, compatible with the Neumann BC, depends on the dimension of space-time and for D = 4, the coefficient of GHY term vanishes, as expected. Another interesting feature is the relation between Dirichlet and Neumann GHY term in GR. Comparing Eqs. (45) and (57), one finds Now let us look at the second type of mixed BC: δP φ | Boundary = δg ab | Boundary = 0. In order to discuss the consistency of f (R)-gravity with this BC, first we use (46) to substitute for g ab δP ab in (39). This leads to Clearly by applying the BC: δP α | Boundary = δg ab | Boundary = 0, we can get the equations of motion without adding any GHY term to the above expression.
This means that f (R)-gravity with the above type of mixed BC is selfconsistent with no need to any GHY term in D dimension. To clarify this point better, let us return to the relation (20) in which the boundary terms are written in the ADM formalism. One can write these terms in term of the momenta conjugate to φ, h ij , N and N α . These are derived in details in appendix C and are as follows Substituting this into (20) and inserting φ = f ′ (R), we obtain where h ij δn i = −n i δh ij is used. It can be seen that the above surface terms, which are written in the ADM formalism, are completely in agreement with what we have derived by the covariant approach in (59). Regarding the above relation and by applying the mixed BC: δΠ φ | Boundary = δn i | Boundary = δh ij | Boundary = 0, we can get the equations of motion in D dimension without any GHY term.

conclusion
In this paper it is shown that unlike GR, the Lagrangian of f (R)-gravity does not follow a holographic relation which is the feature of the Lanczos-Lovelock Lagrangian. Moreover, the Lagrangian of f (R)-gravity can not be expressed as the sum of quadratic and total derivative terms. So f (R) Lagrangian is not degenerate. Following the Ostrogradsky approach, since f (R)-gravity is a theory with higher order derivatives of metric, it carries a single additional degree of freedom, which is the scalar field of equivalent Brans-Dicke action. Introducing this field, leads to a degenerate Lagrangian which is used to develop the problem of BC and the corresponding GHY terms in f (R)-gravity [6,7].
Here we have followed a foliation independent approach to find the GHY boundary terms in f (R)-gravity, required to make the BC variation problem well-defined. We have shown that in addition to the Dirichlet BC, the Neumann BC and two types of the mixed BCs can be introduced for the f (R)-gravity. The remarkable point which is one of the main results of this paper is about the mixed BCs. We have shown that one of the mixed BC: δP ab | Boundary = δφ| Boundary = 0 is reduced to the Neumann BC in the case of GR. This BC together the other mixed BC: δP φ | Boundary = δg ab | Boundary = 0 are self-consistent BCs, i.e. these do not need to any GHY term to be consistent with the theory, the first one for GR and the second one for f (R)-gravity, both in D dimension.
where D i is the spatial-covariant derivative defined on ∂M, U i ≡ n j h i

B Variation of the scalar curvature
It is instructive to find what does the condition δR | Boundary = 0 mean. To answer this question, first let's remind the Gauss-Codazzi equation: where (D−1) R is the scalar curvature of the (D − 1)-dimensional subspace and in the first line a i = n a ∇ a n i is the acceleration of the normal vector field. Then taking variation of (B.1) with ǫ = −1 gives the Palatini identity as follows where the variation of spatial scalar curvature reads As is obvious from (B.2) and (B.3), δR is a combination of δh mn , δn i , δK mn , ∇ i (δK ), δ(∇ a ∇ i n a ) and spatial-covariant derivatives of δh mn .

C The conjugate momenta in f (R)-gravity
To find the conjugate momenta, we write the f (R) action in the Brans-Dicke form and then using the Holographic relation as in (24), make it degenerate. To do this, substituting the Gauss-Codazzi equation in D dimension, (B.1), into (4), we find that By-part integration on the last term gives where n i a i = 0, n i n i = ǫ and Dφ ≡ n i ∇ i φ have been used. Using following calculation and n i = ( 1 N , −N α N ), we have Substituting (C.6) and (C.7) into (21), we obtain Now we can define the momenta conjugate to h αβ , N , N α and φ as