  In this work we shall investigate the cosmological dynamical system of $f(R)$
gravity, by constructing it in such a way so that it is rendered autonomous. We
shall study the vacuum $f(R)$ gravity case, but also the case that matter and
radiation perfect fluids are present along with the $f(R)$ gravity. The
dynamical system is constructed in such a way so that the time-dependence of
the system is contained in a single parameter which depends on the Hubble rate
and it's second derivative. The autonomous structure of the dynamical system is
achieved when this parameter is constant, therefore we focus on these cases.
For the vacuum $f(R)$ case, we investigate two cases with the first leading to
a stable de Sitter attractor fixed point but also to an unstable de Sitter
fixed point, and the second is related to a matter dominated era. The stable de
Sitter attractor is also found for the $f(R)$ gravity in the presence of matter
and radiation perfect fluids. In all the cases we performed a detailed
numerical analysis of the dynamical system and we also investigate in detail
the stability of the resulting fixed points. Also, we present an exceptional
feature of the $R^2$ gravity model, in the absence of perfect fluids. Finally,
we investigate what is the approximate form of the $f(R)$ gravities near the
stable and the unstable de Sitter fixed points.

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