[solution]
**Step 1: Characteristics for $0 < t < 1$.**
The characteristic through $(x_0, 0)$ is $x = x_0 + f'(u_0(x_0)) t = x_0 + u_0(x_0) t$. For $x_0 < 0$: $x = x_0 + t$ (speed $1$). For $0 \leq x_0 \leq 1$: $x = x_0 + (1 - x_0) t$. For $x_0 > 1$: $x = x_0$ (speed $0$).
The characteristics from $[0, 1]$ are $x = x_0(1 - t) + t$. Two characteristics from $x_0$ and $x_0'$ (with $x_0 < x_0'$) meet when $x_0(1-t) + t = x_0'(1-t) + t$, i.e., $(x_0 - x_0')(1-t) = 0$. Since $x_0 \neq x_0'$, they meet at $t = 1$. At $t = 1$, all characteristics from $[0, 1]$ converge to the point $x = 1$.
**Step 2: Solution before shock formation ($0 < t < 1$).**
For $x < t$: the characteristic from $x_0 = x - t < 0$ carries $u = 1$.
For $t \leq x \leq 1$: the characteristic $x = x_0(1-t) + t$ gives $x_0 = (x - t)/(1 - t)$, so $u = 1 - x_0 = 1 - (x-t)/(1-t) = (1 - x)/(1 - t)$.
For $x > 1$: no characteristics from the decreasing region reach here yet, so $u = 0$.
The solution is:
\begin{align*}
u(x, t) = \begin{cases} 1 & \text{if } x < t, \\ \frac{1 - x}{1 - t} & \text{if } t \leq x \leq 1, \\ 0 & \text{if } x > 1, \end{cases} \quad \text{for } 0 < t < 1.
\end{align*}
As $t \to 1^-$, the middle region collapses to a single point $x = 1$ and $u$ develops a jump from $1$ to $0$.
**Step 3: Shock speed for $t > 1$.**
At $t = 1$, a shock forms at $x = 1$ with $u_L = 1$ and $u_R = 0$. By the [Rankine-Hugoniot condition](/theorems/578):
\begin{align*}
\sigma = \frac{f(u_L) - f(u_R)}{u_L - u_R} = \frac{1/2 - 0}{1 - 0} = \frac{1}{2}.
\end{align*}
Check the [Lax entropy condition](/theorems/578): $f'(u_L) = 1 > 1/2 > 0 = f'(u_R)$. The shock is admissible.
**Step 4: Solution for $t > 1$.**
The shock starts at $(1, 1)$ and travels at speed $\sigma = 1/2$. Behind it, $u = 1$ (carried by characteristics from $x_0 < 0$ at speed $1$, which overtake the shock). Ahead of it, $u = 0$. The shock position is $x_s(t) = 1 + (t - 1)/2 = (t + 1)/2$.
\begin{align*}
u(x, t) = \begin{cases} 1 & \text{if } x < \frac{t+1}{2}, \\ 0 & \text{if } x > \frac{t+1}{2}, \end{cases} \quad \text{for } t > 1.
\end{align*}
**Step 5: Verification of mass conservation.** The total mass $\int u \, d\mathcal{L}^1$ at $t = 0$ is $\int_{-\infty}^0 1 \, dx$ (infinite), so we check conservation of the "finite part" instead. The mass in $[0, \infty)$ at $t = 0$ is $\int_0^1 (1 - x) \, dx = 1/2$. At $t > 1$, the mass in $[0, \infty)$ ahead of the characteristics from $x_0 = 0$ (which arrive at $x = t$) is the mass between $x = t$ and $x = (t+1)/2$: this is $1 \cdot (t - (t+1)/2) = (t-1)/2$... actually, since all the characteristics from $(-\infty, 0)$ carry $u = 1$, the finite mass carried by the ramp $u_0$ on $[0,1]$ has been absorbed into the shock. The shock absorbs mass from the ramp at exactly the rate needed to sustain its speed — a consistency check on Rankine-Hugoniot.
[/solution]