Solving Quasi-Linear Transport Equation with two shockwaves. I want to solve the following Partial Differential Equation by using the method of characteristics. This is the transport equation.

\begin{align}u_t - (1-2u)u_{x}&=0, &-\infty < x < \infty, t >0, \end{align}
  \begin{align}u(x,0) &= \begin{cases} \frac{1}{4}, & \mbox{for } x<0, \\ \frac{1}{2}, & \mbox{for } 0 < x < 1, \\ 1, & \mbox{for } 1 < x.\end{cases}\end{align}

By using the method of characteristics, we transform the PDE into the following system of ODE's.
\begin{align}
\frac{d t}{d s} &= 1, &t(s=0)=0,  \\
\frac{d x}{d s} &= (1-2u), &x(s=0) = x_0, \\
\frac{d u}{d s} &= 1,  &u(s=0) = u(x_0,0).
\end{align}
If we solve these we get the following expressions:
\begin{align}
t(s) &= s, \\
x(s) &= (1-2u)s+x_0.
\end{align}
Thus using $s=t$ we get $x(t) = (1-2u)t+x_0$.
With this we and the given of $u(x_0,0)$ we can make a drawing in the (x,t)-domain of the characteristics. We note that because of $u(x_0,0)$ having three different values that get higher, we will get 2 shock waves. These shockwaves, $x_{s1}(t),x_{s2}(t)$ can be calculated by using the jump in 'q' (which is the 'velocity') divided by the jump in 'u' (which is the density) and then integrating these over t and using the begin conditions. This gives us $x_{s1}(t)=\frac{1}{2}t$ and $x_{s2}(t)=-\frac{1}{2}t+1$. 
Now my problem comes in. These shockwaves, they intersect. How can I know their behaviour?
Thanks for your time,
K. Kamal
 A: Here, we are dealing with the macroscopic traffic-flow model by Lighthill-Witham-Richards (LWR), where $0≤u≤1$ represents the number of cars per unit length. To get an insight about the problem, here is a plot of the characteristic curves $x(t) = (1-2u(x_0,0))\, t + x_0$ in the $x$-$t$ plane:

As written in OP, two shock waves occur, which speeds are given by the Rankine-Hugoniot condition:
\begin{aligned}
s_1 &= \frac{\frac{1}{2}(1-\frac{1}{2}) - \frac{1}{4}(1-\frac{1}{4})}{\frac{1}{2} - \frac{1}{4}} = \frac{1}{4} \\
s_2 &= \frac{1(1-1) - \frac{1}{2}(1-\frac{1}{2})}{1 - \frac{1}{2}} = -\frac{1}{2}
\end{aligned}
Therefore, the solution for small times $t<t^*$ before the interaction is
$$
u(x,t) = \left\lbrace
\begin{aligned}
 &1/4 && \textstyle \text{if}\quad x < \frac{1}{4}t \\
 &1/2 && \textstyle \text{if}\quad \frac{1}{4}t < x < 1 - \frac{1}{2}t \\
 &1   && \textstyle \text{if}\quad 1 - \frac{1}{2}t < x
\end{aligned}
\right.
$$
The shock waves interact at the time $t^*$ such that $\frac{1}{4}t^* = 1-\frac{1}{2}t^*$, i.e. $t^* = 4/3$. The corresponding abscissa is $x^* = 1/3$ (cf. plot of the characteristics). At the interaction, it is as if we would start with new initial conditions $u(x<x^*,t^*) = 1/4$ and $u(x>x^*,t^*) = 1$ at the time $t^*$. A new shock wave is generated with speed
$$
s_3 = \frac{1(1-1) - \frac{1}{4}(1-\frac{1}{4})}{1 - \frac{1}{4}} = -\frac{1}{4}
$$
Therefore, the solution for $t>t^*$ is
$$
u(x,t) = \left\lbrace
\begin{aligned}
 &1/4 && \textstyle \text{if}\quad x < \frac{1}{3} - \frac{1}{4}(t-\frac{4}{3}) \\
 &1   && \textstyle \text{if}\quad \frac{1}{3} - \frac{1}{4}(t-\frac{4}{3}) < x
\end{aligned}
\right.
$$
