I'm trying to construct a solution to the following problem: $u_{t}+uu_{x}=0\\ u(0,x)=-x \mathbb{1}_{[a,b]}$.
For the case when $0<a<b$ I try to find a shock curve starting from point $(t,x)=(0,a)$. I get the curve $s(t)=C\sqrt{t-1}$, but it's not defined when t=0.
$u_{l}=0, u_{r}=\frac{s(t)}{t-1}$, so I get Rankine-Hugenot condition $-\frac{s}{t-1} \frac{ds}{dt}=-\frac{s^2}{2(t-1)^2}$. What am I doing wrong?
Also, for the case $a<0<b$, the area not covered by characteristics are two triangles. I wanted to define a solution on it so it's equal to the solution on all three edges, but I can't come up with a correct one, but I can if I want it to be equal to the solution to the lower and side edge, but I'm not sure if I can do that.
Consider the case $0<a<b$. The Rankine-Hugoniot condition for the shock curve $(t, s(t))$ starting from $(0,a)$ gives $$ \dot{s}(t) = -\frac{1}{2(1-t)} s(t), $$ with $s(0) = a$. Hence we get, for $t\in [0,1)$, $$ s(t) = a\, \exp\left(-\frac{1}{2} \int_0^t \frac{1}{1-s}\, ds\right) = a \, \exp\left(\frac{1}{2} \log(1-t)\right) = a\, \sqrt{1-t}. $$