Quasilinear equation $u_t = uu_x$ I am not quite sure how to deal with discrete IVP

Find self-similar solution
\begin{equation}
u_t=u u_x\qquad -\infty &lt;x &lt;\infty,\ t&gt;0
\end{equation}

satisfying initial conditions

\begin{equation}
u|_{t=0}=\left \{\begin{aligned}
-1&amp; &amp;x\le 0,\\
1&amp; &amp;x&gt; 0
\end{aligned}\right.
\end{equation}

Here is my attempt

Characteristic equation: 
\begin{align}
\frac{dt}{1} &amp;=\ \frac{dx}{-u} = \frac{du}{0}\\
\frac{du}{dt}&amp;=\ 0 \implies u=f(C)\\
\frac{dx}{dt} &amp;=\ -u = -f(C)\\
x &amp;=\ C - tf(C)\\
\end{align}

Impose boundary condition: $t=0$ and $x = C$,
\begin{align}
u &amp;=\ f(C) = u|_{t=0}=\left\{\begin{aligned}
-1&amp; &amp;x\le 0,\\
1&amp; &amp;x&gt; 0
\end{aligned}\right.
\end{align}
\begin{align}
x = C+t \left\{\begin{aligned}
-1&amp; &amp;x\le 0,\\
1&amp; &amp;x&gt; 0
\end{aligned}\right.
\end{align}
Where the characteristic lines are never across each other
This is a Riemann problem for the PDE $u_t - u u_x = 0$, which cannot be solved by applying the method of characteristics alone: weak solutions must be considered. This PDE becomes equal to the inviscid Burgers' equation $v_t + vv_y = 0$ under the transformation $y := -x$. The initial data transforms as $v(y,0) = 1$ if $y &lt; 0$ and $v(y,0) = -1$ if $y \geq 0$. The Lax entropy conditions states that the solution is a shock wave, which speed $s = \frac{1}{2} (1 -1) = 0$ is given by the Rankine-Hugoniot condition. Finally, a stationary shock solution is obtained:
$$
u(x,t) = v(-x,t) = \left\lbrace
\begin{aligned}
&amp;{-1} &amp;&amp; \text{if}\quad x\leq 0\\
&amp;1 &amp;&amp; \text{if}\quad x&gt; 0
\end{aligned}\right.
$$
Follow the method in http://en.wikipedia.org/wiki/Method_of_characteristics#Example:

$\dfrac{dt}{ds}=1$ , letting $t(0)=0$ , we have $t=s$

$\dfrac{du}{ds}=0$ , letting $u(0)=u_0$ , we have $u=u_0$

$\dfrac{dx}{ds}=-u=-u_0$ , letting $x(0)=f(u_0)$ , we have $x=f(u_0)-u_0s=f(u)-ut$ , i.e. $u=F(x+ut)$

$u(x,0)=\begin{cases}-1&amp;\text{when}~x\leq0\\1&amp;\text{when}~x&gt;0\end{cases}$ :

$\therefore u=\begin{cases}-1&amp;\text{when}~x+ut\leq0\\1&amp;\text{when}~x+ut&gt;0\end{cases}=\begin{cases}-1&amp;\text{when}~x-t\leq0\\1&amp;\text{when}~x+t&gt;0\end{cases}$

Hence $u(x,t)=\begin{cases}-1&amp;\text{when}~x\leq t\\1&amp;\text{when}~x&gt;-t\\c&amp;\text{otherwise}\end{cases}$