  There is an incompatibility between gauge invariance and the semi-classical
time-dependent perturbation theory commonly used to calculate light absorption
and scattering cross-sections. There is an additional incompatibility between
perturbationtheory and the description of the electron dynamics by a
semi-relativistic Hamiltonian.In this paper, the gauge-dependence problem of
exact perturbation theory is described, the proposed solutions are reviewed and
it is concluded that none of them seems fully satisfactory. The problem is
finally solved by using the fully relativistic absorption and scattering
cross-sections given by quantum electrodynamics. Then, a new many-body
Foldy-Wouthuysen transformation is presented to obtain correct
semi-relativistic transition operators.This transformation considerably
simplifies the calculation of relativistic corrections. In the process, a new
light-matter interaction term emerges, called the spin-position interaction,
that contributes significantly to the magnetic x-ray circular dichroism of
transition metals.We compare our result with the ones obtained by using several
semi-relativistic time-dependent Hamiltonians. In the case of absorption, the
final formula agrees with the result obtained from one of them. However, the
correct scattering cross-section is not given by any of the semi-relativistic
Hamiltonians.
