So I'm coursing a subject in PDE and the theory for these kind of problems is quite scarce, and I don't seem to find many solved problems online. The problem is stated as follows:
Analyse the following shock-fitting problem. Draw the solution u(x, t) for several times.
\begin{equation} \begin{cases} u_t + uu_x = 0, & t>0, \ \ x\in \mathbb{R} \\ u(x, 0) = \begin{cases} 1, \\ -1, \\ 0, \end{cases} & \begin{aligned} x < 0 \\ 0 < x < 1 \\ x> 1 \end{aligned} \end{cases} \end{equation}
Notation: The equation can be written as $u_t + c(u)u_x = 0$ where $c(u) = u$.
Solution:
Let $\Phi(x) := u(x,0)$. We can rewrite the system as:
\begin{cases} \frac{dX}{dt} = U, & X(0) = \xi \\ \frac{dU}{dt} = 0, & U(0) = \phi(\xi) \end{cases}
From here, we see that
\begin{equation} U(t) = U(0) = \Phi(\xi) = \begin{cases} 1, & \xi < 0 \\ -1, & 0 < \xi < 1 \\ 0, & \xi > 1 \end{cases} \end{equation}
So, it's easy to figure out
\begin{equation} X'(t) = \Phi(\xi) \Rightarrow X(t) = \Phi(\xi)t + \xi = \begin{cases} 2t + \xi, & \xi < 0 \\ -2t + \xi, & 0 < \xi < 1 \\ \xi, & \xi > 1 \end{cases} \end{equation}
Now, the case for $\xi = 0$. We introduce the flux $q$ and identify $q'(u) = c(u) = u$, so $q(u) = \frac{u^2}{2}. We then can find the shock wave
\begin{equation} \frac{ds}{dt} = \frac{[q]}{[u]} = \frac{1}{2} \cdot \frac{1^2-(-1)^2}{1-(-1)} = 0 \Rightarrow s(t) = 0 \end{equation}
For the case $\xi = 1$
\begin{equation} c(u) = c^{-1}(u) = u \Rightarrow u(x,t) = \frac{x-1}{t} \end{equation}
The final solution then would be
\begin{equation} u(x,t) = \begin{cases} 1, & x<0 \\ -1, & 0<x<1 \\ \frac{x-1}{t}, & 1<x<t \\ 0, & x \geq t \end{cases} \end{equation}
I feel very insecure about this answer. If it is indeed right, I'd also appreciate to know why. Thanks in advance.
EDIT: Also, are there any resources where I can learn about this kind of problems?