Consider the scalar conservation law,
\[ u_t+\left (\frac 12 u^2\right )_x=0\quad \text {in } \mathbb {R}\times (0,\infty ). \]
Find the entropy satisfying weak solution for the initial data, \[ u(x,0)= \begin {cases} 0, & x<0\text { or }x>1,\\ 1-x, & 0<x<1. \end {cases} \]
Make a drawing of the characteristics in the \((x, t)\)-plane including any shocks and rarefactions.