Determining the shock solutions to a PDE. I'm confused by the question below. Particularly, sketching the base characteristics at the discontinuities in $u(x,0)$ and thus finding the shock solutions. Some advice would be appreciated.
Problem

My Attempt
Using the method of characteristics I find that $t=\tau$ as $t(0)=0$, $x=-g(\psi)^2 + \psi$ as $x(0)=\psi$ as $u=g(\psi)$ as $u(0)=\psi$.
So, this means $$x=\begin{cases}-\frac{1}{4}t+\psi & \psi \le 0, \psi \ge 1 \\ -t+\psi & x \lt\psi\lt1 \end{cases}$$
and $$u=\begin{cases}-\frac{1}{2} & \psi \le 0 \\ 1 & \psi \lt\psi\lt1 \\ \frac{1}{2} & \psi \ge 1 \end{cases}$$
Now, when considering the discontinuity in $g(x)$ I get confused. I begin by noticing $-\frac{1}{2} \le g(\psi) \le 1$ at $\psi=0$ and $\frac{1}{2} \le g(\psi) \le 1$ at $\psi=1$, but don't know how to continue from here. In past problems I would determine what would happen and plot a x-t plots of the characteristics to see whether is are any multivalued solutions, etc.
 A: Let $F(p,z,y):=p_2-z^2p_1$, where $p(s)=\nabla u(y(s))$, $z(s)=u(y(s))$, and $y(s)=(x(s),t(s))$ ($s$ is just a parameter).  Note then that $F=0$.  The characteristics of the equation are given by $y(s)$ for various values $s\in\mathbb{R}$.  The Method of Characteristics (see Lawrence C. Evans book on PDES I think chapter 3) tells us that $p$, $z$, and $y$ satisfy the following differential equations:
$$
\begin{cases}
\dot{p} &= -\nabla_yF-F_zp = (2zp_1,2zp_2), \\
\dot{z} &= \nabla_p F\cdot p = (-z^2,1)\cdot(p_1,p_2)=0, \\
\dot{y} &= \nabla_p F = (-z^2,1),
\end{cases}
$$
where $\cdot$ denotes a derivative with respect to $s$ and the characteristics of the equation are given by $y(s)$.  Note that $p$ decouples from the second and third ODE, so we ignore it (since to determine a solution we really only need $z$).  Solving the above gives
$$
\begin{cases}
z(s) &= z_0, \\
y(s) &= (-z_0^2s+x_0,s+t_0), \\
\end{cases}
$$
for some constants $z_0,x_0,t_0$.  The only information we have about the solution lies on the line $\Gamma=\{(x,t)\in\mathbb{R}^2\,:\,t=0\}$. The idea of the method of characteristics is to propagate information given by initial conditions along so called characteristics.  Hence, we would like 
$$
y(0)\in\Gamma,
$$
i.e., $t_0=0$ (since $y(0)=(x_0,t_0)$).  Continuing with the same idea (that $s=0$ somehow corresponds to the initial condition), we would like
$$
z_0=z(0)=u(x_0,0)=\begin{cases}-\frac{1}{2}, \text{ for } x_0\leq 0 \\ 1,\text{ for } 0<x_0<1 \\ \frac{1}{2}, \text{ for }1\leq x_0.\end{cases}
$$
Note then that $y$ parameterizes lines (the characteristics) in the upper half-plane $\mathbb{R}^2=\{(x,t)\,:\,x\in\mathbb{R},t\in\mathbb{R}^+\}$ with $x$-intercept $x_0$ and slope $-1/z_0^2$ (where $z_0$ is given above).
Let $y_1=-z_0^2s+x_0$ and $y_2=s$.  Note the following:
$$
\begin{cases}
&\text{If }x_0\leq 0\text{, then }y_1+\frac{1}{4}y_2\leq 0, \\
&\text{if }0<x_0<1\text{, then }0<y_1+y_2<1,\text{ and } \\
&\text{if }1\leq x_0\text{, then }y_1+\frac{1}{4}y_2\geq 1.
\end{cases}
$$
Thus, the solution to the system is given by
$$
u(y_1,y_2)=\begin{cases}
-\frac{1}{2},&\text{ for }y_1+\frac{1}{4}y_2\leq 0, \\
1,&\text{ for }0<y_1+y_2<1, \\
\frac{1}{2},&\text{ for }y_1+\frac{1}{4}y_2\geq 1.
\end{cases}
$$
Below are plots for $t=0,2,4$.
Time $t=0$:

Time $t=2$:

Time $t=4$:

See the below plot for the shock wave.  Along the red line, characteristics intersect and $u$ takes on two different values.  The line has slope $-2$ (given by the reciprocal of the average of the values $u$ achieves on the intersecting lines) and intersects the origin (since a discontinuity of $g$ occurs here).

