# Calculating Air Density Lapse With Altitude (Specifically, pressures)

This might be a bit more of an engineering question, but I'm calculating air density drop-off with altitude, and I'm having some problems calculating the pressure (I'll run through my method). This has been very useful in explaining, but the last bit lost me a little.

$$pV = nRT$$ and using $$\frac{\rho V}{n} = M$$ where M is molar mass, you can calculate density to be:

$$\rho = \frac{pM}{RT}$$ which implies a solution dependent only on pressure (p) and temperature (T).

Then define temperature using the Universal Standard Atmosphere lapse rate, $$T = T_0 - Lh$$ where L = 0.0065K/m and h is height in metres

Now at this point I'm a bit stuck. Wikipedia suggests the following equation:

$$p = p_0 \left(1 - \frac{L h}{T_0} \right)^\frac{g M}{R L}$$

Which, when calculated, provides values within a 5% tolerance - but where has it come from? I can't find any reference to its source or how it was derived. Can anyone help?

-
$$\frac{dP}{P}=\frac{-g\cdot M}{R^*\cdot T}\cdot dZ$$
[Small pointer]: also note that $1-\frac{Lh}{T_0}=\frac{T}{T_0}$ according to your equation for the temperature.