  We theoretically investigate the dynamics of a trapped ion immersed in a
spatially localized buffer gas. For a homogeneous buffer gas, the ion reaches a
stable equilibrium only if the mass ratio of the buffer gas atom to the ion is
below a critical value. We show how this limitation can be overcome by using
multipole traps and a spatially confined buffer gas. Using a generalized model
for elastic collisions of the ion with the buffer gas atoms, the ion's energy
distribution is derived for arbitrary buffer gas distributions and trap
parameters. Three regimes characterized by the analytical form of the ion's
energy distribution are found. Final ion temperatures down to the millikelvin
regime can be achieved even for heavy buffer gases by actively controlling the
size of the buffer gas or the trap voltage (forced sympathetic cooling).
