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 <x <\infty,\ t>0
\end{equation}
satisfying initial conditions
\begin{equation}
u|_{t=0}=\left \{\begin{aligned}
-1& &x\le 0,\\
1& &x> 0
\end{aligned}\right.
\end{equation}
Here is my attempt
Characteristic equation: 
\begin{align}
\frac{dt}{1} &=\ \frac{dx}{-u} = \frac{du}{0}\\
\frac{du}{dt}&=\ 0 \implies u=f(C)\\
\frac{dx}{dt} &=\ -u = -f(C)\\
x &=\ C - tf(C)\\
\end{align}
Impose boundary condition: $t=0$ and $x = C$,
\begin{align}
u &=\ f(C) = u|_{t=0}=\left\{\begin{aligned}
-1& &x\le 0,\\
1& &x> 0
\end{aligned}\right.
\end{align}
\begin{align}
x = C+t \left\{\begin{aligned}
-1& &x\le 0,\\
1& &x> 0
\end{aligned}\right.
\end{align}
Where the characteristic lines are never across each other
 A: 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 < 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}
&{-1} && \text{if}\quad x\leq 0\\
&1 && \text{if}\quad x> 0
\end{aligned}\right.
$$
A: 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&\text{when}~x\leq0\\1&\text{when}~x>0\end{cases}$ :
$\therefore u=\begin{cases}-1&\text{when}~x+ut\leq0\\1&\text{when}~x+ut>0\end{cases}=\begin{cases}-1&\text{when}~x-t\leq0\\1&\text{when}~x+t>0\end{cases}$
Hence $u(x,t)=\begin{cases}-1&\text{when}~x\leq t\\1&\text{when}~x>-t\\c&\text{otherwise}\end{cases}$
