robphy said:
Well, Wald is correct to state that the basic action from which the field equations can be derived is the Einstein-Hilbert action:
[tex]S_{\textrm{E-H}}[g] = \frac{1}{2\kappa}\int_\mathcal{M} d^4x\,\sqrt{-g}R + S_M,[/tex]
where [itex]S_M[/itex] is a (possibly derivatively coupled) matter action. This is all fine if [itex]\mathcal{M}[/itex] has no boundary. However, if [itex]\partial\mathcal{M}\ne\emptyset[/itex] then in order for the variational principle to be well posed one needs to add the Gibbons-Hawking-York boundary term [itex]S_{\partial\mathcal{M}}[g][/itex]. Then we have
[tex]S[g] = \frac{1}{2\kappa}\int_\mathcal{M} d^4x\sqrt{-g}R + \frac{1}{\kappa}\int_{\partial\mathcal{M}}d^3y \sqrt{|h|}\textrm{tr}K + S_M,[/tex]
where [itex]h_{ij}[/itex] is a three-metric on [itex]\partial\mathcal{M}[/itex] and [itex]\textrm{tr}K=h^{ij}K_{ij}[/itex] is the trace of the extrinsic curvature of [itex]\partial\mathcal{M}[/itex].
In fairness, Wald does stress the importance of this boundary contribution to the action, but he concludes that the action above is sufficient to derive sensible field equations. This is untrue. If you evaluate the gravitational action for, say, flat spacetime, then [itex]S_{\textrm{E-H}}[g]=0[/itex]. However, for flat spacetime [itex]S_{\partial\mathcal{M}}[g][/itex] is divergent, making the action effectively infinite. Thus, the action that Wald uses is actually ill defined except when [itex]\mathcal{M}[/itex] is compact. In order to overcome this, one needs to introduce a further correction to the action, meaning that the
true action for general relativity is
[tex]S = S_{\textrm{E-H}}[g] + S_{\partial\mathcal{M}}[g] + S_M - \frac{1}{\kappa}\int_{\partial\mathcal{M}} d^3y\sqrt{|h|}K_0[/tex]
where [itex]K_0[/itex] is the extrinsic curvature of [itex]\partial\mathcal{M}[/itex] embedded in Minkowski space.