Suppose you had the non-linear transport equation $$u_t+uu_x=0$$ with initial data $$u(x,0)=g(x)=\begin{cases} 1, & x>1 \\-x, & -1\leq x< 0 \\x, & 0\leq x\leq 1\end{cases}$$
Solving the characteristic ODEs, we have that $u(x,t)=f(x-ut)$ where $f$ is some arbitrary $C^1$ function. The classical solution before the shock waves is given by:
$$u(x,t)=\begin{cases} 1, & x-ut>1 \\-x, & -1\leq x-ut< 0 \\ x, & 0\leq x-ut\leq 1\end{cases}$$
which can be rewritten also as:
$$u(x,t)=\begin{cases} 1, & x>1+ut \\-x, & -1+ut\leq x< ut \\ x, & ut\leq x\leq 1+ut\end{cases}$$
for the case $-1\leq x<0$, I believe the solution should be $u(x,t)=\dfrac{-x}{1-t}$, and for $0\leq x\leq 1$, the solution should be $u(x,t)=\dfrac{x}{1+t}$.
Now there is a shock wave at $t=-1$, as $u(x,t)=\dfrac{-x}{1-t}$ for $x\in [-1,0)$ has a singularity at $t=-1$ but no such singularity occurs with $u(x,t)=\dfrac{x}{1+t}$ for $x\in[0,1]$. For $x>1$, do we simply have $u(x,t)=\dfrac{x}{t}$?
This is where I get stuck, and I am unsure how to proceed to get the full solution $u(x,t)$ for small enough $t$.
Assuming I had a solution, it will be piecewise $C^1$, I can use the condition $T_b=\dfrac{-1}{\min_{x}g'(x)}$ on each of the pieces to determine when the shocks occur. However I am not sure how to work out the details or correctly interpret the shock waves in a physical sense.