1. The problem statement, all variables and given/known data We have an ideal gas consisted of N classical particles, each having mass m. The system is inside a spherical bottle of radius R and is inside the gravitational field of the earth. The system is also in thermal equilibrium with a heat reservoir which has temperature T. I have to find the partition function and the energy of the system. 2. The attempt at a solution The problem I face is finding the energy of a single particle. I'm confused regarding the potential energy. My solution is in the pdf file. Is there something wrong with the spherical coordinates?