is a constant called the adiabatic index.
The equation should make intuitive sense. The density is a measure of how heavy the gas is, and heavy things oscillate slower. The pressure is a measure of how stiff the gas is, and stiff things oscillate faster.
Now let's consider the effect of temperature. When you're heating the gas you need to decide if you're going to keep the volume constant and let the pressure rise, or keep the pressure constant and let the volume rise, or something in between. Let's consider the possibilities.
Suppose we keep the volume constant, in which case the pressure will rise as we heat the gas. That means in equation (1) Pincreases while ρ stays constant, so the speed of the sound goes up. The speed of sound is increasing because we're effectively making the gas stiffer.
Now suppose we keep the pressure constant and let the gas expand as it's heated. That means in equation (1) ρρdecreases while P stays constant and again the speed of sound increases. The speed of sound is increasing because we're making the gas lighter so it oscillates faster.
And if we take a middle course and let the pressure and the volume increase then Pincreases and ρ decreases and again the speed of sound goes up.
So whatever we do, increasing the temperature increases the speed of sound, but it does it in different ways depending on how we let the gas expand as it's heated.
Just as a footnote, an ideal gas obeys the equation of state:
where η
is the number of moles of the gas. The (molar) density ρ is just the number of moles per unit volume, ρ=n/V, which means n=ρV. If we substitute for nin equation (2) we get:
PV=ρVRTwhich rearranges to:
P/ρ=RTSubstitute this into equation (1) and we get:
v=√γRTso:
v∝√Twhich is where we came in.
Since molecular vibration is very less in case of liquids and solids therefore temperature dependence is more noticeable in a gas rather than in a solid or a liquid