# Sketch solution of IVP for nonconvex scalar conservation law

Compute explicitly the unique entropy solution of $$u_t+(\frac{u^3}{3})_x=0$$ in $$\mathbb R\times(0,\infty)$$, subject to

$$$$u(x,0)= \begin{cases} 0 &;x\le0\\ 2 &;0

Here the flux $$u\mapsto u^3/3$$ is nonconvex. How to sketch a diagram of the solution? By applying Rankine-Hugoniot?

Here, the initial data is made of two discontinuities; one at $$x=0$$, the other one at $$x=2$$. A sketch of the characteristic curves in the $$x$$-$$t$$ plane is deduced from the method of characteristics:
The intersection of these curves is observed, which tells that shock waves are possibly generated, and that the method of characteristics cannot be used where this happens. We start by solving the two Riemann problems at $$x= 0$$ and $$x=2$$. Here, the flux $$f: u\mapsto \frac{1}{3}u^3$$ is nonconvex. Hence, the Lax entropy condition for shock waves must be replaced by the Oleinik entropy condition. In addition to shock waves and rarefaction waves, the solution can be made of semi-shocks (a.k.a. compound/composite waves). Despite these differences, the full treatment is similar to the case of Burgers' equation (in this post and this post). In particular, the Rankine-Hugoniot condition which provides the speed of shocks is still valid.
Using the Riemann solution, we find that a rarefaction wave is generated at $$x=0$$ and that a shock wave is generated at $$x=2$$. For small times, u(x,t) = \left\lbrace \begin{aligned} &0 & &\text{if}\quad x<0 \quad\text{or}\quad 2+\tfrac{4}{3}t The rarefaction wave catches up with the shock at the time $$t^*$$ such that $$4t^* = 2+\tfrac{4}{3}t^*$$, i.e. $$t^* = 3/4$$. The position $$x_s$$ of the shock resulting from this interaction is given by the Rankine-Hugoniot condition $$x'_s(t) = x_s(t)/(3 t)$$ with initial position $$x_s(3/4)=3$$. Thus, the resolution of this D'Alembert differential equation provides the entropy solution for larger times $$t>t^*$$: u(x,t) = \left\lbrace \begin{aligned} &0 & &\text{if}\quad x<0 \quad\text{ or }\quad \sqrt[3]{36\, t}