Solution (source code)

= Solution

For the <equation of state> $P=w\rho$ with positive <energy density>,
$$
\frac{\ddot a}{a}=-\frac{4\pi G}{3}\rho(1+3w).
$$
The expansion is accelerated for $w<-1/3$, coasting for $w=-1/3$, and decelerated for $w>-1/3$.