---
tag: F0047A6GDG
kind: definition
name: Viscosity solution
msc: [35D40, 35F21]
defines: H1ERJ3T75T
uses: [0VW90BBSJ4, 09EGC6F8PT]
sources:
  - url: https://en.wikipedia.org/wiki/Viscosity_solution
---

## Definition

Let $U \subseteq \R^n$ be open, and let $F \colon U \times \R \times \R^n \to \R$ be continuous.
Consider the first-order equation $F(x, u, Du) = 0$ in $U$, where $Du$ is the gradient of $u$.
Let $u \colon U \to \R$ be continuous.

1. $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$.
2. $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$.
3. $u$ is a *viscosity solution* if it is both a viscosity subsolution and a viscosity supersolution.

## Remarks

If $u$ is continuously differentiable and $u - \varphi$ has a local extremum at $x_0$, then $Du(x_0) = D\varphi(x_0)$.
So a continuously differentiable $u$ is a viscosity solution exactly when it solves the equation pointwise.
One gets the same notion with smooth test functions $\varphi$ instead of continuously differentiable ones.
The definition depends on the sign of $F$: the equations $F = 0$ and $-F = 0$ have different viscosity solutions in general.
For 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.

Example: on $U = (-1, 1)$, the function $u(x) = 1 - \abs{x}$ is a viscosity solution of $\abs{u'} - 1 = 0$.
Away from $0$, $u$ is smooth with $\abs{u'} = 1$.
At $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.
No 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.

Non-example: $w(x) = \abs{x} - 1$ is not a viscosity solution of the same equation, although $\abs{w'} = 1$ wherever $w'$ exists.
With $\varphi = 0$, the function $w - \varphi$ has a local minimum at $0$, and $\abs{\varphi'(0)} - 1 = -1 < 0$, so the supersolution condition fails.
