Finding shock curves, Burgers equation I'm working on this problem:
$u_{t}+uu_{x}=0\\
u(0,x)=-x \mathbb{1}_{[a,b]}$.
For the case when $a<b=0$ I want to find a shock curve starting from point $(t,x)=(1,0)$. On the field without characteristics I defined the solution to be $u(t,x)=\frac{x-a}{t}$. 
I'm confused which values to use for the left and right value of $u$ in Rankine-Hugenot condition. 
This is an example of characteristics' plot for $a=-3$:

 A: Let's check your proposition. The method of characteristics gives $u = f(x-ut)$ where $f$ denotes the initial data $x\mapsto -x \, \Bbb I_{[a,0]}(x)$, i.e. for small times
$$
u(x,t) = \left\lbrace\begin{aligned}
&\tfrac{x-a}{t}, && \text{if}\quad a<x<a(1-t),\\
&\tfrac{-x}{1-t},&& \text{if}\quad a(1-t)<x<0,\\
&0, &&\text{elsewhere}.
\end{aligned}\right.
$$
The characteristic curves which collapse at $(x,t) = (0,1)$ must be stopped there. Beyond $(0,1)$, the position of the shock wave $x_s(t)$ is deduced from the Rankine-Hugoniot condition, with the data $\frac{x_s-a}{t}$ coming from the rarefaction wave on the left, and the null value coming from $x>0$ on the right. Hence, the location of the shock is given by the D'Alembert differential equation
$$
\dot x_s (t) = \frac {1}{2}\left (\frac {x_s (t) -a}{t} +0 \right) ,
$$
with the initial condition $x_s (1)=0$. In other words,
$$
x_s (t) = a \left(1 - \sqrt{t}\right) .
$$
The entropy weak solution for larger times $t\geq 1$ reads
$$
u(x,t) = \left\lbrace\begin{aligned}
&\tfrac{x-a}{t}, && \text{if}\quad a<x<a \left(1 - \sqrt{t}\right) ,\\
&0, &&\text{elsewhere}.
\end{aligned}\right.
$$
