Inviscid Burgers equation — multivalued wave

I'm quite new to Wolfram Mathematica. I need to create an animation of a Burgers Hopf equation's solution which becomes multivalued (somewhat of a breaking wave). Is it possible to do so in Mathematica?

All I seem to obtain is a very sharp series of oscillations which I assume are a numerical correction by the software.

Any help will be appreciated.

NDSolve[
{D[u[x, t], t] + 1/2 D[u[x, t]^2, x] == 0,
u[x, 0] == Sech[x]^2, u[-5, t] == u[5, t]},
u[x, t], {x, -5, 5}, {t, 0, 5}]

• There are examples of plots, even dynamic with Manipulate, on NDSolve documentation page. Have you seen them? – Kuba Aug 6 '18 at 12:41
• i have seen them but nothing seems to create the animation i need, which is a c- shaped wave – ddot Aug 6 '18 at 12:54
• I don't think you can get c-shaped wave, nor wiki page shows them. But you create a steep one with your solution. – Kuba Aug 6 '18 at 12:58
• What do you mean by c-shaped wave? Can you be more specific? – xzczd Aug 6 '18 at 13:04
• i mean an animation of a gaussian like wave in which the upper portion goes faster tham the lower one, so it creates sort of a breaking wave, but kuba confirmed my suspects, it's probably not possible to obtain in Mathematica – ddot Aug 6 '18 at 13:12

I don't think NDSolve is the right tool for the task, because it can only solve for single-valued functions. (Well, is there any mathematical software that can deal with multi-valued functions natively? ) Fortunately, your goal is just creating an animation for the multi-valued solution, then we can simply refer to the analytic solution of this problem:
Animate[ParametricPlot[{t f[ξ] + ξ, f[ξ]}, {ξ, -5, 5},
`