I am getting really tripped up by this exercise: You're given a non interacting gas of particles each having a mass m in a homogeneous gravitational field in a set temperature T. You're told it is non interacting so it obeys the Maxwell distribution of speeds. Then you are asked to find the altitude $z$-dependence of pressure and density in thermodynamic equilibrium.
It even gives a hint, it says "consider two horizontal surfaces $z1$ and $z2$ and think about what thermodynamic equilibrium means for particles traveling from one surface to the other". This really trips me up because I am not sure what to do with this. Obviously in equilibrium the number of particles between the surfaces should stay the same, but what does this tell me really? I can't see where this is going. The best conclusion I can draw out of it is that the same number of particles crossing either surface going downwards is crossing it to go upwards. But so what?
Another thing I considered is that the energy of some particles won't be enough to go above a certain altitude. But again, so what? It doesn't tell me that much as far as I can tell.
Normally I would try to find the canonical partition function, use it to find the entropy etc. But given that it tells me it obeys the Maxwell-Boltzmann distribution and given the hint, there must be something else I am supposed to do. Any ideas?