How to write a general wave equation as an hyperbolic system? As title, given a general wave equation problem:
$$\frac{\partial^2u}{\partial t^2} = a^2 \frac{\partial^2 u}{\partial x^2}+f(x,t)$$
with Dirichlet or Neumann boundary conditions and initial value $u(x,0)=g(x)$ how can I transform this problem in an hyperbolic system like
$$
\frac{\partial \bf{c}}{\partial t}=\bf{A} \frac{\partial \bf{c} }{\partial x} +\bf{f}(x,t)
$$
where $\bf{c}$ and $\bf{f}$ are vectors of two functions?
 A: First, we write the equality of mixed derivatives
$$
(u_x)_t = (u_t)_x \, .
$$
Second, we rewrite the wave equation as
$$
(u_t)_t = a^2 (u_x)_x + f \, .
$$
Therefore, setting ${\bf c} = (u_x, u_t)^\top$ and ${\bf f} = (0, f)^\top$, we have ${\bf c}_t = {\bf A} {\bf c}_x + {\bf f}$, where
$$
{\bf A} =
\left(
\begin{array}{cc}
0 & 1 \\
a^2 & 0
\end{array}
\right) .
$$
For Dirichlet boundary conditions $u(x_0,t) = \alpha$, we set $u_t(x_0,t) = 0$. Neumann boundary conditions $u_x(x_0,t) = \beta$ are unchanged. The initial value $u(x,0)=g(x)$ is accounted for by setting $u_x(x,0)=g'(x)$.
Let us diagonalize ${\bf A}$ as follows:
$$
{\bf A} =
\underbrace{
\left(
\begin{array}{cc}
-1/a & 1/a \\
1 & 1
\end{array}
\right)
}_{\bf P}\;
\underbrace{
\left(
\begin{array}{cc}
-a & 0 \\
0 & a
\end{array}
\right)
}_{\bf \Lambda}\;
\underbrace{
\frac{1}{2}
\left(
\begin{array}{cc}
-a & 1 \\
a & 1
\end{array}
\right)
}_{{\bf P}^{-1}}
.
$$
Now, setting ${\bf d} = {\bf P}^{-1}{\bf c}$ and ${\bf h} = {\bf P}^{-1}{\bf f}$, one has ${\bf d}_t = {\bf \Lambda} {\bf d}_x + {\bf h}$.
