# Lax-Wendroff and Godunov schemes for $u_t + (u^4)_x = 0$

Consider the nonlinear conservation law $$u_t + (u^4)_x = 0$$ Write the following schemes for the equation in the form $$u_j^{n+1} = F(u_{j-1}^{n},u_{j}^{n},u_{j+1}^{n})$$.

Im trying to do for Lax-Wendroff and Godunov method.

Since this is advection, we know $$u(x-a \Delta t, t^n) = u(x,t^{n+1})$$. So I was thinking to interpolate the points $$(x_{i}, u_i)$$ at n-level for $$i=j-1,j,j+1$$ so as to obtain a quadratic and then using the above we may write a three-point stencil as asked. But, I don't really quite understand how to for Godunov. Any advice would be greatly appreciated.

The present conservation law $$u_t + f(u)_x = 0$$ is nonlinear, with a convex flux $$f(u)=u^4$$. The derivative of the flux is $$f'(u)=4u^3$$, and the only solution of $$f'(u_s) = 0$$ is $$u_s=0$$. The Lax-Wendroff method is well-described in the Wikipedia article. The method can be written in conservation form $$u_{j}^{n+1} = u_{j}^n - \frac{\Delta t}{\Delta x} (F_{j+1/2}^n - F_{j-1/2}^n)$$ with the numerical flux $$F_{j+1/2}^n = \frac{1}{2} \left({f(u_j^n) + f(u_{j+1}^n)}\right) - \frac12 \frac{\Delta t}{\Delta x} A_{j+1/2} \left(f(u_{j+1}^n)-f(u_{j}^n)\right)$$ where $$A_{j+ 1/2}=f'\big(\tfrac12(u_{j}^n + u_{j+ 1}^n)\big)$$, which is of the desired form. Godunov's method is usually written in conservation form too, with the numerical flux (see (1) p. 228) F_{j+1/2}^n = \left\lbrace \begin{aligned} &f(u_j^n) & &\text{if}\quad u_j^n > u_s \;\text{and}\; s_{j+1/2} > 0 ,\\ &f(u_{j+1}^n) & &\text{if}\quad u_{j+1}^n < u_s\;\text{and}\; s_{j+1/2} < 0 ,\\ &f(u_s) & &\text{if}\quad u_{j}^n < u_s < u_{j+1}^n , \end{aligned}\right. where $$s_{j+1/2} = [{f(u_{j+1}^n) - f(u_j^n)}]/[{u_{j+1}^n - u_{j}^n}]$$, which is also of the desired form.