PDE method of characteristics $u_t+u^2u_x=0$ with $u(x,0)=x$ I'm confused on how to include the $u^2$ expression in the solution process
$$u_t +u^2u_x=0,\quad  u(x,0)=x$$
where $u_t$ and $u_x$ denote the partial of u with respect to those variables
I'm actually unsure how to go about this as in our PDE class we haven't mentioned functions that contain the function $u$ 
 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^2=u_0^2$ , letting $x(0)=f(u_0)$ , we have $x=u_0^2s+f(u_0)=u^2t+f(u)$ , i.e. $u=F(x-u^2t)$
$u(x,0)=x$ :
$F(x)=x$
$\therefore u=x-u^2t$
$tu^2+u-x=0$
$u(x,t)=\begin{cases}x&\text{when}~t=0\\\dfrac{-1\pm\sqrt{4xt+1}}{2t}&\text{when}~t\neq0\end{cases}$
A: $$u_t+u^2ux=0$$
System of characteristic ODEs :
$$\frac{dt}{1}=\frac{dx}{u^2}=\frac{du}{0}=ds$$
A first characteristic equation comes from $du=0$ :
$$u=c_1$$
A second characteristic equation comes from $\frac{dt}{1}=\frac{dx}{c_1^2}\quad\implies\quad x-c_1t=c_2$ :
$$x-u^2t=c_2$$
General solution of the PDE expressed on the form of implicit equation $c_1=F(c_2)$ :
$$u=F(x-u^2t)$$
where F is an arbitrary function to be determined according to the initial condition.
Condition : $u(x,0)=x=F(x-x^2(0))=F(x)$ . So the function is determined :
$$F(X)=X$$
we put this function into the above general solution where $X=x-u^2t$ :
$$u=x-u^2t$$
$u^2 t+u-x=0$ solved for u gives $ \quad u=\frac{-1\pm\sqrt{1+4xt}}{2t}$
This must be consistent with the condition $u(x,0)=x$.
For $t\to 0\qquad \sqrt{1+4xt}\simeq\left(1+2xt+O(x^2)\right)\quad;\quad u(x,t)$ which is equivalent to $u\simeq \frac{-1\pm (1+2xt)}{2t}$ must tend to $u=x$. This determines the sign because 
$\frac{-1+ (1+2xt)}{2t}=\frac{2xt}{2t}=x\quad$and $\quad\frac{-1- (1+2xt}{2t}=\frac{2xt}{2t}=\frac{2}{t}-x\to\infty$ is excluded.
The unique solution is :
$$\boxed{u(x,t)=\frac{-1+\sqrt{1+4xt}}{2t}}$$
