Riemann problem - Are two shocks possible? Given the hyperbolic conservation law
\begin{align*}
u_t + f(u)_x = 0, \; x \in \mathbb{R}, t > 0 \\
u(x,0) = u_0(x), \; x \in \mathbb{R}
\end{align*}
with $f : \mathbb{R} \to \mathbb{R}$, $f''(u) > 0$ for all
$u \in \mathbb{R}$ and the initial condition
\begin{equation}
u_0(x) = \begin{cases}
u_l &,  x < 0 \\
u_r &, x \geq 0
\end{cases}
\end{equation}
for $u_l, u_r \in \mathbb{R}$. Is it possible
that there exist's a weak solution $u$ which is piecewise constant  and has exactly two shocks?
So far what I got is:
Assume $u \in L_{loc}(\mathbb{R} \times \mathbb{R}^+)$ is a weak
solution of the riemann problem with two shocks $\psi_1$ and $\psi_2$. Since
$u$ has two shocks, it has 2 formations of discontinuity and therefore under
the assumption that $u$ is piecewise constant
\begin{equation}
u(x,t) = \begin{cases}
u_l &, x < at  \\
u^* &, at \leq x \leq bt \\
u_r &, x > bt
\end{cases}
\end{equation}
for some $a,b \in \mathbb{R}$ with $b > a$. Now $u$ is a weak solution of the hyperbolic conservation law if
\begin{equation}
\int^{\infty}_{0}{\int_{\mathbb{R}}{u \Phi_t + f(u) \Phi_x dx dt}} = -\int_{\mathbb{R}}{u_0(x) \Phi(x,0) dx} \mbox{ for all } \Phi \in C^1_0(\mathbb{R}^2).
\end{equation}
By partial integration I got
\begin{align}
\int^{\infty}_{0}{\int_{\mathbb{R}}{u \Phi_t dx dt}} = &-\int_{\mathbb{R}}{u(x,0) \Phi(x,0) dx} \\
&- a(u_l - u^*)\int^{\infty}_{0}{\Phi(at, t) dt} \\
&- b(u^* - u_r)\int^{\infty}_{0}{\Phi(bt, t) dt}
\end{align}
and
\begin{equation}
\int^{\infty}_{0}{\int_{\mathbb{R}}{f(u) \Phi_x dx dt}} = \Big(f(u_l) - f(u^*)\Big) \int^{\infty}_{0}{\Phi(at, t) dt} + \Big(f(u^*) - f(u_r) \Big)\int^{\infty}_{0}{\Phi(bt, t) dt}.
\end{equation}
Now if $\psi_1'(t) = \frac{f(u_l) - f(u^*)}{u_l - u^*}$ and
$\psi_2'(t) = \frac{f(u^*) - f(u_r)}{u^* - u_r}$ are the shock velocities
there can be exactly two shocks and $u$ is a piecewise constant weak solution of the
riemann problem. I am not sure if this is right.I read that there cannot be exactly two shocks for a piecewise constant function, but I can't see why.
 A: What you are observing is one of the core difficulties of balance / conservation laws: The loss of uniqueness through weak solutions. This is why you have to examine your solution whether it fulfills entropy conditions, which exclude some solutions while permitting others.
In your case for a strictly convex flux $f''(u) > 0$, however, you cannot have two shocks. For a more general $f$, it is possible. I argue below why that is.
By the method of characteristics, we look for a curve $x(t)$ along which the solution of the PDE stays constant:
\begin{align} \frac{\mathrm d}{\mathrm dt} u\big(x(t), t \big) &\overset{!}{=}0 \\
\overset{\text{Chain rule}}{\Rightarrow}\partial_t u + \big(\partial_x u\big) x'(t) &\overset{!}{=}0 \end{align}
Now compare this to your PDE $\Big($under the assumption that $f = f(u) \neq f(x) \Big)$:
$$\partial_u + f(u)_x = \partial_u + f'(u)u_x \overset{!}{=}0$$
Thus, the ODE for the characteristic reads:
$$ x'(t) = f'(u) = f'\Big(u\big(x(t), t\big) \Big)$$
The assumption that $u$ stays constant along characteristics $x(t)$ implies now that $u\big(x(t), t \big)$ is exactly the same as at the initial time $t = t_0 = 0$:
$$u\big(x(t), t \big) = u\big(x(0), 0\big) = u_0\big(x(0)\big).$$
As a consequence, the ODE for the characteristic is trivial:
\begin{align} x'(t) &= f'\Big(u_0\big(x(0)\big) \Big) = \text{const}  \\
\Rightarrow x(t) &= f'\Big(u_0\big(x(0) \big) \Big) \cdot t + x(0)\end{align}
Consquently, you have exactly two types of characterists: One with $x(0) < 0$ have slope $f'(u_L)$ and the other starting at $x(0) > 0$ with slope $f'(u_R)$.
Now, if $u_L > u_R$, you have a single shock with speed given by the Rankine-Hugoniot condition. In the opposite case, $u_R > u_L$ the entropy conditions dictate a rarefaction solution:
$$u(x, t) = \begin{cases} u_L & x \leq f'(u_L) t \\
[f']^{-1}(x / t) & f'(u_L) t < x < f'(u_R) \\
u_R & x \geq f'(u_R) \end{cases} $$
Note how the strictly convex flux $f''(u) > 0 \: \forall \: u \: \in \mathbb{R}$ ensures that $f'(u) $ is monotonically increasing, thus invertible.
In the case of a non strictly convex / concave flux, you have to get your hands dirty and find a way to "join" the states $u_L, u_R$ in an entropy-admissible way. Then you can also have two shocks with a rarefaction in between, see for instance this notes, page 27.
