  We investigate the phase-space of a flat FRW universe including both a scalar
field, $\phi,$ coupled to matter, and radiation. The model is inspired in
scalar-tensor theories of gravity, and thus, related with $F(R)$ theories
through conformal transformation. The aim of the chapter is to extent several
results to the more realistic situation when radiation is included in the
cosmic budget particularly for studying the early time dynamics. Under mild
conditions on the potential we prove that the equilibrium points corresponding
to the non-negative local minima for $V(\phi)$ are asymptotically stable.
Normal forms are employed to obtain approximated solutions associated to the
inflection points and the strict degenerate local minimum of the potential. We
prove for arbitrary potentials and arbitrary coupling functions $\chi(\phi),$
of appropriate differentiable class, that the scalar field almost always
diverges into the past. It is designed a dynamical system adequate to studying
the stability of the critical points in the limit $|\phi|\to\infty.$ We obtain
there: radiation-dominated cosmological solutions; power-law scalar-field
dominated inflationary cosmological solutions; matter-kinetic-potential scaling
solutions and radiation-kinetic-potential scaling solutions. Using the
mathematical apparatus developed here, we investigate the important examples of
higher order gravity theories $F(R) = R + \alpha R^2$ (quadratic gravity) and
$F(R) =R^n.$ We illustrated both analytically and numerically our principal
results. In the case of quadratic gravity we prove, by an explicit computation
of the center manifold, that the equilibrium point corresponding to de Sitter
solution is locally asymptotically unstable (saddle point).
