at each cell interface, at the expense of adding artificial viscosity.
Illustration for a Linear Problem
Consider a one-dimensional, linear hyperbolic partial differential equation for of the form:
on the domain
with initial condition
and the boundary conditions
If one discretizes the domain to a grid with equally spaced points with a spacing of in the -direction and in the -direction, we introduce an approximation of
where
are integers representing the number of grid intervals. Then the Lax–Friedrichs method to approximate the partial differential equation is given by:
Or, rewriting this to solve for the unknown
Where the initial values and boundary nodes are taken from
Extensions to Nonlinear Problems
A nonlinear hyperbolic conservation law is defined through a flux function :
In the case of , we end up with a scalar linear problem. Note that in general, is a vector with equations in it.
The generalization of the Lax-Friedrichs method to nonlinear systems takes the form[1]
This method is conservative and first order accurate, hence quite dissipative. It can, however be used as a building block for building high-order numerical schemes for solving hyperbolic partial differential equations, much like Euler time steps can be used as a building block for creating high-order numerical integrators for ordinary differential equations.
We note that this method can be written in conservation form:
where
Without the extra terms and in the discrete flux, , one ends up with the FTCS scheme, which is well known to be unconditionally unstable for hyperbolic problems.
Stability and accuracy
Example problem initial condition Lax-Friedrichs solution
This method is
first order accurate in space
( provided are sufficiently-smooth functions. Under these conditions, the method is stable if and only if the following condition is satisfied:
(A
discontinuities, the scheme displays strong dissipation and dispersion;[3]
Press, William H; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 20.1.2. Lax Method", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New York: Cambridge University Press,