{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $U \\subseteq \\R^n$ be open, and let $F \\colon U \\times \\R \\times \\R^n \\to \\R$ be continuous.\nConsider the first-order equation $F(x, u, Du) = 0$ in $U$, where $Du$ is the gradient of $u$.\nLet $u \\colon U \\to \\R$ be continuous.\n\n1. $u$ is a *viscosity subsolution* if the following holds for every [[continuously differentiable function|0VW90BBSJ4]] $\\varphi$ on $U$. At every point $x_0 \\in U$ at which $u - \\varphi$ has a local maximum, $F(x_0, u(x_0), D\\varphi(x_0)) \\le 0$.\n2. $u$ is a *viscosity supersolution* if, for every continuously differentiable $\\varphi$ on $U$ and every point $x_0 \\in U$ at which $u - \\varphi$ has a local minimum, $F(x_0, u(x_0), D\\varphi(x_0)) \\ge 0$.\n3. $u$ is a *viscosity solution* if it is both a viscosity subsolution and a viscosity supersolution.\n\n## Remarks\n\nIf $u$ is continuously differentiable and $u - \\varphi$ has a local extremum at $x_0$, then $Du(x_0) = D\\varphi(x_0)$.\nSo a continuously differentiable $u$ is a viscosity solution exactly when it solves the equation pointwise.\nOne gets the same notion with smooth test functions $\\varphi$ instead of continuously differentiable ones.\nThe definition depends on the sign of $F$: the equations $F = 0$ and $-F = 0$ have different viscosity solutions in general.\nFor second-order equations $F(x, u, Du, D^2 u) = 0$, the Hessian $D^2 \\varphi(x_0)$ enters as well, and $F$ is required to be degenerate elliptic, which means non-increasing in the matrix variable for this sign convention.\n\nExample: on $U = (-1, 1)$, the function $u(x) = 1 - \\abs{x}$ is a viscosity solution of $\\abs{u'} - 1 = 0$.\nAway from $0$, $u$ is smooth with $\\abs{u'} = 1$.\nAt $0$, if $u - \\varphi$ has a local maximum then $-\\abs{x} \\le \\varphi(x) - \\varphi(0)$ near $0$, so $\\abs{\\varphi'(0)} \\le 1$ and the subsolution condition holds.\nNo continuously differentiable $\\varphi$ makes $u - \\varphi$ have a local minimum at $0$, because that would need $\\varphi(x) - \\varphi(0) \\le -\\abs{x}$ near $0$, so the supersolution condition is empty there.\n\nNon-example: $w(x) = \\abs{x} - 1$ is not a viscosity solution of the same equation, although $\\abs{w'} = 1$ wherever $w'$ exists.\nWith $\\varphi = 0$, the function $w - \\varphi$ has a local minimum at $0$, and $\\abs{\\varphi'(0)} - 1 = -1 \u003c 0$, so the supersolution condition fails.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "H1ERJ3T75T",
    "kind": "definition",
    "msc": [
      "35D40",
      "35F21"
    ],
    "name": "Viscosity solution",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Viscosity_solution"
      }
    ],
    "tag": "F0047A6GDG",
    "uses": [
      "0VW90BBSJ4",
      "09EGC6F8PT"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/F0047A6GDG/",
  "links": [
    {
      "field": "defines",
      "target": "H1ERJ3T75T"
    },
    {
      "field": "uses",
      "target": "0VW90BBSJ4"
    },
    {
      "field": "uses",
      "target": "09EGC6F8PT"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/F0047A6GDG.md",
  "msc": [
    "35D40",
    "35F21"
  ],
  "name": "Viscosity solution",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/F00/F0047A6GDG.md",
  "status": null,
  "tag": "F0047A6GDG",
  "uri": "m2://F0047A6GDG",
  "url": "https://tamnd.github.io/math2/wiki/viscosity-solution-definition/",
  "writing": {
    "tag": "F0047A6GDG",
    "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
      }
    ]
  }
}
