  We investigate the critical behavior of trapped particle systems at the
low-temperature superfluid transition. In particular, we consider the
three-dimensional Bose-Hubbard model in the presence of a trapping harmonic
potential coupled with the particle density, which is a realistic model of cold
bosonic atoms in optical lattices. We present a numerical study based on
quantum Monte Carlo simulations, analyzed in the framework of the trap-size
scaling (TSS).
  We show how the critical parameters can be derived from the trap-size
dependences of appropriate observables, matching them with TSS. This provides a
systematic scheme which is supposed to exactly converge to the critical
parameters of the transition in the large trap-size limit. Our numerical
analysis may provide a guide for experimental investigations of trapped systems
at finite-temperature and quantum transitions, showing how critical parameters
may be determined by looking at the scaling of the critical modes with respect
to the trap size, i.e. by matching the trap-size dependence of the experimental
data with the expected TSS Ansatz.
