© 2026 NeckPinch · www.neckpinch.com · All rights reserved.
Course 6Book 6C: Nonlinear PDE: Variational and Geometric MethodsChapter 9
Hamilton–Jacobi Equations and Viscosity Solutions
Hopf–Lax, viscosity solutions, comparison by doubling variables, and optimal control.
Read with Evans, Partial Differential Equations, section 3.3 (the Hamilton–Jacobi equation: calculus of variations, Hamilton's equations, the Legendre transform and the Hopf–Lax formula) and chapter 10 (viscosity solutions: definitions, consistency, uniqueness by doubling variables, and the connection with optimal control). Crandall, Ishii and Lions, "User's guide to viscosity solutions of second order partial differential equations" (Bull. Amer. Math. Soc. 27, 1992), and Bardi and Capuzzo-Dolcetta, Optimal Control and Viscosity Solutions of Hamilton–Jacobi–Bellman Equations, are the standard references. This chapter proves the Hopf–Lax formula and its properties, consistency and stability of viscosity solutions, the comparison principle (for Hamiltonians independent of ) and that the Hopf–Lax formula gives the viscosity solution, and derives the HJB equation from dynamic programming.
6C.8 Monotonicity, ε-Regularity and Tangent Cones studied singularities of smooth variational problems by rescaling and monotonicity. This chapter turns to singularities of a different kind, the corners that first-order equations develop, where comparison rather than monotonicity is the tool. The Hamilton–Jacobi equation
is the first-order PDE of mechanics, optics and optimal control. In 6B.1 First-Order Equations and Characteristics it was solved by characteristics, which are the trajectories of Hamilton's ODE, and the solution broke down where characteristics cross. That breakdown is not a technical nuisance: it is generic, it happens in finite time from smooth data, and it corresponds to something real (a wavefront developing a corner, a shortest path ceasing to be unique). After that time there is no smooth solution, and the PDE must be understood in a weak sense.
The obvious weak sense, "Lipschitz and satisfying the equation almost everywhere", fails badly: it allows infinitely many solutions. The right notion was found by Michael Crandall and Pierre-Louis Lions in 1983: viscosity solutions, defined by testing the solution against smooth functions that touch it from above or below, which turns the maximum principle into a definition. Viscosity solutions exist, are unique, are stable under limits, and are what one gets from the vanishing viscosity limit (hence the name). Above all, the value function of an optimal control problem is the viscosity solution of the associated Hamilton–Jacobi–Bellman equation, which is why the theory runs economics, robotics and mathematical finance.
By the end of this chapter you will be able to:
- derive the Hopf–Lax formula from the calculus of variations, and prove the semigroup property, the Lipschitz bounds and that it solves the equation almost everywhere;
- show that Lipschitz almost-everywhere solutions are not unique;
- define viscosity solutions, prove they are consistent with classical solutions and stable under uniform limits;
- prove the comparison principle by doubling the variables, and that the Hopf–Lax formula gives the unique viscosity solution;
- derive the Hamilton–Jacobi–Bellman equation from the dynamic programming principle, and state the second-order theory.
Shortest arrival times
A front, a forest fire, a seismic wave, the boundary of a tumour seen in a medical image, moves outward at speed depending on position. The arrival time , the first time the front reaches , satisfies the eikonal equation
with on the initial front. The equation fails to have a smooth solution wherever two parts of the front meet (behind an obstacle, at the far side of a lens), and the arrival time has a kink there: it is the minimum of the times along competing paths. The correct solution is the viscosity solution, and it can be computed fast: John Tsitsiklis (1995) and James Sethian (1996) found Dijkstra-like algorithms, of which Sethian's fast marching method is the best known, that compute it in operations on a grid of points. They are used in seismic imaging, image segmentation and robot path planning.
The same structure, "the value now is the best over the first step of the value afterwards", is Richard Bellman's principle of optimality, formulated at the RAND Corporation in the 1950s, and in continuous time it gives the Hamilton–Jacobi–Bellman equation of this chapter. In finance, the optimal investment problems of 6D.8 Stochastic Control and the HJB Equation are solved by the same equation, and the theory of this chapter is what makes their value functions well defined when they are not smooth.
The Hopf–Lax formula
Consider the initial value problem
with convex and superlinear ( as ), and Lipschitz. Let be the Legendre transform, , which is again convex and superlinear, with (6A.11 Calculus of Variations and Gradient Flows). In mechanics is the Lagrangian, and Hamilton's principle suggests that should be the least action needed to reach at time from a starting point , plus the initial cost :
The infimum above equals
and the minimum is attained.
Proof. Straight lines are optimal. For a path from to , Jensen's inequality for the convex function and the probability measure on gives
with equality for the straight line . So the infimum over paths starting at is , and the infimum over all paths is the infimum over of this.
The minimum is attained. With , . By superlinearity, , so the expression is at least , which tends to infinity as . A continuous function tending to infinity attains its minimum.
For , .
Proof. . Fix , and choose attaining the minimum in the formula for : . Since
convexity gives , so .
. Choose with and set , the point at time on the straight line from to . Then , and
The semigroup property says the solution operator of (HJ) is a semigroup, as for the heat equation (6B.13 Semigroups and Evolution Equations); but here it is a nonlinear one, in which the integral against a kernel is replaced by a minimum, and the Gaussian kernel by . This is the "min-plus" or tropical analogue of a convolution, and the analogy is exact: Exercise 9.17 shows that the Hopf–Lax formula is the limit of the heat semigroup in logarithmic coordinates.
The function is Lipschitz on , with , and for a constant depending on and .
Proof. In . Choose attaining the minimum for . Using as a competitor for (so that ),
Exchange and . In . By Exercise 9.14, for all and ; applying this to the semigroup started at time (whose initial data has the same Lipschitz constant) gives .
By Rademacher's theorem (a Lipschitz function is differentiable almost everywhere; Evans and Gariepy, section 3.1), is differentiable at almost every , . At every such point, . And .
Proof. Let be differentiable at .
. For and , Lemma 9.2 at time with and the competitor gives . Subtract , divide by and let : . Hence .
. Choose with , put , and for let and (the point at time on the line from to ). Then , so , and
Divide by and let : , so .
Initial data. Taking gives , and Exercise 9.14 gives the lower bound, so as .
For , and
the Moreau envelope (or inf-convolution) of with a quadratic, central in convex optimisation. In one dimension with , as increases through the minimiser jumps from to , and : the initial corner persists. With instead, for and for : the convex corner is immediately smoothed into a parabola (Exercise 9.13). The asymmetry is the signature of the equation: convex Hamiltonians smooth out convex corners and preserve concave corners . In general, the Hopf–Lax solution is semiconcave in for (Evans, section 3.3.3): when is uniformly convex. Concave corners (, like ) are allowed; convex corners (, like ) are not.
Almost-everywhere solutions are not unique
For in one dimension with , both and
are Lipschitz, have the right initial values, and satisfy the equation wherever they are differentiable (Exercise 9.15). In fact there are infinitely many: any number of such "V-shaped dents" can be added. The Hopf–Lax formula gives . The function has a convex corner along , exactly the kind of corner that, by semiconcavity, the true solution cannot have.
This is the same phenomenon as the non-uniqueness of weak solutions of conservation laws in 6B.2 Conservation Laws and Shocks (indeed is a weak solution of a conservation law), and the cure is analogous: an extra condition that singles out the physical solution. For conservation laws it was the entropy condition. For Hamilton–Jacobi equations it is the viscosity condition.
Viscosity solutions
Consider the general equation in , with continuous.
A bounded, uniformly continuous function on is a viscosity subsolution if for every ,
a viscosity supersolution if
and a viscosity solution if it is both, and .
The motivation is the maximum principle. If were smooth and had a local maximum at , then and there, so the equation for would become an inequality-free statement about . The definition keeps the conclusion and drops the smoothness of : the derivatives of the solution are replaced by those of every smooth function touching it from above (for the subsolution test) or below (for the supersolution test). At a point where no smooth function touches from above, the subsolution condition is vacuous. At a convex corner no function touches from above, so only the supersolution test applies there; at a concave corner only the subsolution test applies. These one-sided conditions at corners are exactly what selects the right solution (Exercise 9.15). (Using test functions instead of gives the same notion; Evans, section 10.1.)
The name comes from the way the notion was found: as the limit of the viscous approximations , which have smooth solutions.
(a) A solution of is a viscosity solution. (b) If a viscosity solution is differentiable at , then there. (c) If are smooth solutions of and locally uniformly as , then is a viscosity solution of .
Proof. (a) If has a local maximum or minimum at and both are , then and there, so .
(b) We need a function with having a local maximum at and the same derivatives as there; then the subsolution test gives , and the analogous construction from below gives . Write and subtract an affine function, so that , and has derivative at . Then with continuous, . Let , continuous, non-decreasing, , and
Then , so and is differentiable at with derivative ; for , , which is continuous and tends to , so . Finally, since is non-decreasing, , so for
has a strict maximum at .
(c) Let with having a local maximum at ; replacing by , the maximum is strict. Then has a maximum over a small closed ball around at points which, by uniform convergence and strictness, tend to as (along a sequence). At an interior maximum of the smooth function : , , and . So
Let : . The supersolution test is the same with minima. (Test functions in suffice, by the remark after the definition.)
Part (c) is the decisive property. A notion of weak solution is useful only if it is closed under the limits one actually takes, and viscosity solutions are closed under locally uniform limits with no derivative bounds at all. The proof used only that the second-order term has the right sign at a maximum, which is why the same definition works for second-order degenerate elliptic equations below.
Under the assumptions of (HJ), the Hopf–Lax function is a viscosity solution.
Proof. Subsolution. Let have a local maximum at . For and small , Lemma 9.2 (with the competitor at time ) gives . Since is maximal at , . Combining, . Divide by and let : for every , so .
Supersolution. Let have a local minimum at . With , as in the proof of Theorem 9.4, . By minimality, . So and .
The proof is the proof of Theorem 9.4 with replaced by the test function where it is touched. That is typical: viscosity arguments move derivatives onto smooth test functions, much as distributions move derivatives onto test functions by integration by parts, but using order instead of integration.
Uniqueness: doubling the variables
Let be continuous. Let be a viscosity subsolution and a viscosity supersolution of on , both bounded and uniformly continuous on , with Lipschitz in . If , then on . In particular the viscosity solution of (HJ) is unique among bounded Lipschitz functions, and it is given by the Hopf–Lax formula.
(For depending on , the same proof works under a condition like ; Evans, section 10.2. For simplicity of the time endpoint, we assume the sub- and supersolution tests hold up to ; this can always be arranged by working on for .)
Proof. Suppose . The difficulty is that and are not differentiable, so we cannot compare their equations at a maximum point of . The trick, due to Kruzhkov in a related setting and to Crandall and Lions here, is to double the variables: maximise a function of two independent points, penalising their distance, so that and are each touched by a smooth function at its own point.
The auxiliary function. For small and , let
on . It is continuous and tends to at infinity (as and are bounded), so it has a maximum at some . Choose with . Then for small,
The two points are close. From and the boundedness of , : , so ; and . Better, comparing with :
and the right side tends to as , because is uniformly continuous, , and .
Neither point is at time zero. If , then, writing for a modulus of continuity of and ,
since . This is impossible for small . The same holds if . So for small .
Testing the subsolution. The function has a maximum at ; that is, has a maximum there, with
a smooth function. The subsolution test gives
Testing the supersolution. The function has a minimum at ; that is, has a minimum there, with . Since and there,
The contradiction. Subtract (3) from (2): with ,
Now has a maximum at and is Lipschitz in with constant , so (a function touching a -Lipschitz function from above has gradient at most at the contact point). So , and both arguments of lie in a fixed ball, on which is uniformly continuous; and they differ by . So the right side tends to as , while . Contradiction.
Uniqueness. Two bounded Lipschitz viscosity solutions with the same initial data are each a subsolution and a supersolution, so comparison in both directions gives equality. The Hopf–Lax function is Lipschitz and a viscosity solution (Proposition 9.9); it is bounded when is bounded (and the boundedness assumption can be removed with more care).
The penalisation forces the two points together as while keeping them independent, so that is tested at and at , each by a smooth function. The two test functions have the same gradient up to , which is what lets the two inequalities be compared. The term makes the subsolution strict, and the term only ensures the maximum exists on an unbounded domain.
Optimal control and the HJB equation
A system has state evolving by
where the control is a measurable function with values in a compact set , chosen by us. We pay a running cost and a terminal cost , and want to minimise
The value function is . (Assume , , bounded and Lipschitz, so the ODE has unique solutions and is bounded and Lipschitz; Evans, section 10.3.)
For ,
Proof. () Fix on , reaching . For choose a control on with . The concatenation of and is a control from , so . () For any control on , its restriction to is a control from , so . Take the infimum over .
If were smooth, take a constant control on in the "" direction: , so for every . And for a nearly optimal control the reverse inequality holds in the limit. This gives the Hamilton–Jacobi–Bellman equation
a terminal value problem (time runs backwards from the deadline). With and , it is a Hamilton–Jacobi equation of the type above, with convex in (a maximum of affine functions).
Under the assumptions above, the value function is the unique bounded, uniformly continuous viscosity solution of (HJB). Conversely, if is a solution of (HJB) and attains the minimum in (HJB) along the trajectory it generates, then is an optimal control (the verification theorem).
The proof (Evans, section 10.3.3) runs the dynamic programming argument above with test functions in place of , exactly as Proposition 9.9 did with the semigroup property, which is the dynamic programming principle for the problem with , . The verification theorem is the practical tool: guess a solution of (HJB), check it, and read off the optimal feedback . For stochastic systems the HJB equation acquires a second-order term, and that is the version used for optimal investment in 6D.8 Stochastic Control and the HJB Equation.
Second-order equations
The definition extends verbatim to equations that are degenerate elliptic: whenever (in the sign convention where is ), and proper ( non-decreasing in ). A viscosity subsolution satisfies whenever has a local maximum at with , and similarly for supersolutions. Ellipticity is exactly what makes a classical solution a viscosity solution (at a maximum of , ).
Uniqueness for second-order equations is much harder, because doubling the variables now needs information about second derivatives at the maximum, which and do not have. The tool is the theorem on sums, or Crandall–Ishii lemma (statement): at a maximum of , there are symmetric matrices , with (more precisely, a two-by-two block inequality bounding ) that act as generalised second derivatives of and at the two points. Robert Jensen proved the first uniqueness theorem for second-order equations in 1988, and Hitoshi Ishii and Lions extended it in 1989–90; the "User's guide" of Crandall, Ishii and Lions (1992) is the standard exposition.
Second-order viscosity solutions handle equations with no divergence structure at all: the fully nonlinear equations of 6C.10 Fully Nonlinear Equations and Monge–Ampère, the HJB equations of stochastic control (6D.8 Stochastic Control and the HJB Equation), and the level-set formulation of mean curvature flow,
in which every level set of moves by mean curvature. Lawrence Evans and Joel Spruck, and independently Yun Gang Chen, Yoshikazu Giga and Shun'ichi Goto, proved in 1991 that this degenerate equation has unique viscosity solutions, which defines mean curvature flow through singularities.
Perelman's reduced distance (12A.5 Reduced Distance and Reduced Volume) is the value function of a variational problem: the infimum of the -length over space-time paths. Like every value function, it satisfies a Hamilton–Jacobi equation where it is smooth, and in general only in a weak sense (Perelman works with it in the barrier sense, closely related to the viscosity sense: the inequalities are tested by smooth functions touching from one side). The monotonicity of the reduced volume comes from differential inequalities for that are exactly the viscosity inequalities of this chapter (Exercise 9.19). The same structure appears in Li and Yau's estimate (6A.12 Entropy, Information and Diffusion), where the optimal path is a straight line and the value function is the Gaussian exponent .
History
William Rowan Hamilton (1830s) and Carl Jacobi (1840s) developed the equation as a reformulation of mechanics. Eberhard Hopf (1965) and Peter Lax (1957, for the related conservation laws) found the formula. Stanislav Kruzhkov studied generalised solutions of first-order equations in the 1960s, using a doubling of variables for conservation laws (1970). Richard Bellman developed dynamic programming in the 1950s. Michael Crandall and Pierre-Louis Lions introduced viscosity solutions in 1983, and Crandall, Evans and Lions simplified the definition to the one used here in 1984; Lions received the Fields Medal in 1994, in part for this work. Jensen (1988) and Ishii (1989) extended uniqueness to second-order equations.
For convex, superlinear with Legendre transform , the Hopf–Lax formula is the least action, satisfies the semigroup (dynamic programming) property, is Lipschitz, and solves (HJ) almost everywhere; but almost-everywhere solutions are not unique. Viscosity solutions are defined by testing with functions touching from above (subsolution, ) or below (supersolution, ); they agree with classical solutions where differentiable, are stable under uniform limits (including vanishing viscosity), and satisfy a comparison principle proved by doubling variables. So the Hopf–Lax function is the unique viscosity solution. In optimal control, the dynamic programming principle makes the value function the viscosity solution of the HJB equation. For second-order degenerate elliptic equations the definition is the same and uniqueness needs the Crandall–Ishii lemma. 6C.10 Fully Nonlinear Equations and Monge–Ampère studies the fully nonlinear elliptic equations that viscosity solutions were built for, culminating in Monge–Ampère and the Kähler–Ricci flow.
Exercises
For with , compute the Hopf–Lax solution and check that it is in for and satisfies the equation everywhere for .
Solution
Minimise . For the derivative in is , zero at , which is positive iff , giving . Symmetrically for . For the minimum is at , giving . So for and for . At : both pieces equal , and their -derivatives are and , so is in . The equation: for , and ; for , and . On both one-sided time derivatives equal .
With , show that the Hopf–Lax function satisfies .
Solution
The upper bound takes . For the lower bound, with , and , using and .
(a) Check that of Example 9.6 satisfies wherever it is differentiable. (b) Show that is not a viscosity supersolution: at , find a function touching from below with . (c) Show that at the corners no function touches from below, and explain why the dent at is the problem.
Solution
(a) For , . For , and , so . (b) Near , , with equality at . So touches from below at (, minimum ), and : the supersolution test fails. (c) At , near the corner, a concave corner ; a function touching from below would need slopes from one side and from the other, impossible. The only failure is the convex corner at , where smooth functions with slopes in fit underneath.
On , consider with , a stationary Hamilton–Jacobi equation with and the same definition of viscosity solution (without time). (a) Show that , the distance to the boundary, is a viscosity solution. (b) Show that is not. (c) What happens for the equation , which has the same classical solutions?
Solution
(a) Away from , is smooth with . At , the corner is concave: nothing touches from below, so the supersolution test is vacuous; a function touching from above has , and holds. (b) At , touches from below with , and violates the supersolution test. (c) Multiplying the equation by exchanges sub- and supersolutions: for the viscosity solution is . The viscosity solution depends on how the equation is written, which reflects the choice between a minimum (distance) and a maximum.
Let solve with , and . (a) Show that (the Hopf–Cole transformation of 6B.2 Conservation Laws and Shocks). (b) Using the heat kernel, write , and explain (Laplace's method) why . Together with Theorem 9.8, this proves again that the Hopf–Lax function is the viscosity solution for .
Solution
(a) : , , . The heat equation gives , i.e. . (b) The heat kernel of is . By Laplace's method, as (the integral is dominated by a neighbourhood of the minimum, and the prefactors contribute ).
On the line, with , running cost and terminal cost at time . (a) Guess the value function. (b) Check that it satisfies (HJB), , where it is differentiable, and that it is the viscosity solution (check the corner).
Solution
(a) Move towards at full speed: . (b) Where : and , so . Where : . To check the corners, reverse time: solves with . This is the Hopf–Lax problem for , whose Legendre transform is for and otherwise, so the formula reads . The proofs of Lemma 9.2 and Proposition 9.9 used only convexity of and the existence of minimisers, both true here, so , and hence , is the viscosity solution.
In (a static flat Ricci flow, ), Perelman's -length of a path from the origin is . (a) Show that the minimiser from to is , and the minimum is . (b) The Lagrangian has Hamiltonian ; check that solves . (c) The reduced distance is . Show , so is the heat kernel, and Perelman's reduced volume equals for all : in flat space the monotone quantity is constant (12A.5 Reduced Distance and Reduced Volume).
Solution
(a) The Euler–Lagrange equation is , so and ; gives . Then ; by convexity of the Lagrangian in , this critical path is the minimiser. (b) is attained at , value . , , ; the sum is . (c) , and .
Free resources for this chapter
Chosen for what this chapter covers, and all free to read. Links checked Oct 20, 2026.
- Reference Viscosity solutionWikipediaDefinition, consistency and uniqueness of viscosity solutions.
- Reference Hamilton–Jacobi–Bellman equationWikipediaThe HJB equation of optimal control.
- Reference Fast marching methodWikipediaComputing arrival times for the eikonal equation.
- Reference Optimal controlWikipediaOptimal control problems and dynamic programming.
© 2026 NeckPinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.