  The spectral energy distribution (SED) of TeV blazars peaks both at keV and
TeV energies. The X-ray emission is generally believed to originate in the
synchrotron emission from relativistic electrons (and positrons) in the jet of
these sources, while the origin of the gamma-ray emission is still being
debated. We report results from a systematic study of X-ray spectral
variability of Mrk 421 and Mrk 501 during individual flares that last for
several days, making use of some of the high-quality data that have recently
become available. The X-ray spectra of the two sources fall on the opposite
sides of the synchrotron peak of their respective SEDs, so they together may
offer additional insights into the physical origin of X-ray variability. We
modeled each of the time-resolved X-ray spectra over a {\em single} flare by
adopting a homogeneous spatial distribution and an instantaneous power-law
spectral distribution for the emitting particles. We focused on the variation
of four key parameters: particle spectral index, maximum Lorentz factor, energy
density, and magnetic field. While there is considerable degeneracy in the
fits, we show that, in order to account for the X-ray spectral variability
observed in Mrk 421, at least three of the parameters are required to vary in
most cases, with the spectral index being one of them. The observations of Mrk
501 support the conclusion, although the quality of the data is not as good. We
discuss the implications of the results.
