VarL

VarL[g[-a, -b]][L]
returns while integrating by parts with respect to the covariant derivative of the metric gab.
VarL[g[-a, -b], cd][L]
returns while integrating by parts with respect to the covariant derivative cd.
  • VarL throws away total derivatives after partial integration.
  • The variation can also be taken with respect to the inverse metric.