  We investigate ergodicity, chaos and thermalization for a one-dimensional
classical gas of hard rods confined to an external quadratic or quartic trap,
which breaks microscopic integrability. To quantify the strength of chaos in
this system, we compute its maximal Lyapunov exponent numerically. The approach
to thermal equilibrium is studied by considering the time evolution of particle
position and velocity distributions and comparing the late-time profiles with
the Gibbs state. Remarkably, we find that quadratically trapped hard rods are
highly non-ergodic and do not resemble a Gibbs state even at extremely long
times, despite compelling evidence of chaos for four or more rods. On the other
hand, our numerical results reveal that hard rods in a quartic trap exhibit
both chaos and thermalization, and equilibrate to a Gibbs state as expected for
a nonintegrable many-body system.
