{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $F \\colon \\R^m \\to \\R^m$ be continuous, and consider the [[conservation law|8RA7AMWSAF]] $u_t + F(u)_x = 0$ for $u \\colon \\R \\times [0, \\infty) \\to \\R^m$.\nFix $\\Delta x \u003e 0$ and $\\Delta t \u003e 0$, and put $\\lambda = \\Delta t / \\Delta x$.\nLet $u_j^n$ denote the approximation of $u$ at $x_j = j \\Delta x$ and $t_n = n \\Delta t$.\nThe *Lax–Friedrichs method* is the explicit scheme\n$$u_j^{n+1} = \\frac{u_{j+1}^n + u_{j-1}^n}{2} - \\frac{\\lambda}{2} \\left( F(u_{j+1}^n) - F(u_{j-1}^n) \\right), \\qquad j \\in \\Z,\\ n \\ge 0.$$\n\n## Remarks\n\nIt is in conservation form $u_j^{n+1} = u_j^n - \\lambda \\left( G_{j+1/2} - G_{j-1/2} \\right)$ with the numerical flux\n$$G_{j+1/2} = \\frac{F(u_j^n) + F(u_{j+1}^n)}{2} - \\frac{u_{j+1}^n - u_j^n}{2 \\lambda}.$$\nIts truncation error is of first order in $\\Delta x$ when $\\lambda$ is fixed.\n\nExample: for $u_t + a u_x = 0$ with $a \\in \\R$, the scheme reads $u_j^{n+1} = \\frac{1 - a\\lambda}{2} u_{j+1}^n + \\frac{1 + a\\lambda}{2} u_{j-1}^n$.\nIf $\\abs{a} \\lambda \\le 1$, both weights lie in $[0, 1]$ and sum to $1$.\nSo $\\max_j \\abs{u_j^{n+1}} \\le \\max_j \\abs{u_j^n}$, and the scheme is stable in the maximum norm.\n\nNon-example: the forward-time centred-space scheme $u_j^{n+1} = u_j^n - \\frac{\\lambda}{2}(F(u_{j+1}^n) - F(u_{j-1}^n))$ differs only in the first term.\nFor $u_t + a u_x = 0$ with $a \\ne 0$, it multiplies the Fourier mode $e^{i j \\xi}$ by $1 - i a \\lambda \\sin \\xi$, of modulus greater than $1$ when $\\sin \\xi \\ne 0$.\nSo it is unstable for every $\\lambda \u003e 0$.\n\n## Explanations\n\n### L1 human\n\nThe update averages the two neighbours and then corrects by the flux difference across them.\nThe averaging is what makes the method work, at the price of some blurring of sharp fronts.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "VY3J2NKGKW",
    "kind": "definition",
    "msc": [
      "65M06",
      "65M08",
      "35L65"
    ],
    "name": "Lax–Friedrichs method",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Lax%E2%80%93Friedrichs_method"
      }
    ],
    "tag": "53H8EVRC1J",
    "uses": [
      "8RA7AMWSAF",
      "X7HYEBA5SA"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/53H8EVRC1J/",
  "links": [
    {
      "field": "defines",
      "target": "VY3J2NKGKW"
    },
    {
      "field": "uses",
      "target": "8RA7AMWSAF"
    },
    {
      "field": "uses",
      "target": "X7HYEBA5SA"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/53H8EVRC1J.md",
  "msc": [
    "65M06",
    "65M08",
    "35L65"
  ],
  "name": "Lax–Friedrichs method",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/53H/53H8EVRC1J.md",
  "status": null,
  "tag": "53H8EVRC1J",
  "uri": "m2://53H8EVRC1J",
  "url": "https://tamnd.github.io/math2/wiki/lax-friedrichs-method-definition/",
  "writing": {
    "tag": "53H8EVRC1J",
    "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
      }
    ]
  }
}
