  Imaging spectroscopy in X-rays with RHESSI provide the possibility to
investigate the spatial evolution of the X-ray emitting electron distribution
and therefore to study the transport effects on energetic electrons during
solar flares. We study the energy dependence of the energetic electron
scattering mean free path in the solar corona. We use the imaging spectroscopy
technique with RHESSI to study the evolution of energetic electrons
distribution in different part of the magnetic loop during the 2004 May 21
flare. These observations are compared with the radio observations of the
gyrosynchrotron radiation of the same flare by Kuznetsov and Kontar (2015), and
with the predictions of the diffusive transport model described by Kontar et
al. (2014). The X-ray analysis shows a trapping of energetic electrons in the
corona and a spectral hardening of the energetic electron distribution between
the top of the loop and the footpoints. Coronal trapping of electrons is
stronger for the radio-emitting electrons than for the X-ray-emitting
electrons. These observations can be explained by the diffusive transport model
derived by Kontar et al. (2014). We show that the combination of X-ray and
radio diagnostics is a powerful tool to study electron transport in the solar
corona in different energy domains. We show that the diffusive transport model
can explain our observations; and in the range 25-500 keV, the electron
scattering mean free path decreases with electron energy. We can estimate for
the first time the scattering mean free path dependence on energy in the
corona.
