Acoustical wave equation from Hamilton's principle It is common to show the features and power of the Hamilton's principle by deriving the equation of vibrating string, membrane etc. using this principle. But I have never seen that used for deriving the (aero-)acoustical wave equation. Could you provide this derivation?
Edit:
I. e. equation for acoustic pressure $p$ or velocity potential  $\Phi$ in d'Alembert's form:
$$
\nabla^2 \Phi - \frac{1}{c_0^2}\partial_{tt} \Phi = 0
$$
 A: It's actually not that complicated for a linear case. Let's derive the 1D wave equation for velocity potential $\Phi$ ($v = \partial_x \Phi$). As usual, $c_0$ denotes the speed of sound.
The kinetic energy density is obviously
$$
\mathcal{T} = \frac{1}{2}\rho_0\mathcal{v}^2 =  \frac{1}{2}\rho_0\left(\frac{\partial \Phi}{\partial x}\right)^2
$$
Potential energy is derived using work done during changing a test volume using acoustic pressure $p$ (assuming adiabatic behavior). Quantitatively for its density:
$$
\mathcal{V} = \frac{1}{2}\frac{\rho_0}{c_0^2}p^2 = \frac{1}{2}\frac{\rho_0}{c_0^2}\left(\frac{\partial \Phi}{\partial t}\right)^2
$$
Hence the lagrangian:
$$
\mathcal{L} = \frac{1}{2}\rho_0\left(\frac{\partial \Phi}{\partial x}\right)^2 - \frac{1}{2}\frac{\rho_0}{c_0^2}\left(\frac{\partial \Phi}{\partial t}\right)^2
$$
The appropriate Euler-Lagrange equation for minimizing the action integral is:
$$
\frac{\partial \mathcal{L}}{\partial \Phi} = \frac{\mathrm{d}}{\mathrm{d}x}\frac{\partial \mathcal{L}}{\partial (\partial_x \Phi)} + \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial \mathcal{L}}{\partial (\partial_t \Phi)}
$$
Therefore:
$$
0 = \partial_{xx}\Phi - \frac{1}{c_0^2}\partial_{tt}\Phi
$$
Generalization to 3D case is obvious.
