  Driving a quantum many-body system across the quantum phase transition (QPT)
in the finite time has been concerned in different branches of physics to
explore various fundamental questions. Here, we analyze how the underlying QPT
affects the work distribution $P(W)$, when the control parameter of a
ferromagnetic spinor Bose-Einstein condensates is tuned through the critical
point in the finite time. We show that the work distribution undergoes a
dramatic change with increasing the driving time $\tau$. To capture the
characteristics of the work distribution, we analyze the entropy of $P(W)$ and
find three different regions in the evolution of entropy as a function of
$\tau$. Specifically, the entropy is insensitive to the driving time in the
region of very short $\tau$, while it exhibits a universal power-law decay in
the region with intermediate value of $\tau$. In particular, the power-law
scaling of the entropy is according with the well-known Kibble-Zurek mechanism.
For the region with large $\tau$, the validity of the adiabatic perturbation
theory leads to the entropy decay as $\tau^{-2}\ln\tau$. Our results verify the
usefulness of the entropy of the work distribution for understanding the
critical dynamics and provide an alternative way to experimentally study
nonequilibrium properties in quantum many-body systems.
