Boundary term in metric f ( R ) gravity: field equations in the metric formalism
The main goal of this paper is to get in a straightforward form the field equations in metric f (R) gravity, using elementary variational principles and adding a boundary term in the action, instead of the usual treatment
in an equivalent scalar–tensor approach. We start with a brief review of the Einstein–Hilbert action, together with the Gibbons–York–Hawking
boundary term, which is mentioned in some literature, but is generally missing. Next we present in detail the field equations
in metric f (R) gravity, including the discussion about boundaries, and we compare with the Gibbons–York–Hawking term in General Relativity.
We notice that this boundary term is necessary in order to have a well defined extremal action principle under metric variation.