[step:Decompose the competitor integrand into a total derivative and excess]Let $y\in C^1([a,b];U)$ be an admissible competitor. Define the field velocity along $y$ as the map $Q:[a,b]\to V$ given by
\begin{align*}
Q(x):=q(x,y(x)).
\end{align*}
The definition of $E$ gives
\begin{align*}
L(x,y(x),y'(x))=L(x,y(x),Q(x))+\partial_vL(x,y(x),Q(x))\cdot(y'(x)-Q(x))+E(x,y(x),y'(x)).
\end{align*}
The first Hilbert field identity gives
\begin{align*}
\partial_vL(x,y(x),Q(x))=\nabla_yS(x,y(x)).
\end{align*}
The second Hilbert field identity gives
\begin{align*}
L(x,y(x),Q(x))=\partial_xS(x,y(x))+\nabla_yS(x,y(x))\cdot Q(x).
\end{align*}
Substituting these two identities into the excess decomposition yields
\begin{align*}
L(x,y(x),y'(x))=\partial_xS(x,y(x))+\nabla_yS(x,y(x))\cdot y'(x)+E(x,y(x),y'(x)).
\end{align*}
Since $S$ extends to a $C^2$ map near the graph of $y$ and $y$ is $C^1$, the chain rule applies to the map $x\mapsto S(x,y(x))$ and gives
\begin{align*}
\frac{d}{dx}S(x,y(x))=\partial_xS(x,y(x))+\nabla_yS(x,y(x))\cdot y'(x).
\end{align*}
Therefore
\begin{align*}
L(x,y(x),y'(x))=\frac{d}{dx}S(x,y(x))+E(x,y(x),y'(x)).
\end{align*}[/step]