Is the sound speed and density relation different for compressible and incompressible media? I'm studying "speed of sound in air" and I read that sound speed is inversely proportional to the density of the medium. However, I also know that sound travels fastest in solids, and that solids have highest density. If I'm not wrong (just my assumption), is the sound speed and density relation different for compressible and incompressible mediums? If I'm wrong, please tell me why and the correct answer to this question. Any help would be appreciated.
 A: Conventional (i.e. compressive) sound is actually impossible in completely incompressible media, be they solids or liquids, and you can use the following generic relationship for the speed of sound in continua to demonstrate it:
$$c = \sqrt{\frac{\partial p}{\partial \rho}}$$
where $c$ is the speed of sound, $p$ is the pressure, and $\rho$ is the density.
Note that, in incompressible media, the density never changes—which means that any change in pressure, however big, cannot lead to a change in the density of the continuum. In a very heuristic rough sense, "the speed of sound in incompressible continua is infinite", in the sense that $\frac{\partial \rho}{\partial p} = 0$ and "therefore $\frac{\partial \rho}{\partial p} = \infty$". More accurately, it just means that perturbations in density for generic compressible media propagate faster and faster as the medium becomes more incompressible.
Often, compressibility is quantified directly through a property $\beta$ that is related to the change of pressure with density of a continuous medium:
$$\beta = \frac{1}{\rho}\frac{\partial \rho}{\partial p}$$
As a result, there is a direct connection between the compressibility of a medium and its speed of sound:
$$c = \sqrt{\frac{1}{\rho \beta}}$$
Therefore, the more compressible a material is, the smaller the speed of sound will be. And this tendency holds for any continuous medium.
