  We study the most general cosmological model with real scalar field which is
minimally coupled to gravity. Our calculations are based on
Friedmann-Lemaitre-Robertson-Walker (FLRW) background metric. Field equations
consist of three differential equations. We switch independent variable from
time to scale factor by change of variable $\dot{a}/a=H(a)$. Thus a new set of
differential equations are analytically solvable with known methods. We
formulate Hubble function, the scalar field, potential and energy density when
one of them is given in the most general form. $a(t)$ can be explicitly found
as long as methods of integration techniques are available. We investigate the
dynamics of the universe at early times as well as at late times in light of
these formulas. We find mathematical machinery which turns on and turns off
early accelerated expansion. On the other hand late time accelerated expansion
is explained by cosmic domain walls. We have compared our results with recent
observations of type Ia supernovae by considering the Hubble tension and
absolute magnitude tension. Eighty-nine percent of present universe may consist
of domain walls while rest is matter.
