Why $e$ in the formula for air density? I am reading a book that says that the density of air is approximately $D = 1.25  e^{(-0.0001h)}$, where h is the height in meters.  Why is Euler's number $e$ used here?  Was a differential equation used in deriving this formula?
 A: You can rearrange the terms to have any constant as the base of the exponent:
$D = 1.25 e^{(-0.0001h)}$
$= 1.25 (e^{0.0001})^{-h}$
$= 1.25 (2^{\frac{0.0001}{ln 2}})^{-h}$
$\approx 1.25 (2^{0.00014})^{-h}$
$= 1.25 \times 2^{(-0.00014h)}$
A: Euler's constant appears naturally in phenomena where the spatial gradient of a quantity (or rate of change with time) is proportional to the quantity itself: $$\frac{\mathrm{d}X}{\mathrm{d}x} = X/x_0$$  ($x_0$ determines the strength of the proportionality, and keeps units straight.)
The solution of this differential equation is $$X=X_o e^{x/x_0}$$  $X_0$ sets the "vertical" scale: it's the value of $X$ at $x=0$. Air density turns out to behave this way. If you want more detail, you should amend the question, or start a new question!
A: It's actually a surprisingly straightforward differential equation. If you assume that the acceleration due to gravity $g$ doesn't change with altitude (a good approximation if the atmosphere is thin compared to the radius of the earth), Bernoulli's relation tells you the change in the pressure $P$ with height $h$:
$$ \frac{dP}{dh} = -\rho g$$ 
Meanwhile the pressure and the density are also related by the ideal gas law
$$ PV = NRT $$
or
$$ P = \rho \frac{RT}{M} $$
where $M$ is the mass of one mole of the gas. If you're willing to neglect the changes in temperature $T$ and mean molar mass $M$, you can differentiate with respect to height and find
\begin{align}
\frac{dP}{dh} = \frac{d\rho}{dh} \frac{RT}M &= -\rho g \\
\frac{d\rho}{dh} &= -\rho \frac{gM}{RT} = -\frac{\rho}{h_0}
\end{align}
This is the classic differential equation for an exponential.
If I use nice round numbers $R=8\,\mathrm{\frac{J}{mol\cdot K}}$, $T=300\,\mathrm K$, $M=30\,\mathrm{g/mol}$, $g=10\,\mathrm{m/s^2}$, I get a scale height of 8000 meters, different from your textbook's approximation of $10^4$ meters by about 20%.
