Solution (source code)

= Solution

The <Friedmann acceleration equation> gives
$$
\frac{\ddot a}{a}
=-\frac{4\pi G}{3c^2}(\rho+3P).
$$
For the scalar field,
$$
\rho+3P=2\dot\phi^2-2V(\phi),
$$
and hence
$$
\boxed{
\frac{\ddot a}{a}
=\frac{8\pi G}{3c^2}
\left[V(\phi)-\dot\phi^2\right]
}.
$$
An inflationary phase occurs precisely when potential energy dominates enough that
$$
\boxed{V(\phi)>\dot\phi^2}.
$$