Write the relation for ratio of pressures.
Here, is the initial pressure, is the final pressure, is the ratio of specific heats, and is the Mach number.
Write the ideal gas equation for one mole of air
Here, is the volume of the air, is the universal gas constant, and is the temperature of the air at a specified altitude.
Since, density is the inverse of volume, the following relation is obtained.
Here, is the density of the air.