In working out the pressure at a given depth in water we assume that the
water is incompressible – that is its density is constant with depth. This is very nearly
accurate. However this would not be true of a fluid such as air. In the atmosphere the
pressure increases with depth but the density of the air also varies from 1.2 kgm^{-3}
at sea level to virtually zero at the edge of space.

Let the change in pressure due to a small change of height Δh be Δp

Take the density at a height h to be ρ and the density at the height h+Δh to be
ρ-Δρ.

If the temperature (T) of the air is constant ρ is directly proportional to the pressure (p)
and so:

p/p_{o} = ρ/ρ_{o}
where p_{o} and ρ_{o} are the pressure and density of air at
sea level.

Therefore Δp/Δh = -
rg = -gρ_{o}[p/p_{o}]

When this is integrated we have:

Density (ρ) at a height h = ρ

Substituting for the accepted values of g, p

1. Calculate the pressure of the air at a height of 10 000 m (10 km) (the height at which many intercontinental jets fly). Take the pressure at sea level to be 10

Pressure (p) = 10

Pressure = 10

2. Calculate the distance below the surface of the Earth at which a piece of iron (density 7870kgm

7870 = 1.3e

Therefore 6053 = e

The temperature of the atmosphere also decreases with height.

The standard variation being a drop of 6