Use the method of charasteristics to solve the PDE $u_{t}+u^{2} u_{x}=0$, where is the mistake? Good day!
Problem: solve equation $$u_{t}+u^{2} u_{x}=0$$
$$u(x,0)=\cos x.$$
Solution: Compose equation for characteristic
$$\frac{\,dt}{1}=\frac{\,dx}{u^{2}}=\frac{\,du}{0}.$$
Next, $\,du=0 \cdot \,dt$, $u^{2}\,du=0\cdot \,dx$ 
Then $$u=\text{Const}.$$
But from the initial condition it's not true. Where is the mistake?  
 A: The characteristic equations for the equation $$
a u_t(t,x) + b u_x(t,x) = c 
$$
are the ODE system
\begin{eqnarray}
\frac{dt}{ds}  = a, \quad  t\big|_{s = 0} = t_0,\tag{1} \\
\frac{dx}{ds}  = b, \quad  x\big|_{s = 0} = x_0,\tag{2} \\
\frac{du}{ds}  = c, \quad  u\big|_{s = 0} = u_0.\tag{3} \\
\end{eqnarray}
Now for the equation 
$$
u_t + u^2 u_x = 0,
$$
we have
$$
a = 1, \; b = u^2, \; c = 0.
$$
Letting $t_0 = 0$, (1) implies $ t=s $ . (2) implies $x(s) = x_0 + u^2 s $. (3) implies $u= u_0 = \cos x_0$. Therefore we have:
$$
x  = x_0 + (\cos^2 x_0) t \implies t = \frac{x - x_0}{\cos^2 x_0}.
$$
Now we can restrict $x_0$ in above equation so that $t$ is well-defined, for example $x_0\in (-\pi/2,\pi/2)$. From above we know that:
$$
u = \cos x_0 = \cos(x  - u^2 t)\implies tu^2 + \arccos u = x . \tag{$\star$}
$$
Unfortunately we can't solve for an explicit expression for $u(x,t)$, so leaving your answer as the implicit form like $(\star)$ is okay. You can use implicit differentiation to check its validity (I just checked it satisfies the original pde).
