Thermodynamics of trapped interacting bosons in one dimension