  We apply a basis function expansion method to create a time-evolving
density/potential approximation of the late growth of simulated N-body dark
matter haloes. We demonstrate how the potential of a halo from the Aquarius
Project can be accurately represented by a small number of basis functions, and
show that the halo expansion (HEX) method provides a way to replay simulations.
We explore the level of accuracy of the technique as well as some of its
limitations. We find that the number of terms included in the expansion must be
large enough to resolve the large-scale distribution and shape of the halo but,
beyond this, additional terms result in little further improvement. Particle
and subhalo orbits can be integrated in this realistic, time-varying halo
potential approximation, at much lower cost than the original simulation, with
high fidelity for many individual orbits, and a good match to the distributions
of orbital energy and angular momentum. Statistically, the evolution of
structural subhalo properties, such as mass, half-mass radius and
characteristic circular velocity, are very well reproduced in the halo
expansion approximation over several gigayears. We demonstrate an application
of the technique by following the evolution of an orbiting subhalo at much
higher resolution than can be achieved in the original simulation. Our method
represents a significant improvement over commonly used techniques based on
static analytical descriptions of the halo potential.
