Solution (source code)

= Solution

For an expanding universe, <cosmic inflation> requires $\ddot a>0$. Including any vacuum contribution in the total density and pressure, the acceleration equation gives \b[$\boxed{\rho+3P<0}$], or $w=P/\rho<-1/3$ for positive density. Equivalently the <comoving Hubble radius> $(aH)^{-1}=\dot a^{-1}$ decreases. Since $|\Omega_{\rm total}-1|=|k|/(aH)^2$, prolonged acceleration suppresses curvature and addresses the <flatness problem>. A sufficiently long inflationary phase also stretches a region that was initially causally connected to encompass the observed region, addressing the <horizon problem>. The condition on acceleration must last long enough; an arbitrarily short interval is insufficient.

For a homogeneous canonical <scalar field> $\Phi$ with potential $V(\Phi)$,
$$
\rho_\Phi=\tfrac12\dot\Phi^2+V,\qquad P_\Phi=\tfrac12\dot\Phi^2-V,\qquad
\rho_\Phi+3P_\Phi=2(\dot\Phi^2-V).
$$
Thus \b[$V>\dot\Phi^2$] is sufficient for inflation. A suitably flat positive potential gives <slow-roll inflation>: Hubble damping in $\ddot\Phi+3H\dot\Phi+V_{,\Phi}=0$ keeps the kinetic energy small compared with $V$, so $P_\Phi\simeq-\rho_\Phi$.