  By gradually changing the degree of the anisotropy in a XXZ chain we study
the defect formation in a quantum system that crosses an extended critical
region. We discuss two qualitatively different cases of quenches, from the
antiferromagnetic to the ferromagnetic phase and from the critical to the
antiferromegnetic phase. By means of time-dependent DMRG simulations, we
calculate the residual energy at the end of the quench as a characteristic
quantity gauging the loss of adiabaticity. We find the dynamical scalings of
the residual energy for both types of quenches, and compare them with the
predictions of the Kibble-Zurek and Landau-Zener theories.
