In a non-uniform gas, the equation of state is valid locally, as long as the density does not change too rapidly with position. Consider a column of ideal gas under gravity at constant temperature. Find the density as a function of height, by balancing the forces acting on a volume element