Shock formation in traffic flow equation Consider the PDE initial value problem
$$\frac{\partial u}{\partial t}+(1-2u)\frac{\partial u}{\partial x}=0,$$
$$u(x,0)=f(x),$$ with the initial conditions for traffic congestion:
$$f(x)=\begin{cases}
\frac{1}{3} & \text{if }\left|x\right|\ge 1\\
\frac{1}{2}\left( \frac{5}{3}-\left| x \right| \right) &\text{if } \left|x\right|\le 1\\
\end{cases}$$
This equation can be solved by the method of characteristics to obtain $$u(x,t)=f(x)+f(x-t(1+2u))$$
Now to find the time $t_s$ and position $x_s$ of the initial shock formation, we can do the following:
$$u(x,t) = f(x)+f(\tau)$$
$$x=(1-2f(\tau))t+\tau$$
$$u_x(x,t) = f'(x) + f'(\tau)\tau_x$$
$$1=-2tf'(\tau)\tau_x+\tau_x=\tau_x(1-2tf'(\tau))$$
$$\tau_x=\frac{1}{1-2tf'(\tau)}$$
$$u_x = f'(x)+\frac{f'(\tau)}{1-2tf'(\tau)}$$
Now to find the time and position of the initial shock formation, we need
$$t_s=\min_\tau\left( -\frac{1}{f'(\tau)} \right)$$
But the question is: how do we find $f(\tau)$?
 A: The general solution of the PDE is :
$$u(x,t)=F(x-t(1-2u))$$
where $F$ is any differentiable function. 
Do not confuse $F$ with $f$ appearing in the initial condition :
$$f(x)=\begin{cases}
\frac{1}{3} & \text{if }\left|x\right|\ge 1\\
\frac{1}{2}\left( \frac{5}{3}-\left| x \right| \right) &\text{if } \left|x\right|\le 1\\
\end{cases}$$
The initial condition is : $u(x,0)=F(x)=f(x)$ which determines $F$ as :
$$F(X)=\begin{cases}
\frac{1}{3} & \text{if }\left|X\right|\ge 1\\
\frac{1}{2}\left( \frac{5}{3}-\left| X \right| \right) &\text{if } \left|X\right|\le 1\\
\end{cases}$$
In the particular solution fitting to the initial condition, $X\neq x$ but $X=x-t(1-2u)$
$$u(x,t)=\begin{cases}
\frac{1}{3} & \text{if }\left|x-t(1-2u)\right|\ge 1\\
\frac{1}{2}\left( \frac{5}{3}-\left| x-t(1-2u) \right| \right) &\text{if } \left|x-t(1-2u)\right|\le 1\\
\end{cases}$$
You see that it is very different from the cases $|x|\ge 1$ and $|x|\le 1$ because $u$ is involved into them.
A: This is a sketch of the characteristic curves $x(t) = (1-2f(x_0))t+x_0$ in the $x$-$t$ plane:

Characteristics seem to intersect at $t=1$. This can be recovered via the expression of the breaking time
\begin{aligned}
t_s &= \frac{-1}{\min\, (1-2f)'(x)} \\
&= \frac{1/2}{\max f'(x)} \\
&= 1 \, .
\end{aligned}
N.B. : this is the LWR traffic flow model.
