Find the entropy solution of the following scalar conservation law, arising in traffic flow modeling,
\[ \begin {cases} \partial _t u+\partial _x(u(1-u))=0 & \text {for } x\in \mathbb {R},\ t>0,\\ u(x,0)=g(x) \end {cases} \]
with initial data
\[ g(x)= \begin {cases} 0, & x<-1,\\ 1, & -1<x<0,\\ 0, & 0<x<1,\\ \frac 12, & 1<x. \end {cases} \]
After the rarefaction hits the shock you should write the explicit ODE IVP for the shock location \(\gamma (t)\) and a piecewise definition of the solution using this shock location \(\gamma (t)\), but you don’t actually need to solve the ODE IVP to get the explicit formula for \(\gamma (t)\).