Suppose one has an equation of the following form:
where x and t are independent variables, and the initial state, u(x, 0) is given.
Linear case
In the linear case, where f(u) = Au, and A is a constant,[2]
Here refers to the dimension and refers to the dimension.
This linear scheme can be extended to the general non-linear case in different ways. One of them is letting
Non-linear case
The conservative form of Lax-Wendroff for a general non-linear equation is then:
where is the Jacobian matrix evaluated at .
Jacobian free methods
To avoid the Jacobian evaluation, use a two-step procedure.
Richtmyer method
What follows is the Richtmyer two-step Lax–Wendroff method. The first step in the Richtmyer two-step Lax–Wendroff method calculates values for f(u(x, t)) at half time steps, tn + 1/2 and half grid points, xi + 1/2. In the second step values at tn + 1 are calculated using the data for tn and tn + 1/2.
Michael J. Thompson, An Introduction to Astrophysical Fluid Dynamics, Imperial College Press, London, 2006.
Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007). "Section 20.1. Flux Conservative Initial Value Problems". Numerical Recipes: The Art of Scientific Computing (3rd ed.). New York: Cambridge University Press. p. 1040.