  This paper is aimed at a (mostly) pedagogical exposition of the derivation of
the motion equations of certain modifications of general relativity. Here we
derive in all detail the motion equations in the Brans-Dicke theory with the
cubic self-interaction. This is a modification of the Brans-dicke theory by the
addition of a term in the Lagrangian which is non-linear in the derivatives of
the scalar field: it contains second-order derivatives. This is the basis of
the so-called Brans-Dicke Galileon. We pay special attention to the variational
principle and to the algebraic details of the derivation. It is shown how
higher order derivatives of the fields appearing in the intermediate
computations cancel out leading to second order motion equations. The reader
will find useful tips for the derivation of the field equations of
modifications of general relativity such as the scalar-tensor theories and
$f(R)$ theories, by means of the (stationary action) variational principle. The
content of this paper is specially recommended to those graduate and
postgraduate students who are interested in the study of the mentioned
modifications of general relativity.
