== Derivation ==The hydrostatic equation::formula_10where formula_11 is the density [kg/m3], is used to generate the equation for hydrostatic equilibrium, written in differential form::formula_12This is combined with the ideal gas law::formula_13to eliminate formula_14::formula_15This is integrated from formula_16 to formula_17::formula_18R and g are constant with z, so they can be brought outside the integral.