  It has been argued that the speed of sound of the strong interaction at high
temperature can be measured using the variation of the mean transverse momentum
with the particle multiplicity in ultracentral heavy-ion collisions. We test
this correspondence by running hydrodynamic simulations at zero impact
parameter with several equations of state, at several colliding energies from
0.2 TeV to 15 TeV per nucleon pair. The correspondence is found to be precise
and robust for a smooth, boost-invariant fluid and an ideal detector. We
discuss the differences between this ideal setup and an actual experiment. We
conclude that the extraction of the speed of sound from data is reliable, and
that the main uncertainty comes from our poor knowledge of the distribution of
density fluctuations at the early stages of the collision.
