Weak solution of $u_t+(1-2u)u_x=0$ with $u(x,0)=\frac{1}{4}$ for $x<0$ and $u(x,0)=1$ for $x\geq 0$? We want to find the weak solution  of $\frac{\partial{u}}{\partial{t}}+(1-2u)\frac{\partial{u}}{\partial{x}}=0$ with $u(x,0)=\begin{cases} \mbox{$\frac{1}{4}$} & \mbox{if } x<0 \\ \mbox{1} & \mbox{if $x\geq 0$} \end{cases} $
We have that $ x\in [-L,L]$ and $t\geq 0$.
By using the method of characteristics, I get:
$$u(x,t)=\begin{cases} \mbox{$\frac{1}{4}$} & \mbox{if } x-\frac{1}{2}t<0 \\ \mbox{1} & \mbox{if $x+t\geq 0$} \end{cases} $$
I know that it can be shown that $\int_{-L}^Lu(x,t)dx=\frac{L}{4}+L=\frac{5}{4}L$ for all $ t>0$.
I'm not sure how I would proceed from here? If we let $x_D(t)$ be the position of the discontinuity, we require that:
$\frac{5}{4}L=\int_{-L}^{x_D}u_{-}(x,t)dx+\int_{x_D}^{L}u_{+}(x,t)dx$, however I'm unsure how to determine $u_{-}$ and $u_{+}$? I think this would help to determine the weak solution.
 A: This is the Lighthill-Witham-Richards traffic flow model, for which a Riemann problem is considered. The initial car density equals 25% for $x<0$, and 100% for $x>0$. A plot of the base characteristics shows that they intersect in the vicinity of $x=0$: a shock wave is generated, with expression
$$
u(x,t) = \left\lbrace\begin{aligned}
&\tfrac14 , && x < x_D(t)\\
&1, && x > x_D(t)
\end{aligned}\right. \tag{1}
$$
The position of the discontinuity satisfies the Rankine-Hugoniot condition
$$
\dot x_D(t) = \frac{\tfrac14(1-\tfrac14) - 1(1-1)}{\tfrac14 - 1} = -\frac14
$$
with $x_D(0)=0$, i.e. $x_D(t) = -t/4$ (see also this related post).
A suitable weak solution is the shock wave (1). I regret, but the proposed integral property is obviously wrong. In fact, as the wave propagates towards decreasing $x$, the surface area below the solution curve at fixed time varies, as shown from the balance law
$$
\frac{d}{dt}\int_{-L}^L u\, dx = u(1-u)|_{x=-L} - u(1-u)|_{x=L} =\frac3{16} .
$$
I'm linking to this characterisation of weak solutions for complements.
