# Numerical Lax-Wendroff scheme order of convergence on Burgers equation

I was suggested to move that question here.

The question to be as follows.

### Statement of the problem

Is it possible to achieve the second order of convergence (OOC) of Lax-Wendroff (LxW) scheme applied to solve inviscid Burgers equations with discontinuous initial data?

If no, then how to achieve (and prove numerically) OOC of 2nd order (of LxW scheme) in quasilinear problem?

### Wolfram Mathematica code

(*Initial data*)
u0[x_] := 1 - UnitStep[x - 0.1];
Flux[u_] := 0.5 u^2;
u = u0[xTbl];
dt = Abs[\[Sigma]] /Abs[Max[u]] dx;
un = 0*u;
F = Flux[u];

(*LW*)
t = 0;
While[t < tFin,
(*Main loop*)
un[[2 ;; nx - 1]] = u[[2 ;; nx - 1]] -
0.50 \[Sigma] (F[[3 ;; nx]] - F[[1 ;; nx - 2]]) +
0.25 \[Sigma]^2 ((u[[3 ;; nx]] + u[[2 ;; nx - 1]]) (F[[3 ;; nx]] -
F[[2 ;; nx - 1]]) - (u[[2 ;; nx - 1]] +
u[[1 ;; nx - 2]]) (F[[2 ;; nx - 1]] - F[[1 ;; nx - 2]]));
(*BC*)
un[[1]] = u[[1]];
un[[nx]] = u[[nx]];
(*Update*)
u = un;
F = Flux[u];
nstep = nstep + 1;
t = t + dt
];


### Output

nx = {50, 100, 200, 400, 800};
L1err = {0.0217352, 0.0107321, 0.00533915, 0.00207726, 0.00132978};
p = {1.0181, 1.00725, 1.36192, 0.643502}


Average OOC equals

1.00769


## 1 Answer

Probably not. If you have inviscid Burgers equation then your discontinuous initial condition should (somewhere) stay discontinuous because there is no viscosity. If there is discontinuity in the solution then there is Godunov's order barrier theorem which limits your convergence order to 1...

Be careful to use fine enough grid to prove any order of convergence, i.e. when you plot nx-Lerror graph in log-log scale you should get straight line (except for rough discretization). I'm not sure but if there are some problems with L1 norm try L2 or Linfinity norm...

• Got it. Nevertheless, probably it is possible with smooth initial data before discontinuity appearance, for instance? – Oleg Kravchenko Mar 20 '18 at 12:25
• Yes, then you should get full convergence order. – lmalenica Mar 20 '18 at 12:28