# numerical scheme's conservation over time

Consider a conservative scheme $$u_{j}^{n+1}=u_{j}^{n}-\frac{\Delta t}{\Delta x}\left[g\left(u_{j+\frac{1}{2}}^{L}, u_{j+\frac{1}{2}}^{R}\right)-g\left(u_{j-\frac{1}{2}}^{L}, u_{j-\frac{1}{2}}^{R}\right)\right]$$ for solving the initial value problem $$u_{t}+f(u)_{x}=0$$ where $$g(,)$$ is a numerical flux function. How can we show that the total $$u(x, t)$$ of the numerical solution is conserved over time.

• You want to show that $\sum_j u_j^{n+1} = \sum_j u_j^{n}$ so sum the equation over $j=1,2,\ldots,n$ and see what you get. Most terms will cancel (telescoping). For the remaining terms: boundary conditions. – Winther May 6 at 16:54