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)$?
