Solve first order PDE system I need help with this:

Write $u_{tt} = c^2u_{xx}$, $\quad u(x,0)=f(x)$, $\quad u_t(x,0)=g(x)$
  as an initial value problem for the vector $(u_1, u_2)=(u_t,u_x)$. Reduce the system to the canonical form, $v_t +\Lambda v_x=cv + d$, and solve the problem.
Solve the mixed problem:$\quad u_{tt}-c^2u_{xx}=0, \quad$ for $\quad x>0, t>0$
$\quad\quad\quad\quad\quad\quad\quad\quad\ u(x,0) =f(x), \quad u_t(x,0)=g(x),\quad for \quad x>0$
$\quad\quad\quad\quad\quad\quad\quad\quad\ u_t(0,t) + au_x(0,t)=h(t),\quad t>0$
with $a$ = constant.

I really need help to solve this. I had no idea to how to convert to canonical form. Thanks
 A: We have $(u_t)_t = c^2 (u_x)_x$. Moreover, for $u$ sufficiently smooth, we have $(u_x)_t = (u_t)_x$. Therefore, we can write the first-order system of conservation laws ${\bf u}_t + {\bf A}{\bf u}_x = {\bf 0}$ (see e.g. this post), where ${\bf u} = (u_x,u_t)^\top$ and
\begin{aligned}
{\bf A} &= \left(\begin{array}{cc}0 & -1\\ -c^2 & 0\end{array}\right) \\
&= \left(\begin{array}{cc}1/c & -1/c\\ 1& 1\end{array}\right)\left(\begin{array}{cc}-c & 0\\ 0 & c\end{array}\right) \left(\begin{array}{cc}c/2 & 1/2\\ -c/2 & 1/2\end{array}\right)
= {\bf P}\, {\bf \Lambda}\, {\bf P}^{-1}  .
\end{aligned}
Now, setting ${\bf v} = {\bf P}^{-1} {\bf u}$, one obtains ${\bf v}_t + {\bf \Lambda}{\bf v}_x = {\bf 0}$. The solution to the initial value problem ${\bf v}(x,0) = (v_1^0(x),v_2^0(x))^\top$ is ${\bf v}(x,t) = (v_1^0(x+ct),v_2^0(x-ct))^\top$, where
$$
\left(\begin{array}{c}
v_1^0(\xi) \\
v_2^0(\xi)
\end{array}\right)
=
{\bf P}^{-1} \left(\begin{array}{c}
u_x(0,\xi) \\
u_t(0,\xi)
\end{array}\right)
=
{\bf P}^{-1} \left(\begin{array}{c}
f'(\xi) \\
g(\xi)
\end{array}\right) ,
$$
and $f'$ is the derivative of $f$.
Going back to the initial unknowns, we have ${\bf u}(x,t) = {\bf P}\, {\bf v}(x,t)$, i.e.
\begin{aligned}
u_x(x,t) &= \frac{1}{2}\left(f'(x+ct) + f'(x-ct)\right) + \frac{1}{2c}\left(g(x+ct) - g(x-ct)\right) ,\\
u_t(x,t) &= \frac{1}{2}\left(g(x+ct) + g(x-ct)\right) + \frac{c}{2}\left(f'(x+ct) - f'(x-ct)\right) .
\end{aligned}
Finally, $u$ is obtained by integration of $u_t$ with respect to $t$,
$$
u(x,t) = \frac{1}{2}\left(f(x+ct) + f(x-ct)\right) + \frac{1}{2c} \int_{x-ct}^{x+ct} g(s)\,\text{d}s \, ,
$$
and one recognizes the well-known d'Alembert's formula.
The same method applies to the mixed type problem (see this post where the case $h=0$ is solved). First, it is solved in the characteristic fields where the linear system of conservation laws is diagonal. Then, we go back to the initial unknowns.
A: Frankly the question makes no sense.  This equation is second order in both $x$ and $t$ (it is a "wave equation") so any canonical form must be second order also, not a first order equation.  What we can do is take new variables $p= x- ct$ and $q= x+ ct$.  Then we have $\frac{\partial u}{\partial x}= \frac{\partial u}{\partial p}\frac{\partial p}{\partial x}+ \frac{\partial u}{\partial q}\frac{\partial q}{\partial x}= \frac{\partial u}{\partial p}+ \frac{\partial u}{\partial q}$ since $\frac{\partial p}{\partial x}= \frac{\partial q}{\partial x}= 1$.  Similarly, $\frac{\partial u}{\partial t}$$= \frac{\partial u}{\partial p}\frac{\partial p}{\partial t}+ \frac{\partial u}{\partial q}\frac{\partial q}{\partial t}= -c\frac{\partial u}{\partial p}+ c\frac{\partial u}{\partial q}$.
 Taking the derivatives again, $\frac{\partial^2u}{\partial x^2}= \frac{\partial^2u}{\partial p^2}+ 2\frac{\partial u}{\partial pq}+ \frac{\partial^2 u}{\partial q^2}$ and $\frac{\partial^2 u}{\partial t^2}= c^2\frac{\partial^2 u}{\partial p^2}- 2c^2\frac{\partial^2 u}{\partial pq}+ c^2\frac{\partial^2 u}{\partial q^2}$.
Putting those into $\frac{\partial^2 u}{\partial t^2}= c^2\frac{\partial^2 u}{\partial x^2}$, we have $c^2\frac{\partial^2 u}{\partial p^2}- 2c^2\frac{\partial^2 u}{\partial pq}+ c^2\frac{\partial^2 u}{\partial q^2}= c^2\left(\frac{\partial^2u}{\partial p^2}+ 2\frac{\partial u}{\partial pq}+ \frac{\partial^2 u}{\partial q^2}\right)$ which reduces to $-\frac{\partial^2 u}{\partial pq}= \frac{\partial^2 u}{\partial pq}$ or $4\frac{\partial u}{\partial pq}= 0$.  That last is, of course, the same as $\frac{\partial u}{\partial pq}= 0$ which can then write as $\frac{\partial}{\partial p}\left(\frac{\partial u}{\partial q}\right)= 0$.  The derivative of a function with respect to $p$ is $0$ means the function is constant with respect to $p$- it must be a function of $q$ only- but it could be any function of $q$, say $\frac{\partial u}{\partial q}= f(q)$.  Integrating with respect to $q$, and writing the integral of $f(q)$ with respect to $q$, $F(q)$, we have $u(p, q)= F(q)+ G(p)$ were $G(p)$ is any arbitrary function of $p$ only (it is the "constant of integration" when we are integrating with respect to $q$, just as $f(q)$ was the "constant of integration when we are integrating with respect to $ p$).  That is, the general solution to $\frac{\partial^2 u}{\partial t^2}= c^2\frac{\partial^2 u}{\partial x^2}$ is $u(x, t)= F(x- ct)+ G(x+ ct)$ where $F$ and $G$ can be any twice differentiable functions of a single variable.
Given that $u(x, 0)= f(x)$ we must have $u(x, 0)= F(x)+ G(x)= f(x).$  Given that $u_t(x, 0)= -cF'(x)+ cG'(x)= g(x),$ differentiating that first equation with respect to $x$, $u_x(x, 0)= F'(x)+ G'(x)= f(x)$ so $cF'(x)+ cG'(x)= cf(x)$ and adding the previous equation, $2cG'(x)= cf(x)+ g(x)$.  $G(x)$ is the anti-derivative of $(cf(x)+ g(x))/2$ and then $F(x)= f(x)- G(x)$ there will still be one undetermined numerical constant.
