  It is obtained that dark energy emerges from higher-derivative gravity with
anon-linear terms proportional to $R^2$ and $R^3$ with $R$ being the Ricci
scalar curvature. Interestingly, it is found that the universe begins with
acceleration, which continues for a short period. Later on,it decelerates
driven by radiation and subsequently by matter. Two components of dark energy
are found here.In the early universe, dark energy mimics quintessence giving
high vlue of initial density $\sim 10^{75} {\rm GeV}^4$ at Planck scale. But,
in the late universe, dark energy behaves like phantom giving current value of
its density and causing late acceleration for some time. Thereafter,
deceleration driven by matter resumes.Thus, two components of dark energy are
obtained here (i) quintessence-like in the early universe and (ii)phantom-like
in the late universe. Moreover, it is interesting to see acceleration being a
transient phenomenon in early as well as late universe.
