So, let's start looking at the first jump in the initial conditions. Here we left $1$ on the left side and $2$ on the right. As we are looking for an entropy solution and these can only jump down across shocks, we have a rarefaction wave here. At $x=1$ we have a shock (as $2 > 0$) with speed given by Rankine-Hugeniot as $\frac 12 (2+0) = 1$. So for small $t$ we have
$$
u(x,t) = \begin{cases} 1 & x \le t\\ \frac xt & t < x < 2t\\ 2 & 2t \le x < 1+t \\ 0 & x \ge 1+t\end{cases} \quad \quad (0 \le t \le 1)
$$
The next time something interesting happends is when the charateristic with speed 2 starting at 0, hits the shock. That is when $t+1 = 2t$, i. e. $t=1$. Now the shock is built from characteristics of the rarefaction fan, let's denote the shock curve by $s$, we have $s(1) = 2$, and by the jump condition
$$ s'(t) = \frac 12 \cdot \frac{s(t)}t $$
The solution of this ode is $s(t) = 2\sqrt t$, that is we have for the next part
$$
u(x,t) = \begin{cases} 1 & x \le t \\ \frac xt & t < x < 2\sqrt t \\ 0 & x \ge 2\sqrt t \end{cases} \quad\quad (1 \le t \le 4)
$$
Then next interesting time is when the first speed 1 characteristic hits the speed 0 characteristics, that is when $2\sqrt t = t \iff t = 4$ (as $t\ge 0$). After that the shock travels with speed $\frac 12(1+ 0) = \frac 12$, that is we have
$$ u(x,t) = \begin{cases} 1 & x \le 2 +\frac 12t \\ 0 & x> 2 + \frac 12t
\end{cases} \quad \quad (t \ge 4).
$$
I will be using method of characteristics (which is described in Wikipedia article for Burger's euqation in detail).
Writing down the equation:
$$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}=0$$
This has the form of a full time derivative for some function:
$$\frac{du}{dt}=\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x} \frac{dx}{dt}$$
Which gives us the following system of ODEs:
$$\frac{du}{dt}=0 \\ \frac{dx}{dt}=u$$
The solutions have the form:
$$u=u_0 \\ x=x_0+u_0 t$$
This seems surprising, but actually this means that for any $x$:
$$u \left(x+u(x,0)t,t \right)=u(x,0) \tag{1}$$
Now we want to get an explicit solution using our initial conditions.
- First, consider the simple case $|x|>1$, which means $u(x,0)=0$:
$$u(x,t)=u(x,0)=0 \tag{2}$$
- Now, the case $|x| \leq 1$, which means $u(x,0)=1-x^2$:
Let's make a substitution:
$$x+(1-x^2)t=y$$
We need to find $x(y,t)$ now to substitute on the right hand side of $(1)$:
$$t x^2-x+y-t=0$$
$$x=\frac{1}{2t} (1 \pm \sqrt{1+4t(t-y)})$$
Which makes our solution in this range to be:
$$u(y,t)=1-\frac{1}{4t^2} (1 \pm \sqrt{1+4t(t-y)})^2$$
Or, simply renaming the variable again, we have:
$$u(x,t)=1-\frac{1}{4t^2} (1 \pm \sqrt{1+4t(t-x)})^2 \tag{3}$$
You can directly check (by taking the derivatives) that the original equation is satisfied by this function.
If we want the limit at $t \to 0$ to exist, we need to choose the "$-$" sign in (3).
One thing we need to account for is the range $|x| \leq 1$ which separates the first solution from the second one. Not sure if we just can set the same condition on $y$ or not.
Let's consider the condition on $x$:
$$\left| \frac{1}{2t} (1 - \sqrt{1+4t(t-y)}) \right| \leq 1$$
Assume $t>0$:
$$\left| 1 - \sqrt{1+4t(t-y)} \right| \leq 2t$$
The solution is quite interesting:
$$-1 \leq y \leq 1, \qquad t \leq \frac12$$
$$-1 \leq y \leq \frac{4t^2+1}{4t}, \qquad t > \frac12$$
The latter case contradicts the initial condition on $x$ which we used to get our first, zero solution.
When plotting the solution in Mathematica for different times we see a 'crashing wave', which initially, doesn't go beyond $x=1$.
However, for larger times, it does go beyond the initial boundary:
Best Answer
The peak at height $u=1$ travels with speed equal to $1$, so you should have $u(x,t)=1$ when $x=t$, and since the inviscid Burgers equation has the property that a piecewise linear wave profile stays piecewise linear (as can be seen by looking at the characteristic curves), the wave profile $u(x,t)$ for a fixed $t \in (0,1)$ (before shock formation) is simply given by connecting the point $(x,u)=(-1,0)$ with a straight line to $(x,u)=(t,1)$, and from there to $(x,u)=(1,0)$ with a straight line. (And $u=0$ outside the interval $-1<x<1$, of course.)