{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nFix $\\Delta x \u003e 0$ and $\\Delta t \u003e 0$, put $\\lambda = \\Delta t / \\Delta x$, and let $u_j^n$ approximate $u(j \\Delta x, n \\Delta t)$.\n\n1. For the [[transport equation|PVD7VZJZ9B]] $u_t + a u_x = 0$ with $a \\in \\R$ and $\\nu = a \\lambda$, the *Lax–Wendroff method* is the explicit [[finite difference|X7HYEBA5SA]] scheme\n$$u_j^{n+1} = u_j^n - \\frac{\\nu}{2} \\left( u_{j+1}^n - u_{j-1}^n \\right) + \\frac{\\nu^2}{2} \\left( u_{j+1}^n - 2 u_j^n + u_{j-1}^n \\right).$$\n2. For a [[conservation law|8RA7AMWSAF]] $u_t + f(u)_x = 0$ with a smooth flux $f$, its two-step (Richtmyer) form is\n$$u_{j+1/2}^{n+1/2} = \\frac{u_j^n + u_{j+1}^n}{2} - \\frac{\\lambda}{2} \\left( f(u_{j+1}^n) - f(u_j^n) \\right), \\qquad u_j^{n+1} = u_j^n - \\lambda \\left( f(u_{j+1/2}^{n+1/2}) - f(u_{j-1/2}^{n+1/2}) \\right).$$\n\n## Remarks\n\nFor $f(u) = a u$, the two-step form reduces to the scheme of clause 1.\nThe first step is a [[Lax–Friedrichs|VY3J2NKGKW]] step over half a time step on the staggered grid.\nExample: for clause 1, the Fourier mode $e^{i j \\xi}$ is multiplied by $g = 1 - i \\nu \\sin \\xi - \\nu^2 (1 - \\cos \\xi)$, and a short computation gives $\\abs{g}^2 = 1 - 4 \\nu^2 (1 - \\nu^2) \\sin^4 (\\xi / 2)$.\nSo $\\abs{g} \\le 1$ for all $\\xi$ exactly when $\\abs{\\nu} \\le 1$, and the scheme is stable under this condition.\nTaylor expansion shows that the local truncation error is $O(\\Delta x^3)$ for fixed $\\nu$, so the method is second-order accurate.\nNon-example: dropping the last term gives the forward-time centred-space scheme, which is only first order in time and has $\\abs{g}^2 = 1 + \\nu^2 \\sin^2 \\xi \u003e 1$ for $\\sin \\xi \\ne 0$, so it is unstable.\n\n## Explanations\n\n### L1 human\n\nThe scheme is the second-order Taylor step in time, with the time derivatives traded for space derivatives through the equation.\nThe last term adds just enough smoothing to make the centred scheme stable.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "YHZ9BCNDRZ",
    "kind": "definition",
    "msc": [
      "65M06",
      "35L65"
    ],
    "name": "Lax–Wendroff method",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Lax%E2%80%93Wendroff_method"
      }
    ],
    "tag": "J8ZRM7KFJH",
    "uses": [
      "PVD7VZJZ9B",
      "X7HYEBA5SA",
      "8RA7AMWSAF",
      "VY3J2NKGKW"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/J8ZRM7KFJH/",
  "links": [
    {
      "field": "defines",
      "target": "YHZ9BCNDRZ"
    },
    {
      "field": "uses",
      "target": "PVD7VZJZ9B"
    },
    {
      "field": "uses",
      "target": "X7HYEBA5SA"
    },
    {
      "field": "uses",
      "target": "8RA7AMWSAF"
    },
    {
      "field": "uses",
      "target": "VY3J2NKGKW"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/J8ZRM7KFJH.md",
  "msc": [
    "65M06",
    "35L65"
  ],
  "name": "Lax–Wendroff method",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/J8Z/J8ZRM7KFJH.md",
  "status": null,
  "tag": "J8ZRM7KFJH",
  "uri": "m2://J8ZRM7KFJH",
  "url": "https://tamnd.github.io/math2/wiki/lax-wendroff-method-definition/",
  "writing": {
    "tag": "J8ZRM7KFJH",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
