Hopf-Lax formula motivation I'm studying the Hamilton-Jacobi equation by the Evans's "PDE" book and I got a little confused with the way the author got to the definition of the Hopf-Lax formula.
We are considering the classical case, with convex Hamiltonian $H$:
$$\begin{cases}
    u_t + H(D_xu) = 0 \\
    u(x, 0) = g
\end{cases} $$
The first guess, quite understandably, is that there is a direct connection between Hamilton-Jacobi equation and some calculus of variation problem. We try to minimize the action with additional initial value term:
$$\int_{0}^{t}L(\dot{w}(s))ds+g(w(0))$$
Then we set:
$$ u := \inf_{w} \left\{\int_{0}^{t}L(\dot{w}(s))ds+g(w(0))| w(0)=y, w(t)=x\right\}$$
From that point on, everything is quite easy to follow, but my question is: how can we motivate this guess? Evans mentions there would be some justification in Chapter 10, which talks more about viscosity solutions, but I couldn't find anything there.
 A: The motivation is found in the characteristic equation for the Hamilton Jacobi equation
$$
\partial_t u(x,t) + H(\nabla u(x,t)) = 0.
$$
This is a nonlinear first-order equation to which we can apply the method of characteristics.  For a trajectory $x(t)$ with $z(t) = u(x(t),t)$ and $p(t) = \nabla u (x(t),t)$ these read (you can find the derivation at the start of Evans' discussion of Hamilton-Jacobi in Section 3.3)
$$
\begin{cases}
\dot{x}(t) = \nabla_p H(p(t)) \\
\dot{z}(t) = p(t) \cdot \nabla_p H(p(t))\\
\dot{p}(t) = -\nabla_p H(p(t)).
\end{cases}
$$
The first and third of these constitute the Hamiltonian ODE associated to the Hamiltonian $H$.  These are often written in a more general context as
$$
\dot{w} = J \nabla H(w) \text{ for } w \in \mathbb{R}^{2n} \text{ and } J = 
\begin{pmatrix}
0 &I_{n\times n} \\
-I_{n \times n} & 0.
\end{pmatrix}
$$
It's known from classical mechanics / the calculus of variations that there is a deep relationship between Hamilton's ODE and critical points of the "action"
$$
u \mapsto \int L(\dot{u})
$$
where $L$ is the Lagrangian associated to the Hamiltonian (again the relation between these is discussed by Evans).  In fact, in classical mechanics, the Lagrangian and Hamiltonian formulations are equivalent to each other and to the Newtonian equation $F = ma$.
With all of this in mind, the Hopf-Lax formula tries to use this variational structure in order to solve the Hamilton-Jacobi equation by essentially bypassing the characteristic equation (Hamilton's ODE) and replacing it with the corresponding variational principle.  So to summarize: the motivation is to solve the characteristic equations by exploiting a special structure in the characteristic equations (namely Hamilton's structure) that allows to write a formula for $u$ directly (namely Hopf-Lax) in terms of the variational principle associated to the Hamiltonian structure of the characteristics.
A: There is another motivation of the Hopf-Lax formula that is often omitted (though it is described in some of Evans' papers). Notice that for any fixed $y,z \in \mathbb{R}^n$, the linear function
$v(x,t) = g(y) + (x-y)\cdot z - tH(z)$
is a solution of your Hamilton-Jacobi equation. This is true because $D_xv(x,t) = z$ and $v_t(x,t)=-H(z) =-H(D_xv(x,t))$. The Hopf-Lax formula is obtained as a two-parameter envelope solution:
$u(x,t) = \inf_{y \in \mathbb{R}^n}\sup_{z \in \mathbb{R}^n} \{ g(y) + (x-y)\cdot z - tH(z)\}.$
Interpreting the inner sup as a Legendre transform puts the formula in the more usual form
$u(x,t) = \inf_{y \in \mathbb{R}^n}\{g(y) - tH^*(\tfrac{x-y}{t}) \},$
which works for convex $H$. By the way, there is another Hopf-Lax formula obtained by simply swapping the inf and sup:
$u(x,t) = \sup_{z \in \mathbb{R}^n}\inf_{y \in \mathbb{R}^n} \{ g(y) + (x-y)\cdot z - tH(z)\}.$
The inner inf can be interpreted as a Legendre transform to obtain
$u(x,t) = \sup_{z \in \mathbb{R}^n}\{x\cdot z - g^*(z) - tH(z)\}.$
This version holds when $g$ is convex and $H$ is allowed to be nonconvex.
