  In indirect resonant inelastic X-ray scattering (RIXS) an intermediate state
is created with a core-hole that has a ultrashort lifetime. The core-hole
potential therefore acts as a femtosecond pulse on the valence electrons. We
show that this fact can be exploited to integrate out the intermediate states
from the expressions for the scattering cross section. By this we obtain an
effective scattering cross section that only contains the initial and final
scattering states. We derive in detail the effective cross section which turns
out to be a resonant scattering factor times a linear combination of the charge
response function $S({\bf q},\omega)$ and the dynamic longitudinal spin density
correlation function. This result is asymptotically exact for both strong and
weak local core-hole potentials and ultrashort lifetimes. The resonant
scattering pre-factor is shown to be weakly temperature dependent. We also
derive a sum-rule for the total scattering intensity and generalize the results
to multi-band systems. One of the remarkable outcomes is that one can change
the relative charge and spin contribution to the inelastic spectral weight by
varying the incident photon energy.
