Suppose that \(\rho (x,t)\) is the number density of cars per unit length along a road, \(x\) being the
distance along the road such that \[ \frac {\partial \rho }{\partial t} +\frac {\partial [\rho (1-\rho )]}{\partial x}=0. \]
Show that \(\rho \) is constant along characteristics \[ \frac {dx}{dt}=1-2\rho , \] and derive the following
Rankine-Hugoniot conditions for the speed of a shock \(x=S(t)\): \[ \frac {dS}{dt}=\frac {[\rho (1-\rho )]_-^+}{[\rho ]_-^+}. \]
A queue is building up at traffic light \(x=1\) so that, when the light turns to
green at \(t=0\), \[ \rho (x,0)= \begin {cases} 0, & \text {if }x<0\text { and }x>1;\\ x, & \text {if }0<x<1. \end {cases} \] Solve the characteristic equations, and sketch the resulting
characteristic curves. Deduce that a collision first occurs at \(x=1/2\) when \(t=1/2\), and
that thereafter there is a shock such that \[ \frac {dS}{dt}=\frac {S+t+1}{2t}. \]