Inviscid Burgers' equation with sinusoidal initial data

I have a question about the following Burgers' equation.

$u_t + (\frac12u^2)_x = 0 $ with $u(x,0) = \sin(x)$ on $[0,2\pi]$ and periodic boundary conditions.

When I studied this equation numerically, I notice that once the shock forms, the shock stays still in the same place, yet the magnitude of the function decreases as time passes. That is, the initial function $\sin(x)$ ranges from $-1$ to $1$, but as time passes, the magnitude of the maximum and minimum of the function decays.

Is this what is supposed to happen analytically?


The method of characteristics gives $u=f(x-ut)$ where $f(x) = \sin(x)$ represents the initial data $u(x,0)$. This implicit equation can be used to approach the solution, until a shock wave is met by the characteristics. Here is a sketch of the characteristics in the $x$-$t$ plane:

characteristic curves

As shown in this post, the shock is formed when characteristics intersect for the first time, i.e. at the breaking position and time \begin{aligned} x_B &= \arg \min f'(x) = (2n+1)\pi , \qquad (n\in \Bbb{Z})\\ t_B &= \frac{-1}{\min f'(x)} =1 \end{aligned} as shown in the figure. Setting $v=-u$, one notes the relationship $$ v(x_B - x, t) = \sin \left[x - v(x_B - x, t)\, t\right] $$ which proves the symmetry property $u(x_B - x, t) = -u(x, t)$.

By solving the implicit equation $u = f(x-ut)$, the method of characteristics yields the values $u_L$, $u_R$ of $u$ on the left and the right of the shock. The position $(x_s(t), t)$ of the shock wave is given by the Rankine-Hugoniot condition $$x'_s(t) = \tfrac{1}{2} (u_L+u_R)$$ with initial position $x_s(t_B) = x_B$. Therefore, using symmetry $u_L = -u_R$, the shock wave remains at the same place (static shock). Its magnitude $u_L$ increases and then vanishes in time, as shown in the figure below, where $u_L$ --obtained numerically-- is plotted with respect to $t$:

shock magnitude


No, analytically that is not what happens. The equation in your question is discussed in Miller's Applied Asymptotic Analysis, and I quote from the middle of p. 78:

Once shocks form, there is no longer a global unique solution of the nonlinear initial-value problem.

It turns out that it's possible to modify the equation in such a way that the shocks are stable (though still move as time progresses, if I recall correctly) by adding a diffusion term. I definitely recommend reading section 3.6 of Miller's book.