  We investigate local and global properties of the one-dimensional
Bose-Hubbard model with an external confining potential, describing an atomic
condensate in an optical lattice. Using quantum Monte Carlo techniques we
demonstrate that a local-density approximation, which relates the unconfined
and the confined model, yields quantitatively correct results in most of the
interesting parameter range. We also examine claims of universal behavior in
the confined system, and demonstrate the origin of a previously calculated fine
structure in the experimentally accessible momentum distribution.
