Recall idea gas law: $pV= NkT$ where $p$ equals pressure, V volume, N moles of atoms, k boltzmann's constant, T temperature. Also, density: $\rho = m/V = \mu N/N_A V$ where $\mu$ is average mole mass and $N_A$ is Avogadro's number. Use these equations to show that as we go up in the atmosphere, pressure is given by: $$p = p_o e^{ \frac{ \mu g h }{N_A k T}}$$
I'm pretty lost here. I tried checking out some wikipedia articles but I don't get how $e$ ever appears while deriving this formula!
The basic idea is to consider a volume element of unit transverse area and vertical extent $dh$. Gravity exerts a downward force on the volume of $g \rho V=g \rho 1^2 dh$. This needs to be balanced by an upward force, and the only one available is more pressure on the bottom than on the top. So $p(h)1^2=p(h + dh)1^2+g\rho 1^2 dh, \frac {dp}{dh}(h)=-g\rho(h)$ The ideal gas law now says $\rho \propto p$ so you get a differential equation $\frac {dp}{dh}=-kp$ with solution $p=c e^{-kh}$. That is where the $e$ comes from.