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.
In the linear case, where f(u) = Au , and A is a constant,[1]
This linear scheme can be extended to the general non-linear case in different ways. One of them is letting
The conservative form of Lax-Wendroff for a general non-linear equation is then
where is the Jacobian matrix evaluated at .
To avoid the Jacobian evaluation, use a two-step procedure. 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.
First (Lax) steps:
Second step:
Another method of this same type was proposed by MacCormack. MacCormack's method uses first forward differencing and then backward differencing:
First step:
Second step:
Alternatively,
First step:
Second step:
References
^LeVeque, Randy J. Numerical Methods for Conservation Laws", Birkhauser Verlag, 1992, p. 125.
P.D Lax; B. Wendroff (1960). "Systems of conservation laws". Commun. Pure Appl Math. 13 (2): 217–237. doi:10.1002/cpa.3160130205.
Michael J. Thompson, An Introduction to Astrophysical Fluid Dynamics, Imperial College Press, London, 2006.