1D wave equation as a function of sound speed The 1D wave equation is given by $\frac{\partial ^2 p}{\partial t^2}=c^2 \frac{\partial^2 p}{\partial x^2}$ .
I found in a reference that for an unsteady gas, where both the gas and sound speeds are function of $x,t$, the equation can be written as:
\begin{align*}
&\frac{\partial^2 a\left(x,t\right)}{\partial t^2}+2u\left(x,t\right)\frac{\partial^2 a\left(x,t\right)}{\partial x \partial t}+\left[u^2\left(x,t\right)-a^2\left(x,t\right)\right]\frac{\partial^2 a\left(x,t\right)}{\partial x^2}=0\\
&\frac{\partial^2 u\left(x,t\right)}{\partial t^2}+2u\left(x,t\right)\frac{\partial^2 u\left(x,t\right)}{\partial x \partial t}+\left[u^2\left(x,t\right)-a^2\left(x,t\right)\right]\frac{\partial^2 u\left(x,t\right)}{\partial x^2}=0
\end{align*}
where $a(x,t)$ and $u(x,t)$ are the sound speed and gas speed, respectively.
I can't find any reference with the proof of this last two equations.
Any help will be appreciated.
 A: Let us start with 1D continuity and Euler equations written in terms of $p$ and $u$:
\begin{gather}
\partial_t p + u \partial_x p + \rho a^2 \partial _ x u=0,\\
\partial_t u + u \partial_x u + \frac1\rho \partial _ x p=0.\\
\end{gather}
Here we used an equation $d \rho = a^{-2} d p$, derived from definition of speed of sound.
Dividing the first equation by $\pm \rho a$ and adding it to the first we obtain:
$$
\partial_t u \pm \frac1{\rho a} \partial_t p  + (u \pm a) (\partial_x u \pm \frac1{\rho a}\partial_x p). \tag{1}
$$
Now, for an ideal gas $a^2 = \frac{\gamma p}{\rho}$, so
$$
d a = \frac {\gamma -1}2 \frac { 1}{\rho  a} d p,
$$
and (1) could be thus written as
$$
[\partial _t + (u \pm a) \partial _x ] J_\pm=0, \tag{2}
$$
where $J_+$ and $J_-$ are two Riemann invariants:
$$
J_\pm = u \pm \frac2{\gamma -1} a,
$$
To obtain the second order equation for $a$ and $u$ we act with differential operators
$[\partial _t + (u \mp a) \partial _x ]$ (notice the inverted sign) on equations (2), then adding and subtracting the resulting equations. We thus receive two equations containing 2nd order hyperbolic differential operator from the question, plus a bunch of terms quadratic in the first derivatives, like $(\partial_t u )^2$. Those quadratic terms had to be eliminated using equations (2). 
In the end we finally arrive to equations:
\begin{align*}
&\frac{\partial^2 a}{\partial t^2}+2u\frac{\partial^2 a}{\partial x \partial t}+\left[u^2-a^2\right]\frac{\partial^2 a}{\partial x^2}=0\\
&\frac{\partial^2 u}{\partial t^2}+2u\frac{\partial^2 u}{\partial x \partial t}+\left[u^2-a^2\right]\frac{\partial^2 u}{\partial x^2}=0
\end{align*}
Note, that in this derivation I explicitly used the simplified form of Riemann invariants for an ideal gas. Would the 2-nd order  equations for $u$ and $a$ be valid for the general form equation of state, I do not know. 
