  In this paper, we shall consider $f(R)$ gravity and its cosmological
implications, when an extra matter term generated by thermal effects is added
by hand in the Lagrangian. We formulate the equations of motion of the theory
as a dynamical system, that can be treated as an autonomous one only for
specific solutions for the Hubble rate, which are of cosmological interest.
Particularly, we focus our analysis on subspaces of the total phase space,
corresponding to (quasi-)de Sitter accelerating expansion, matter-dominated and
radiation-dominated solutions. In all the aforementioned cases, the dynamical
system is an autonomous dynamical system. With regard to the thermal term
effects, these are expected to significantly affect the evolution near a Big
Rip singularity, and we also consider this case in terms of the corresponding
dynamical system, in which case the system is non-autonomous, and we attempt to
extract analytical and numerical solutions that can assess the specific cases.
This course is taken twice: the first for the vacuum theory and the second when
two perfect fluids (dust and radiation) are included as matter sources in the
field equations. In both cases, we reach similar conclusions. The results of
this theory do not differ significantly from the results of the pure $f(R)$ in
the de Sitter and quasi-de Sitter phases, as the same fixed points are
attained, so for sure the late-time era de Sitter is not affected. However, in
the matter-dominated and radiation-dominated phases, the fixed points attained
are affected by the presence of the thermal term, so surely the thermal effects
would destroy the matter and radiation domination eras.
