The Lax–Friedrichs method, named after Peter Lax and Kurt O. Friedrichs, is a numerical method for the solution of hyperbolic partial differential equations based on finite differences. The method can be described as the FTCS (forward in time, centered in space) scheme with an artificial viscosity term of 1/2.

Illustration

Consider a one-dimensional, linear hyperbolic partial differential equation for \(u(x,t)\) of the form:

\[ u_t + au_x = 0\,\]

on the domain

\[ b \leq x \leq c,\; 0 \leq t \leq d\]

with initial condition

\[u(x,0) = u_0(x)\,\]

and the boundary conditions

\[u(b,t) = u_b(t)\,\] \[u(c,t) = u_c(t).\,\]

If one discretizes the domain \((b, c) \times (0, d)\) to a grid with equally spaced points with a spacing of \(\Delta x\) in the \(x\)-direction and \(\Delta t\) in the \(t\)-direction, we define

\[u_i^j = u(x_i, t_j) \text{ with } x_i = b + i\,\Delta x ,\, t_j = j\,\Delta t \text{ for } i = 0,\ldots,N ,\, j = 0,\ldots,M,\]

where

\[N = \frac{c - b}{\Delta x} ,\, M = \frac{d}{\Delta t}\]

are integers representing the number of grid intervals. Then the Lax–Friedrichs method for solving the above partial differential equation is given by:

\[\frac{u_i^{j+1} - \frac{1}{2}(u_{i+1}^j + u_{i-1}^j)}{\Delta t} + a\frac{u_{i+1}^j - u_{i-1}^j}{2\,\Delta x} = 0\]

Or, rewriting this to solve for the unknown \(u_i^{j+1},\)

\[ u_i^{j+1} = \frac{1}{2}(u_{i+1}^j + u_{i-1}^j) - a\frac{\Delta t}{2\,\Delta x}(u_{i+1}^j - u_{i-1}^j)\,\]

Where the initial values and boundary nodes are taken from

\[u_i^0 = u_0(x_i)\] \[u_0^j = u_b(t_j)\] \[u_N^j = u_c(t_j).\]

Stability and accuracy

File:LF-Initial.png
Example problem initial condition
File:LF-Solution.png
Lax-Friedrichs solution

This method is explicit and first order accurate in time and second order accurate in space provided \(u_0(x),\, u_b(t),\, u_c(t)\) are sufficiently-smooth functions. Under these conditions, the method is stable if and only if the following condition is satisfied:

\[ \left| a\frac{\Delta t}{\Delta x} \right| \leq 1. \]

(A von Neumann stability analysis can show the necessity of this stability condition.) The Lax–Friedrichs method is classified as having second-order dissipation and third order dispersion (Chu 1978, pg. 304). For functions that have discontinuities, the scheme displays strong dissipation and dispersion (Thomas 1995, §7.8); see figures at right.

References


pt:Método de Lax–Friedrichs