# Regarding velocity of P/S-waves

I feel like I am missing something blindingly simple, but I am curious about something.

We are given the velocity of a P-wave as $v_{p} = \sqrt{(K+\frac{4}{3}μ)/ρ}$. So I am to understand conceptually that as density increases, the velocity of the P-wave also increases. However looking at the equation would indicate a lower velocity with increased density. Is it just a matter of the bulk and shear modulus' increasing at a more rapid rate than density as you travel through lower depths?

But here is an example where this is not the case. Imagine you have sandstone between two shales. The sandstone has some porosity and it is completely filled with brine. If that exact same sandstone (i.e. holding everything else constant) is now filled with gas instead of brine, its Bulk modulus will go down by a lot and Density will also go down but by less. However, according to Gassmann's equations, the Shear modulus will stay constant. So the P-wave velocity goes down because the Bulk modulus effect overwhelms the Density effect and the Shear modulus doesn't change. But now consider the S-wave velocity whose equation is $v_s = \sqrt{μ/ρ}$. In this case there is no Bulk modulus to overwhelm the density and so the S-wave velocity will actually go up by a small amount when the rock is saturated with gas. This is purely a density effect. 