Consider the initial value problem for the Burgers' equation: \begin{equation} \begin{cases}u_t+uu_x=0\\u(x,0)=\phi(x)\end{cases} \end{equation} where $$\phi(x)= \begin{cases} 2 & \text{if }x\leq0\\ 2-x & \text{if }0\leq x\leq2\\ 0 & \text{if }x \geq 2. \end{cases} $$ Find $u(x,t)$ for all $t > 0$.
Show that the entropy condition is satisfied along the shock curve.
Could someone help me out with this problem. I know that the method of characteristics gives $u=\phi(x-ut)$: $$ u(x,t) = \left\lbrace\begin{aligned} &2 &&\text{if}\quad x\leq 2t\\ &\tfrac{2-x}{1-t} &&\text{if}\quad 2t\leq x \leq 2\\ &0 &&\text{if}\quad x\geq 2 \end{aligned}\right. $$
The solution obtained with the method of characteristics looks correct. One can observe that this solution is only valid for $t< 1$. At $t=1$, all characteristic curves with initial data in $0\leq x\leq 2$ intersect at the abscissa $x=2$. Thus, the method of characteristics breaks down ($t=1$ is called the breaking time). A shock wave is generated with data $u_L=2$ on the left and $u_R=0$ on the right. According to the Rankine-Hugoniot condition, the shock speed is $s=\frac{1}{2}(0+2)=1$. Since $u_L>s>u_R$, the Lax entropy condition is satisfied. Finally, the entropy solution for $t>1$ reads $$ u(x,t) = \left\lbrace\begin{aligned} &2 & &\text{if}\quad x<1+t\\ &0 & &\text{if}\quad x>1+t \end{aligned}\right. $$