We derive the equations of linear cosmological perturbations for the general
Lagrangian density f(R,ϕ,X)/2+Lc, where R is a Ricci scalar, ϕ
is a scalar field, and X=−(∇ϕ)2/2 is a field kinetic energy. We
take into account a nonlinear self-interaction term Lc recently studied in
the context of "Galileon" cosmology, which keeps the field equations at second
order. Taking into account a scalar-field mass explicitly, the equations of
matter density perturbations and gravitational potentials are obtained under a
quasi-static approximation on sub-horizon scales. We also derive conditions for
the avoidance of ghosts and Laplacian instabilities associated with propagation
speeds. Our analysis includes most of modified gravity models of dark energy
proposed in literature and thus it is convenient to test the viability of such
models from both theoretical and observational points of view.Comment: 17 pages, no figure