  Gamma-ray bursts (GRBs) are the most explosive phenomena and can be used to
study the expansion of Universe. In this paper, we compile a long GRB sample
for the $E_{\mathrm{iso}}$-$E_{\mathrm{p}}$ correlation from Swift and Fermi
observations. The sample contains 221 long GRBs with redshifts from 0.03 to
8.20. From the analysis of data in different redshift intervals, we find no
statistically significant evidence for the redshift evolution of this
correlation. Then we calibrate the correlation in six sub-samples and use the
calibrated one to constrain cosmological parameters. Employing a piece-wise
approach, we study the redshift evolution of dark energy equation of state
(EOS), and find that the EOS tends to be oscillating at low redshift, but
consistent with $-1$ at high redshift. It hints a dynamical dark energy at
$2\sigma$ confidence level at low redshift.
