  The Casimir effect of an ideal Bose gas trapped in a generic power-law
potential and confined between two slabs with Dirichlet, Neumann, and periodic
boundary conditions is investigated systematically, based on the grand
potential of the ideal Bose gas, the Casimir potential and force are
calculated. The scaling function is obtained and discussed. The special cases
of free and harmonic potentials are also discussed. It is found that when T<Tc
(where Tc is the critical temperature of Bose-Einstein condensation), the
Casimir force is a power-law decay function; when T>Tc, the Casimir force is an
exponential decay function; and when T>>Tc, the Casimir force vanishes.
