# Local speed of sound in a perfect gas

I have some doubts regarding the derivation of the formula for the local speed of sound in a perfect gas. I am going to use the related wikipedia page as a blueprint to expose my doubts.

We can show that the value of the local speed of sound $$c$$ is:

$$c = \sqrt{\left(\frac{\partial P}{\partial \rho}\right)_S} \tag{1}$$

My first problem regards this subscript $$S$$: this means of course that we are taking the derivative assuming that entropy is constant1, the process is isoentropic, does this mean that the process is also adiabatic? I think that the answer to this must be yes, my reasoning is quite simple: since we know, from the second law of thermodynamics, that: $$dQ=TdS$$ $$dS=0$$ must mean that $$dQ=0$$. Is my reasoning correct? But since, going forward, we mostly care about the fact that the process is adiabatic, why don't we simply write:

$$c = \sqrt{\left(\frac{\partial P}{\partial \rho}\right)_Q}$$

am I missing something?

My second problem is: I would prefer to write the local speed of sound explicitly and in terms of the temperature $$T$$ of the gas, the Boltzmann's constant and the mass of the particle of the perfect gas.2 I know that this is possible in some way. To achive this re-writing of (1) I was thinking of using the two main information about our system: the fact that we are dealing with a perfect gas, and the fact that the process is adiabatic; so seems a good idea to use: $$PV=nRT \tag{2}$$ the equation of state of the perfect gas and $$P=K\rho ^\gamma \tag{3}$$ the pressure equation for an adiabatic transformation, where $$\gamma$$ is the ratio of the specific heats and $$K$$ si some unknown constant, if I understand correctly. But if I try to apply (3) to (1) I get:

$$c=\sqrt{K\gamma \rho ^{\gamma -1}}$$

and then I am stuck! I don't know how to proceed. In some lecture notes I have found it is written that applying (3) to (1) should lead to:

$$\left(\frac{\partial P}{\partial \rho}\right)_S=\gamma \frac{P_0}{\rho _0} \tag{4}$$ where $$P_0$$ and $$\rho _0$$ are some initial values for $$P$$ and $$\rho$$, and the ratio I think is supposed to be constant, but I don't get why.

Anyway: I don't know how to get from (1) to the end result, that according to wikipedia should be:

$$c=\sqrt{\frac{\gamma k_B T}{m}} \tag{5}$$

where $$m$$ is the mass of a single perfect gas molecule.

TL;DR: How can I get (5) from (1)?

: This is reasonable since, if I understand correctly, the pressure wave travels fast enough to assume that no relevant exchange of heat can occur.

: Essentially I want to write $$c$$ in terms of the mean thermal energy $$k_BT$$, or if you prefer in terms of the thermal kinetic energy.

Some problems come down to algebra. In your equation after (3), multiply and divide by $$\rho$$ (under the square root), combine the $$\rho$$ in numerator, then substitute P for $$K\rho^\gamma$$. That gives $$\gamma P/\rho$$.
Ideal gas law is $$P=\rho R_g T$$ where $$R_g$$ is the gas constant for the gas, e.g., R=8.314 J/K mol, 1 mole of air is about .o29 kg, so $$R_g=8.314/.029 = 287. J/kg K$$.
$$c= \sqrt{\gamma R_g T}$$
I'll leave it to you to relate Boltzman constant and $$R$$ (universal gas constant) and $$R_g$$.