  We present a simple method for obtaining elastic scattering phase shifts and
cross sections from energies of atoms or ions in cavities. This method does not
require calculations of wavefunctions of continuum states, is very general, and
is extremely convenient from practical point of view: some conventional
computer codes designed for the energies of bound states can be used without
modifications. The application of the method is illustrated on an example of
electron scattering from Kr and Ar. From Brueckner orbital energies in variable
cavities, we have obtained ab initio cross sections that are in close agreement
with experiment. The relativistic effects are also considered and found to be
small below 10 eV.
