= Solution
The <total derivative> contributes only the <boundary term>
$$
\int_0^T\frac d{dt}g(x,y)\,dt=g(x(T),y(T))-g(x(0),y(0)).
$$
This is fixed by the endpoint data, so its <first variation> vanishes. It cannot change the <Euler-Lagrange equations> or which path minimizes $F$.
For a direct check, let $h=g_x\dot x+g_y\dot y$. Then
$$
\frac d{dt}h_{\dot x}=g_{xx}\dot x+g_{xy}\dot y=h_x,\qquad\frac d{dt}h_{\dot y}=g_{yx}\dot x+g_{yy}\dot y=h_y.
$$
The equality uses commuting mixed <partial derivatives>. Thus $\boxed{d g/dt\text{ contributes zero to both Euler-Lagrange equations}}$, as in <total time derivatives preserve fixed-endpoint Euler-Lagrange equations>.
Back to article page