In quantum field theory with confining ''hard'' (e.g., Dirichlet) boun
daries, the latter are represented in the Schrodinger equation definin
g spatial quantum modes by infinite step-function potentials. One can
instead introduce confining ''soft'' boundaries, represented in the mo
de equation by some smoothly increasing potential function. Here the g
lobal Casimir energy is calculated for a scalar field confined by harm
onic-oscillator (HO) potentials in one, two, and three dimensions. Com
binations of HO and Dirichlet boundaries are also considered. Some res
ults differ in sign from comparable hard-wall ones.