Solution (source code)

= Solution

The matter-like scaling is special to a quadratic minimum. More generally, the <effective equation of state of an oscillating scalar field> in $V\propto|\phi|^n$ is
$$
\langle w\rangle=\frac{n-2}{n+2},
\qquad
\rho_\phi\propto a^{-6n/(n+2)}.
$$
For example, a quartic minimum has $\langle w\rangle=1/3$ and redshifts like <radiation in cosmology>. Potentials without a stable minimum, oscillations whose period is not short relative to the <Hubble time>, and significant decay of the inflaton into other particles also invalidate the matter-like argument.