  Coherent oscillations of a scalar field can mimic the behavior of a perfect
fluid with an equation-of-state parameter determined by the properties of the
potential, possibly driving accelerated expansion in the early Universe
(inflation) and/or in the Universe today (dark energy) or behaving as dark
matter. We consider the growth of inhomogeneities in such a field, mapping the
problem to that of two coupled anharmonic oscillators. We provide a simple
physical argument that oscillating fields with a negative equation-of-state
parameter possess a large-scale dynamical instability to growth of
inhomogeneities. This instability renders these models unsuitable for
explaining cosmic acceleration. We then consider the gravitational instability
of oscillating fields in potentials that are close to, but not precisely,
harmonic. We use these results to show that if axions make up the dark matter,
then the small-scale cutoff in the matter power spectrum is around $10^{-15}
M_\oplus$.
