We investigate the magnetic properties of the ideal Bose gas in both t
he relativistic and nonrelativistic regimes, and demonstrate its remar
kable behavior as a superconductor, where: it expels totally an extern
al homogeneous field, and also a new phenomenon, which we call superdi
amagnetism, where the gas very nearly does so. These two phenomena are
shown to exist in two distinct temperature regimes for both the nonre
lativistic and relativistic gases, and are revealed by a careful consi
deration of the analytic structure of the thermodynamic potential of t
he system, accessible by the powerful method of the Mellin integral tr
ansform. We also comment on other approaches to this problem which hav
e recently appeared.