How is refractive index related to the density of a medium (for example, air)? I have a question regarding refractive index dependency on the density of a dielectric, specifically air.
Background
Let us start from Newton's second law form of driven harmonic oscillators $$-kx-bv+F_e=ma.$$
Knowing that $F_e=eE$ the equation may be rewritten as $$m\frac{\mathrm{d}^2x}{\mathrm{d}t^2}+b\frac{\mathrm{d}{x}}{\mathrm{d}t}+kx=eE.$$
The relevant solution is given by $$x(t)=\frac{eE}{\sqrt{(-m\omega^2+k)^2+(2b\omega)^2}}\cos({\omega}t+\phi)$$
Assume a dielectric material. Let incoming light be monochromatic. In this case, I have shown that refractive index $n$ is dependant on the frequency $\omega$ via
$$n=\sqrt{\mu+\frac{e^2}{m}\frac{n_c}{\epsilon_0}\frac{\mu}{\sqrt{(\omega_0^2-\omega^2)^2+(2\beta\omega)^2}}\cos({\omega}t+\phi)}$$
where $\omega_0=\sqrt{\frac{k}{m}}$, $\beta\equiv\frac{b}{2m}$, and $n_c$ is the number of charge dipoles per unit volume.
Question
The next step is to show that refractive index varies as density changes. Intuitively, the dipole concentration $n_c$ is related to the density of a material. Any further than that, I am clueless.


*

*How is refractive index related to the density of the medium, e.g., density of air? Please give a short, simple derivation if possible.

*When we have the equation from question (1), am I allowed to make ideal gas substitution in order to directly derive how the refractive index depends on air temperature? In other words, I would like to substitute density $\rho$ for $\frac{MP}{RT}$.
Extra
I have glanced over the following links:


*

*http://www.kayelaby.npl.co.uk/general_physics/2_5/2_5_7.html,

*http://www.rug.nl/research/portal/files/2706779/2008LNEEHoenders.pdf.
Nevertheless, these seem not to be exactly what I am looking for.
 A: You have to account for the local fields and how they change as the density changes.  Look up the  Clausius–Mossotti Equation and its derivation.
A: So, per JQK's suggestion, I began from the equation $\text(a)$
$$\frac{\frac{n^2}{\mu}-1}{\frac{n^2}{\mu}+2}=\frac{1}{3\epsilon_0}\frac{N}{V}\alpha$$
where $N$ is the number of gas particles, and $\alpha$ is molecular polarizability. From the ideal gas law $$PV=zRT$$ it follows that $\frac{N}{V}=\frac{N_A\rho}{M}$. Thus $$\frac{\frac{n^2}{\mu}-1}{\frac{n^2}{\mu}+2}=\frac{1}{3\epsilon_0}\frac{N_A\rho}{M}\alpha.$$
Algebraic manipulation yields $\text{(b)}$ $$n=\sqrt{\frac{\mu(1+2G)}{1-G}}$$ where $$G=\frac{1}{3\epsilon_0}\frac{N_A\rho}{M}\alpha.$$
Is this $\text{(b)}$ correct? Also, if someone could further explain the derivation of $\text{(a)}$, it would be helpful. Thanks!
Edit
This research (http://arxiv.org/pdf/0907.0782v1.pdf) suggests an alternative formula. Namely $$n\approx1+\frac{{P\alpha'}}{2k_BT}.$$ Notice that I redefined $\gamma_{mol}$ as $\alpha'$. Now since $\frac{P}{k_BT}=\frac{N}{V}=\frac{N_A\rho}{M}$, we can rewrite $$n\approx1+\frac{N_A\rho}{2M}\alpha'.\text{ eqn. (c)}$$
If we evaluate our own $\text{(b)}$ by a order one Maclaurin series expansion (take $\mu\approx1$), we reach $$n\approx1+\frac{3}{2}G.$$ Plugging in $G$ gives $\text{(d)}$ $$n\approx1+\frac{N_A\rho}{2M\epsilon_0}\alpha.$$ Discrepancy between $\text{(c)}$ and $\text{(d)}$ 
This is a result of different definitions of the dipole moment $p$. Our formula assumes $p=\alpha E$ whereas the research defines $p=\epsilon_0\alpha'E$. It follows that $$\alpha=\epsilon_0\alpha'.$$ Substition into $\text{(d)}$ is sufficient to show that $\text{(c)}=\text{(d)}$; the equations are equivalent. Furthermore, according to the study, the formula is compatible with experiments.
