  A new class of modified theories of gravity, consisting of the superposition
of the metric Einstein-Hilbert Lagrangian with an $f(\cal R)$ term constructed
\`{a} la Palatini was proposed recently. The dynamically equivalent
scalar-tensor representation of the model was also formulated, and it was shown
that even if the scalar field is very light, the theory passes the Solar System
observational constraints. Therefore the model predicts the existence of a
long-range scalar field, modifying the cosmological and galactic dynamics. An
explicit model that passes the local tests and leads to cosmic acceleration was
also obtained. In the present work, it is shown that the theory can be also
formulated in terms of the quantity $X\equiv \kappa^2 T+R$, where T and R are
the traces of the stress-energy and Ricci tensors, respectively. The variable X
represents the deviation with respect to the field equation trace of general
relativity. The cosmological applications of this hybrid metric-Palatini
gravitational theory are also explored, and cosmological solutions coming from
the scalar-tensor representation of f(X)-gravity are presented. Criteria to
obtain cosmic acceleration are discussed and the field equations are analyzed
as a dynamical system. Several classes of dynamical cosmological solutions,
depending on the functional form of the effective scalar field potential,
describing both accelerating and decelerating Universes are explicitly
obtained. Furthermore, the cosmological perturbation equations are derived and
applied to uncover the nature of the propagating scalar degree of freedom and
the signatures these models predict in the large-scale structure.

General Relativity and Quantum Cosmology;Cosmology and Nongalactic Astrophysics;High Energy Physics - Theory