Conservation law and entropy condition problem Consider the scalar conservation quantity:
$u_t+(f(u))_x=0$ with $f(u)=u-u^2$, and initial condition 
$u(x,0)=\begin{cases} c, x<0 \\ 1, 0<x<1 \\ 0, x>1\end{cases}$ 
I want to be able to find characteristic lines and find solutions before and after the formation of shocks. 
Note $f(u)=u-u^2=u(1-u)$, but this function is concave, rather than convex. 
The characteristics are given by $f'(u)=1-2u$, which translates to 
$x'(t)=(1-2u(0))t+x(0)$. Would I get the following?: 
$u(x,t)=\begin{cases}c, 1-2u<0 \\1, 0<1-2u<1 \\0, 2u>0\end{cases}$, which would translate to:
$u(x,t)=\begin{cases} c, u<1/2 \\1, 1/2<u<0 \\2u>0\end{cases}$. 
I know to get a physically admissible solution, I will need to consider two cases, when $0<t<\frac{1}{1-c}$ and then when $t\geq \frac{1}{1-c}$. I know for the latter case, I will need to find some characteristic ODE for the shock wave.  Here is where I get stuck. 
 A: This model corresponds to the macroscopic traffic-flow model by Lighthill-Witham-Richards (LWR), where $0\leq u\leq 1$ represents the number of cars per unit length. A physical interpretation of the problem is that a single road is considered, with the following features:


*

*no car is initially located at $x>1$;

*the road is saturated over $0\leq x\leq 1$, where there is a total traffic jam;

*a given density of cars $c$ is reaching the traffic perturbation from $x<0$.


We can imagine that the cars around $x=1$ are able to start moving forward again, and that the perturbation will propagate backwards (the cars which are arriving will have to slow down).
The theory of scalar conservation laws with concave fluxes is the same as with convex fluxes (characteristics until shock formation, Rankine-Hugoniot, Lax entropy condition). To get an insight about the problem, here is a plot of the characteristic curves $x(t) = f'(u(x_0,0)) t + x_0$ in the $x$-$t$ plane for $c=1/2$:

Characteristics intersect in the vicinity of $x=0$ unless $c=1$, and they spread in the vicinity of $x=1$. A shock is generated around $x=0$, and a rarefaction wave is generated around $x=1$. If $c\neq 1$, the speed of shock $s$ is given by the Rankine-Hugoniot condition $s = \frac{f(1) - f(c)}{1-c} = -c$. The shape of the rarefaction wave is given by $(f')^{-1}(\xi) = \frac{1}{2}(1 - \xi)$, where $\xi$ is the space over time distance ratio. Therefore, for small $t$, the solution is given by
$$
u(x,t) =
\left\lbrace
\begin{aligned}
&c &&\text{if}\quad x< -ct \, ,\\
&1 &&\text{if}\quad {-ct} < x \leq 1-t \, ,\\
&\tfrac{1}{2}\left(1-\tfrac{x-1}{t}\right) &&\text{if}\quad 1-t \leq x \leq 1+t \, ,\\
&0 &&\text{if}\quad 1+t \leq x \, .
\end{aligned}
\right.
$$
Note that this solution is also correct if $c=1$. It is valid until the shock and the rarefaction interact, i.e., until the time $t^* = \frac{1}{1-c}$. From this point, there is no more total traffic jam (the car density $u$ is smaller than one).
The interaction of the shock and the rarefaction is a discontinuity which location $x_s$ is given by the Rankine-Hugoniot condition
$$
x'_s(t) = \frac{f(c) - f\!\left(\tfrac{1}{2}\left(1-\tfrac{x_s(t)-1}{t}\right)\right)}{c - \tfrac{1}{2}\left(1-\tfrac{x_s(t)-1}{t}\right)} \, ,
$$
and the initial condition $x_s(t^*) = -ct^*$:
$$
x_s(t) = 1 + t -2 \left( \sqrt{(1 - c)t} + c t \right) .
$$
The solution for $t\geq t^*$ is given by
$$
u(x,t) =
\left\lbrace
\begin{aligned}
&c &&\text{if}\quad x< x_s(t) \, ,\\
&\tfrac{1}{2}\left(1-\tfrac{x-1}{t}\right) &&\text{if}\quad x_s(t) < x \leq 1+t \, ,\\
&0 &&\text{if}\quad 1+t \leq x \, .
\end{aligned}
\right.
$$
The maximum car density is at the right of shock, and thus equals $\tfrac{1}{2}\left(1-\tfrac{x_s(t)-1}{t}\right) = c + \sqrt{\tfrac{1 - c}{t}}$.
