Solve the quasilinear initial value problem by the method of characteristics. I am trying to solve 
$u_{t}+uu_{x}=0, \quad x\in\mathbb{R},\quad t>0$ 
with the initial values
$u(x,0)=
\begin{cases}
1-x^2,  & |x| \leq 1 \\
0, & |x| > 1
\end{cases}$
I also need to sketch the characteristic diagram and find the breaking time $t_b$.
I have tried searching on the internet and using my notes to find a solution, however, I always end up confused and without a solution.
This is what (little) I have done so far:
$\frac{dX(t)}{dt}=u(X(t),t) \quad$ -$\quad$ I think I am trying to get this in the form of an ODE so that I can solve simply.
This is where different sources go in different directions.  Some then differentiate $u(X(t),t)$ and seem to get back to the original PDE and some go on and make it equal to the initial conditions and I cannot figure out what the correct method is, or what the underlying principles are.
 A: Let $U(t) = u(X(t),t)$. Then
$$ \dot{U}(t) = u_t(X(t),t) + \dot{X}(t)u_x(X(t),t) $$
Hence, if we set $\dot{X}(t) = u(X(t),t) = U(t)$, then $\dot{U}(t) = u_t(X(t),t) + u(X(t),t)u_x(X(t),t) = 0$. The set of equations are thus
\begin{align*} \dot{X}(t) &= U(t) \\
\dot{U}(t) &= 0
\end{align*}
Suppose we tried to solve the above equations with $X(t) = x$. The two equations imply that $U(t) = U(0)$ and $X(t) = X(0) + \int\limits_{0}^{t}{\dot{X}(t)\text{ d}t} = X(0) +\int\limits_{0}^{t}{U(t)\text{ d}t} = X(0) + U(0)t$. Thus, we want to find $X(0)$ such that
$$ x = X(0) + u(X(0),0)t. \tag{1}$$
If $|x|>1$, then we can obviously choose $X(0) = x$, in which case $U(t) = U(0) = u(x,0) = 0$. If $|x|\le 1$, then we want to find $|X(0)|\le 1$ such that
$$ x = X(0) + t(1-X(0)^2).$$
Now, for $t<\frac{1}{2}$, the mapping $y\mapsto y + t(1-y^2)$ has derivative $y\mapsto 1-2ty$, which is positive on $[-1,1]$, so $y\mapsto y+t(1-y^2)$ is invertible on $[-1,1]$ (and, by checking the endpoints, we see that it maps $[-1,1]$ onto $[-1,1]$). This means that for each $|x|\le 1$ there is a unique $|X(0)|\le 1$ such that $x = X(0) + t(1-X(0)^2)$. (The explicit solution is given by the quadratic formula, but I think this is the easiest way to show that we can solve the equation in the way we want.)
As such, the method of characteristics is valid for $t<\frac{1}{2}$, and it is not hard to show that (1) does not have a unique solution $|X(0)|\le 1$ for $|x|\le 1$ if $t>\frac{1}{2}$, i.e. the method of characteristics fails for $t>\frac{1}{2}$.
A: This is the inviscid Burgers' equation. Below is a plot of the characteristic curves deduced from the method of characteristics with the proposed initial data:

Graphically, one observes that the characteristics intersect at $x\approx 1$, $t\approx 0.5$, where a shock wave is generated. Let us denote the initial data by $\phi(x) = u(x,0)$. The graphical observation is consistent with the expression of the breaking time
$$
t_B = \frac{-1}{\inf \phi'(x)} = \frac{1}{2} \, ,
$$
where $\phi'$ is the derivative of $\phi$.
Up to the breaking time $t_B$, we can apply the method of characteristics:


*

*$\frac{\text d}{\text d s}t = 1$, letting $t|_{s=0} = 0$, we know $t = s$.

*$\frac{\text d}{\text d s}x = u$ and $\frac{\text d}{\text d s}u = 0$, letting $(x,u)|_{s=0} = (x_0,u_0)$ with $u_0 = \phi(x_0)$, we know $(x,u) = (u_0 t + x_0,u_0)$.


The solution deduced from characteristics is sometimes written implicitly using $u = u_0$ and $x_0 = x - u_0 t$ as $u = \phi(x - u t)$.
In the regions where $\phi=0$, the method of characteristics gives $u=0$ and $|x|\geqslant 1$. Elsewhere, the method of characteristics gives $u=1-(x-ut)^2$ and $|x-ut|< 1$. Hence, for $t< t_B$,
$$
u(x,t) = 
\left\lbrace
\begin{aligned}
&0 & &\text{if}\quad |x|>1 ,\\
&\frac{2 t x - 1 + \sqrt{4 t^2 - 4 t x + 1}}{2 t^2} & &\text{otherwise} .
\end{aligned}
\right.
$$
The data on the left of the shock comes from $x_0\in [-1,1]$, while the data on the right of the shock is zero. Thus, the shock trajectory $x_s(t)$ satisfies the Rankine-Hugoniot condition
$$
x_s'(t) = \frac{1}{2} \left(\frac{2 t x_s(t) - 1 + \sqrt{4 t^2 - 4 t x_s(t) + 1}}{2 t^2} + 0\right)
$$
for $t\geqslant t_B$, with breaking position $x_s(1/2) = 1$. Using the Taylor series approximation $x_s'(t) \simeq (t - \frac{1}{2})\, t^{-2}$ at $x_s\simeq 1$, the approximation $x_s(t) \simeq (2t)^{-1} + \ln (2t)$ is obtained. The solution for $t\geqslant t_B$ reads
$$
u(x,t) = 
\left\lbrace
\begin{aligned}
&0 & &\text{if}\quad x< {-1} \quad\text{or}\quad x_s(t)<x ,\\
&\frac{2 t x - 1 + \sqrt{4 t^2 - 4 t x + 1}}{2 t^2} & &\text{otherwise} .
\end{aligned}
\right.
$$
