The density distribution of a weakly interacting bose gas in an external potential