  Optical lattice experiments, with the unique potential of tuning interactions
and density, have emerged as emulators of nontrivial theoretical models that
are directly relevant for strongly correlated materials. However, so far the
finite temperature phase diagram has not been mapped out for any strongly
correlated quantum model. We propose a remarkable method for obtaining such a
phase diagram for the first time directly from experiments using only the
density profile in the trap as the input. We illustrate the procedure
explicitly for the Bose Hubbard model, a textbook example of a quantum phase
transition from a superfluid to a Mott insulator. Using "exact" quantum Monte
Carlo simulations in a trap with up to $10^6$ bosons, we show that kinks in the
local compressibility, arising from critical fluctuations, demarcate the
boundaries between superfluid and normal phases in the trap. The temperature of
the bosons in the optical lattice is determined from the density profile at the
edge. Our method can be applied to other phase transitions even when reliable
numerical results are not available.
