In elasticity, the kinetic energy $T$ and the potential energy $V$ are $$ T(u_t) = \frac{1}{2}\rho{u_t}^2 \qquad\text{and}\qquad V(u_x) = \frac{1}{2} E {u_x}^2 , $$ where $u$ is the displacement, $u_t$ the velocity, and $u_x$ the strain. The symbols $\rho>0$ and $E>0$ denote respectively the mass density and Young's modulus. The corresponding Lagrangian is $\mathcal{L} = T-V$. Using the principle of least action, how do we show that the 1D wave equation $$\rho u_{tt} = E u_{xx}$$ is the corresponding Euler-Lagrange equation?
If this wave equation comes from $\frac{\text d}{\text d t} \frac{\partial \mathcal{L}}{\partial \dot q} = \frac{\partial \mathcal{L}}{\partial q}$, what is $q$? On the left-hand side, one would like $\dot{q} = u_t$, while on the right-hand side, ${q} = u$ gives zero. How to resolve this inconsistency? I am aware of this exercise from Evans, but would like to tackle the particular case of the wave equation in elasticity.