Considering a unit mass of an ideal gas in a cylindrical container of volume 'V' at temperature 'T' the pressure exerted by the gas at the walls of the container is given by the ideal gas equation as, pV=RT where 'R' is the characteristic gas constant for the particular gas. Under equilibrium conditions this pressure should have equal values as measured at every point within the container. Again considering the gas in the container as a fluid at rest there should be a vertical pressure gradient satisfying the relation as given by the hydrostatic law, dp/dz=-γ=-ρ*g where, 'z' is the elevation measured in a vertically downward direction, 'γ' is the weight density and 'ρ' is the mass density of the gas, and 'g' is the acceleration due to gravity. Now for the gas at rest within the cylinder if we assume uniform density everywhere within the container i.e, the variation of density with spatial location to be absent we may integrate previous equation as, ∫dp=-γ∫dz=-ρg∫dz or,p=-ρgz Thus, pressure should vary linearly with depth for the gas within the cylinder whereas we know that the pressure at all points within the cylinder should be the same as given by the ideal gas model! I fail to understand where am I possibly wrong.Any views on this?